.messages-main{padding:30px 26px 40px;min-width:0}.messages-heading{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:20px}.messages-heading h1{margin:0 0 4px;font-size:36px}.messages-heading p{margin:0;color:#60738f}.message-pro-note{border:1px solid #f2c94c;background:#fffaf0;border-radius:9px;padding:12px 16px;font-size:13px}.message-pro-note b{color:#d49d00}.messages-shell{display:grid;grid-template-columns:330px minmax(390px,1fr) 290px;gap:12px;height:calc(100vh - 185px);min-height:570px}.message-panel{background:#fff;border:1px solid #dfe7f1;border-radius:12px;overflow:hidden;box-shadow:0 4px 16px rgba(20,45,80,.05)}.thread-tools{padding:16px;border-bottom:1px solid #e5ebf3;display:flex;gap:9px}.thread-search{width:100%;padding:11px 13px;border:1px solid #cbd8e8;border-radius:8px}.new-message{border:0;border-radius:8px;background:#2868b8;color:#fff;width:44px;font-size:22px;cursor:pointer}.thread-list{height:calc(100% - 70px);overflow:auto}.thread{display:flex;gap:11px;padding:14px 16px;border-bottom:1px solid #edf1f6;cursor:pointer}.thread:hover,.thread.active{background:#edf5ff}.thread-avatar,.chat-avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;background:#dce6f2}.thread-body{min-width:0;flex:1}.thread-top{display:flex;justify-content:space-between;gap:8px}.thread-name{font-weight:800}.thread-time{font-size:11px;color:#617693}.thread-preview{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#60738f;font-size:13px;margin-top:4px}.unread-dot{display:inline-flex;min-width:18px;height:18px;border-radius:9px;background:#ef3434;color:#fff;align-items:center;justify-content:center;font-size:10px;font-weight:800}.empty-threads{padding:35px 20px;text-align:center;color:#60738f}.chat-panel{display:flex;flex-direction:column}.chat-head{padding:15px 18px;border-bottom:1px solid #e5ebf3;display:flex;align-items:center;gap:12px}.chat-head h2{font-size:19px;margin:0}.chat-head small{display:block;color:#60738f;margin-top:3px}.chat-stream{flex:1;overflow:auto;padding:22px;display:flex;flex-direction:column;gap:10px;background:#fbfdff}.bubble-row{display:flex}.bubble-row.mine{justify-content:flex-end}.bubble{max-width:72%;padding:10px 13px;border-radius:13px;background:#e9eef5;color:#142d50;line-height:1.35;white-space:pre-wrap;word-break:break-word}.mine .bubble{background:#1682ed;color:#fff}.bubble-time{font-size:10px;opacity:.68;margin-top:5px}.composer{display:flex;gap:10px;padding:14px 16px;border-top:1px solid #e5ebf3}.composer textarea{flex:1;resize:none;height:46px;max-height:120px;padding:12px;border:1px solid #cbd8e8;border-radius:9px;font:inherit}.composer button{width:48px;border:0;border-radius:9px;background:#1682ed;color:#fff;font-size:21px;cursor:pointer}.contact-panel{padding:20px}.contact-profile{text-align:center}.contact-profile img{width:82px;height:82px;border-radius:50%;object-fit:cover;background:#dce6f2}.contact-profile h2{margin:10px 0 4px}.contact-profile p{margin:3px;color:#60738f}.contact-section{border-top:1px solid #e5ebf3;margin-top:18px;padding-top:17px}.contact-section h3{font-size:14px;margin:0 0 8px}.view-profile{display:block;margin-top:18px;padding:10px;border:1px solid #1682ed;border-radius:8px;text-align:center;color:#116dc5;text-decoration:none;font-weight:700}.recipient-picker{position:fixed;inset:0;background:rgba(10,29,54,.45);display:flex;align-items:center;justify-content:center;z-index:1000}.recipient-card{background:#fff;width:min(520px,92vw);max-height:75vh;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.25);overflow:hidden}.recipient-head{padding:18px 20px;border-bottom:1px solid #e5ebf3;display:flex;justify-content:space-between}.recipient-head h2{margin:0}.recipient-head button{border:0;background:none;font-size:24px;cursor:pointer}.recipient-list{max-height:58vh;overflow:auto}.recipient{padding:13px 18px;display:flex;align-items:center;gap:12px;cursor:pointer;border-bottom:1px solid #edf1f6}.recipient:hover{background:#edf5ff}.recipient img{width:42px;height:42px;border-radius:50%;object-fit:cover}.recipient small{display:block;color:#60738f;margin-top:2px}@media(max-width:1150px){.messages-shell{grid-template-columns:290px 1fr}.contact-panel{display:none}}@media(max-width:800px){.messages-main{padding:18px 12px}.messages-heading{display:block}.message-pro-note{margin-top:12px}.messages-shell{display:block;height:auto}.threads-panel{height:280px;margin-bottom:10px}.chat-panel{height:620px}.contact-panel{display:none}}

/* New-message controls */
.thread-tools{display:flex;flex-direction:column;gap:10px;padding:10px}
.new-message{width:100%;height:42px;display:flex;align-items:center;justify-content:center;gap:10px;border:0;border-radius:6px;background:#1682ed;color:#fff;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 2px 5px rgba(22,130,237,.22)}
.new-message:hover{background:#0f73d5}
.new-message-compose{font-size:18px;line-height:1}
.thread-search-wrap{position:relative;width:100%}
.thread-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:#617693;font-size:17px;pointer-events:none}
.thread-search{box-sizing:border-box;width:100%;height:32px;padding:6px 10px 6px 32px;border:1px solid #cbd8e8;border-radius:5px}
.thread-list{height:calc(100% - 104px)}
.recipient-picker[hidden]{display:none!important}
.recipient{user-select:none}
.recipient:active{background:#dcecff}

/* Approved New Message modal */
.recipient-head>div>p,.new-message-head p{margin:5px 0 0;color:#60738f;font-size:14px}.recipient-search-wrap{position:relative;padding:14px 18px;border-bottom:1px solid #e5ebf3}.recipient-search-wrap span{position:absolute;left:30px;top:50%;transform:translateY(-50%);color:#617693}.recipient-search-wrap input{box-sizing:border-box;width:100%;height:40px;padding:8px 12px 8px 36px;border:1px solid #cbd8e8;border-radius:7px;font:inherit}.new-message-card{background:#fff;width:min(535px,92vw);border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.28);overflow:hidden}.new-message-card[hidden]{display:none!important}.new-message-head{display:flex;justify-content:space-between;align-items:flex-start;padding:22px 24px 16px}.new-message-head h2{margin:0;font-size:27px;color:#142d50}.new-message-head button{border:0;background:transparent;color:#536a88;font-size:30px;line-height:1;cursor:pointer}.new-message-to{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:10px;padding:0 24px 16px}.to-label{font-weight:800;color:#142d50}.new-message-recipient{display:flex;align-items:center;gap:11px;padding:10px 13px;background:#edf5ff;border-radius:10px}.new-message-recipient img{width:42px;height:42px;border-radius:50%;object-fit:cover}.new-message-recipient b{display:block;color:#142d50}.new-message-recipient small{display:block;color:#60738f;margin-top:3px}.new-message-card textarea{box-sizing:border-box;display:block;width:calc(100% - 48px);height:185px;margin:0 24px;resize:vertical;padding:14px;border:1.5px solid #1682ed;border-radius:9px;font:inherit;line-height:1.45;outline:none}.new-message-card textarea:focus{box-shadow:0 0 0 3px rgba(22,130,237,.12)}.new-message-count{text-align:right;padding:7px 25px 12px;color:#60738f;font-size:12px}.new-message-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:18px;padding:12px 24px 24px}.new-message-actions button{height:52px;border-radius:9px;font-size:16px;font-weight:800;cursor:pointer}.cancel-new-message{background:#fff;border:1.5px solid #1682ed;color:#0875d7}.send-new-message{border:0;background:#1682ed;color:#fff}.send-new-message:hover{background:#0f73d5}.send-new-message:disabled{opacity:.6;cursor:wait}@media(max-width:600px){.new-message-actions{grid-template-columns:1fr}.new-message-card textarea{height:150px}}

.contact-details{padding:0 22px 24px;overflow:auto}
.contact-detail-section{padding:18px 0;border-top:1px solid #e5e7eb}
.contact-detail-section h3{margin:0 0 10px;font-size:.82rem;text-transform:uppercase;letter-spacing:.06em;color:#64748b}
.contact-detail-section p{margin:0;line-height:1.55;color:#475569}
.profile-facts{display:grid;gap:12px}
.profile-facts>div{display:grid;gap:3px}
.profile-facts span{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8}
.profile-facts strong{font-size:.9rem;color:#1e293b;overflow-wrap:anywhere}
.business-description{margin:4px 0 12px!important}
.profile-loading,.profile-empty{padding:18px 0;border-top:1px solid #e5e7eb;color:#94a3b8;font-size:.88rem}

.profile-error{display:block;margin-top:6px;font-size:.72rem;color:#94a3b8}

/* Right-side member profile */
.contact-panel{
  min-height:0;
  height:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.contact-profile{
  flex:0 0 auto;
  padding-bottom:18px;
}
.contact-details{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:0 22px 32px;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
}
.mp-section{
  padding:16px 0;
  border-top:1px solid #dbe4ef;
}
.mp-section:first-child{border-top:1px solid #dbe4ef}
.mp-section h3{
  margin:0 0 7px;
  font-size:.94rem;
  line-height:1.2;
  font-weight:700;
  text-transform:none;
  letter-spacing:0;
  color:#10264b;
}
.mp-copy,.mp-lines,.mp-contact,.mp-contact-row{
  font-size:.88rem;
  line-height:1.45;
  color:#536b94;
}
.mp-copy{margin:0;white-space:pre-line}
.mp-lines{display:flex;flex-direction:column}
.mp-contact{display:grid;gap:8px}
.mp-contact-row{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  align-items:start;
  gap:6px;
  overflow-wrap:anywhere;
}
.mp-icon{
  color:#4e70a8;
  font-size:1rem;
  line-height:1.25;
  text-align:center;
}
.mp-facts{display:grid;gap:10px}
.mp-facts>div{display:grid;gap:2px}
.mp-facts span{
  color:#8090aa;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.mp-facts strong{
  color:#536b94;
  font-size:.88rem;
  font-weight:500;
  overflow-wrap:anywhere;
}
.messages-layout,.messages-shell,.messages-main{min-height:0}

/* FINAL messaging right-profile layout */
.messages-page,
.messages-layout,
.messages-shell,
.messages-main{
  min-height:0!important;
}
.messages-layout{
  height:calc(100dvh - 82px)!important;
  max-height:calc(100dvh - 82px)!important;
  overflow:hidden!important;
}
.contact-panel{
  height:100%!important;
  max-height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.contact-profile{
  flex:0 0 auto!important;
  padding:24px 22px 18px!important;
  border-bottom:1px solid #dfe7f1!important;
}
.contact-details{
  flex:1 1 0!important;
  height:0!important;
  min-height:0!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  padding:14px 18px 80px!important;
  scrollbar-gutter:stable!important;
  -webkit-overflow-scrolling:touch;
}
.profile-card-section{
  margin:0 0 12px!important;
  padding:16px!important;
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
.profile-card-section h3{
  margin:0 0 13px!important;
  color:#10264b!important;
  font-size:.88rem!important;
  line-height:1.2!important;
  font-weight:750!important;
  text-transform:none!important;
  letter-spacing:0!important;
}
.profile-row{
  display:grid!important;
  grid-template-columns:25px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:start!important;
  padding:9px 0!important;
  border-top:1px solid #e8edf4!important;
}
.profile-row:first-of-type{border-top:0!important;padding-top:0!important}
.profile-row:last-child{padding-bottom:0!important}
.profile-row-icon{
  width:25px!important;
  color:#5575a6!important;
  font-size:1rem!important;
  line-height:1.3!important;
  text-align:center!important;
}
.profile-row>div{min-width:0!important}
.profile-row small{
  display:block!important;
  margin:0 0 2px!important;
  color:#8ba0c0!important;
  font-size:.67rem!important;
  line-height:1.2!important;
  font-weight:650!important;
  text-transform:uppercase!important;
  letter-spacing:.055em!important;
}
.profile-row span:not(.profile-row-icon){
  display:block!important;
  color:#263f68!important;
  font-size:.86rem!important;
  line-height:1.4!important;
  font-weight:500!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  white-space:pre-line!important;
}
.profile-copy{
  margin:0!important;
  color:#536b94!important;
  font-size:.86rem!important;
  line-height:1.5!important;
  white-space:pre-line!important;
  overflow-wrap:anywhere!important;
}
@media(max-width:900px){
  .messages-layout{height:auto!important;max-height:none!important;overflow:visible!important}
  .contact-panel{height:auto!important;max-height:none!important;overflow:visible!important}
  .contact-details{height:auto!important;overflow:visible!important;padding-bottom:32px!important}
}
