
/* Compact project members */
#aside .box:has(.td-members),
#aside .box:has(.td-chat){
  padding:16px;
}
#aside .box:has(.td-members)> .row,
#aside .box:has(.td-chat)> .row{
  flex-wrap:nowrap;
  gap:8px;
  margin-bottom:12px;
}
#aside .box:has(.td-members) h3,
#aside .box:has(.td-chat) h3{
  margin:0;
  font-size:15px;
}
#aside .box:has(.td-members)> .row button,
#aside .box:has(.td-chat)> .row button{
  padding:3px 9px;
}
.td-members{display:flex;flex-direction:column}
.td-member{
  display:flex;align-items:center;flex-wrap:nowrap;
  gap:5px;min-height:42px;padding:7px 0;
  border-bottom:1px solid var(--line);
}
.td-member:last-child{border-bottom:0}
.td-member-name{
  flex:1 1 auto;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:12px;
}
.td-member-role{
  flex:0 0 auto;font-size:9px;line-height:1.5;
  padding:3px 5px;border-radius:5px;
  color:var(--blue);background:var(--soft);white-space:nowrap;
}
#aside .td-member-edit{
  flex:0 0 auto;font-size:10px;
  padding:4px 5px;min-height:28px;border-radius:6px;
}
#aside .td-icon{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 26px;width:26px;height:28px;padding:0;
  border:0;border-radius:6px;background:transparent;
  color:var(--muted);font-size:19px;line-height:1;
}
#aside .td-remove:hover,
#aside .td-message-delete:hover{
  color:#bd2945;background:var(--soft);
}
#aside .td-add-member{
  margin-top:12px;padding:7px 10px;font-size:12px;
}

/* Chat adapted to Task's existing theme variables */
.td-chat{
  display:flex;flex-direction:column;min-height:0;
}
.td-chat-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:6px;padding-bottom:12px;border-bottom:1px solid var(--line);
}
#aside .td-chat-toolbar button{
  border:0;background:transparent;color:var(--muted);
  font-size:10px;padding:4px;
}
.td-messages{
  display:flex;flex-direction:column;gap:18px;
  min-height:140px;max-height:45vh;overflow-y:auto;
  padding:16px 2px;overscroll-behavior:contain;
}
.td-message{
  display:grid;grid-template-columns:28px minmax(0,1fr);
  gap:8px;flex-shrink:0;
}
.td-avatar{
  display:grid;place-items:center;
  width:28px;height:28px;border-radius:8px;
  font-size:10px;font-weight:600;
  background:var(--soft);color:var(--blue);
}
.td-message.is-mine .td-avatar{
  background:var(--bg);color:var(--muted);
}
.td-message-meta{
  display:flex;align-items:center;gap:5px;min-width:0;
}
.td-message-author{
  flex:1;min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;
  font-size:11px;font-weight:600;
}
.td-message-meta time{
  flex-shrink:0;font-size:9px;color:var(--muted);
}
#aside .td-message-delete{
  flex-basis:20px;width:20px;height:22px;font-size:15px;
}
.td-message-text{
  margin-top:4px;white-space:pre-wrap;
  overflow-wrap:anywhere;font-size:12px;line-height:1.65;
}
.td-empty{
  color:var(--muted);font-size:12px;text-align:center;
  padding:20px 5px;
}
#aside .td-history{
  border:0;background:var(--soft);color:var(--blue);
  padding:6px;font-size:10px;
}
.td-composer{
  display:flex;align-items:flex-end;gap:8px;
  padding:8px;border:1px solid var(--line);border-radius:10px;
  margin-top:10px;background:var(--panel);
}
.td-composer:focus-within{
  outline:2px solid var(--blue);outline-offset:2px;
}
#aside .td-composer textarea{
  flex:1;width:100%;min-width:0;min-height:38px;max-height:150px;
  padding:3px;border:0;border-radius:0;outline:0;
  background:transparent;resize:vertical;font-size:12px;
}
#aside .td-send{
  display:grid;place-items:center;flex:0 0 32px;
  width:32px;height:32px;padding:0;border:0;
  border-radius:8px;background:var(--blue);color:#fff;
}
.td-send svg{width:17px;height:17px}
.td-send:disabled{opacity:.5;cursor:wait}
.td-composer-note{
  margin-top:7px;font-size:9px;color:var(--muted);
}
