.hub-chat-layout{display:grid;grid-template-columns:minmax(200px,280px) minmax(0,1fr);gap:20px;min-width:0;margin-top:24px}
.hub-chat-sidebar,.hub-chat-conversation{min-width:0;background:#fff;border:1px solid #d3e2e7;border-radius:20px;padding:20px}
.hub-chat-sidebar h2,.hub-chat-conversation h2{font-size:1.25rem;margin:0 0 10px}
.hub-chat-thread{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left;background:transparent;color:#173e54;border:1px solid transparent;border-radius:12px;padding:12px;margin:4px 0;letter-spacing:normal;text-transform:none}
.hub-chat-thread span{min-width:0}.hub-chat-thread strong{display:block;overflow-wrap:anywhere}.hub-chat-thread small{display:block;font-weight:400;margin-top:4px}.hub-chat-thread.selected{background:#e5f7f5;border-color:#63c9c0}.hub-chat-thread:hover{background:#f0f7fa}
.hub-chat-conversation{display:flex;flex-direction:column;min-height:460px}.hub-chat-history{height:min(48dvh,520px);min-height:200px;overflow:auto;overscroll-behavior:contain;padding:10px 4px;scrollbar-gutter:stable}
.hub-chat-message{width:fit-content;max-width:88%;padding:12px 16px;border-radius:16px 16px 16px 4px;background:#eef4f7;margin:12px 0;overflow-wrap:anywhere}.hub-chat-message.mine{margin-left:auto;background:#ddf5ee;border-radius:16px 16px 4px 16px}.hub-chat-message header{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.75rem;line-height:1.5;color:#436170}.hub-chat-message p{white-space:pre-wrap;margin:6px 0 0;line-height:1.6;font-size:.95rem}.hub-chat-message time{font-size:.72rem}
#hub-chat-compose textarea{resize:vertical;min-height:88px;max-height:220px;width:100%;font-size:16px}#hub-chat-compose .row{justify-content:space-between;margin-top:10px}#hub-chat-compose button{margin-left:auto}.hub-chat-back{display:none}#hub-chat-status{min-height:24px;font-size:.8rem}
@media(max-width:700px){.hub-chat-layout{display:block;margin-top:16px}.hub-chat-sidebar,.hub-chat-conversation{padding:16px;border-radius:16px}.hub-chat-layout:not(.conversation-open) .hub-chat-conversation{display:none}.hub-chat-layout.conversation-open .hub-chat-sidebar{display:none}.hub-chat-back{display:inline-flex;margin:0 0 12px;padding:8px 0;align-self:flex-start}.hub-chat-history{height:42dvh;min-height:160px}.hub-chat-message{max-width:94%;padding:10px 12px}.hub-chat-conversation{min-height:0}#hub-chat-compose .row .subtle{display:none}#hub-chat-compose button{width:100%}}

/* Keep the phone composer directly below the recipient, even in empty threads. */
@media(max-width:700px){
 #hub-chat-conversation-head{order:0}
 #hub-chat-compose{order:1;margin:8px 0 12px}
 .hub-chat-history{order:2;height:auto;min-height:0;max-height:36dvh}
 #hub-chat-status{order:3;margin:8px 0 0}
 #hub-chat-placeholder{order:4}
 .hub-chat-empty{margin:8px 0}
}
