/* =========================
   MESSAGES
========================= */

.messages-page {
    background: #f3f4f6;
    min-height: calc(100vh - 90px);
    padding: 40px 20px;
  }
  
  .messages-layout {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
  }
  
  .messages-sidebar,
  .messages-main {
    background: white;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
    border: 1px solid #eee;
  }
  
  .messages-sidebar {
    padding: 22px;
    height: 75vh;
    overflow-y: auto;
  }
  
  .messages-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .conversation-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 10px;
  }
  
  .conversation-item:hover {
    background: #f5f5f5;
  }
  
  .conversation-item img,
  .chat-user-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .messages-main {
    display: flex;
    flex-direction: column;
    height: 75vh;
  }
  
  .chat-header {
    padding: 22px;
    border-bottom: 1px solid #eee;
  }
  
  .chat-user-header {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  
  .messages-list {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #fafafa;
  }
  
  .message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 12px;
    line-height: 1.5;
  }
  
  .message-bubble.sent {
    background: var(--gold);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
  }
  
  .message-bubble.received {
    background: white;
    color: #111;
    margin-right: auto;
    border: 1px solid #eee;
    border-bottom-left-radius: 4px;
  }
  
  .message-form {
    display: flex;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid #eee;
  }
  
  .message-form input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #ddd;
  }
  
  @media (max-width: 850px) {
    .messages-layout {
      grid-template-columns: 1fr;
    }
  
    .messages-sidebar,
    .messages-main {
      height: auto;
    }
  
    .messages-main {
      min-height: 70vh;
    }
  }
  /* =========================
   NEW CHAT SEARCH
========================= */

.new-chat-search {
  margin-bottom: 18px;
  padding: 14px;
  background: #f8f8f8;
  border-radius: 16px;
  border: 1px solid #eee;
}

.new-chat-search input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
}

.user-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #eee;
}

.user-search-result img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.user-search-result div {
  flex: 1;
}

.user-search-result h3 {
  font-size: 15px;
  margin: 0;
}

.user-search-result p {
  font-size: 13px;
  color: #666;
  margin: 2px 0;
}

.user-search-result small {
  color: #888;
  font-size: 12px;
}

.start-chat-btn {
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}