.chat-inbox{max-width:980px;margin:92px auto 16px;padding:0 12px}
.chat-inbox__head{font-size:20px;font-weight:700;margin-bottom:8px}
.chat-inbox__list{list-style:none;margin:0;padding:0}
.chat-inbox__item{border-radius:12px;background:#fff;margin:6px 0;padding:10px}
.chat-inbox__link{display:flex;gap:10px;align-items:center;color:inherit}
.chat-inbox__avatar{width:40px;height:40px;border-radius:999px;background:#e5e7eb;display:flex;align-items:center;justify-content:center;font-weight:700}
.chat-inbox__main{flex:1;min-width:0}
.chat-inbox__row{display:flex;justify-content:space-between;gap:10px}
.chat-inbox__name{font-weight:700}
.chat-inbox__date{opacity:.7;font-size:12px;white-space:nowrap}
.chat-inbox__product{font-size:13px;opacity:.85}
.chat-inbox__text{font-size:14px;opacity:.85}
.chat-inbox__text.is-unread{font-weight:700;opacity:1}
.chat-inbox__empty{opacity:.6;text-align:center;padding:24px 0;background:#fff;border-radius:12px}

.chat{max-width:980px;margin:92px auto 16px;padding:0 12px}
.chat__topbar{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.chat__title{font-weight:700;font-size:18px}

.chat__product{background:#fff;border-radius:12px;padding:10px;margin-bottom:8px;display:flex;justify-content:space-between}
.chat__product-title{font-weight:600}
.chat__product-link{font-size:14px;text-decoration:underline}

.chat__feed{background:#fff;border-radius:14px;padding:12px;max-height:65vh;overflow:auto;box-shadow:0 4px 20px rgba(0,0,0,.05)}
.bubble{max-width:76%;margin:8px 0;padding:10px 12px;border-radius:18px;line-height:1.35;word-wrap:break-word;box-shadow:0 2px 10px rgba(0,0,0,.06)}
.bubble--them{background:#f2f5f9;border-top-left-radius:6px}
.bubble--me{background:#dff7e6;border-top-right-radius:6px;margin-left:auto}
.bubble__meta{opacity:.6;font-size:12px;margin-top:6px}

.chat__form{display:flex;gap:8px;align-items:flex-end;margin-top:10px}
.chat__form textarea{flex:1;padding:10px;border-radius:10px;border:1px solid #ddd;resize:vertical}
.chat__form button{padding:10px 14px;border-radius:10px;border:0;background:#2a965a;color:#fff;cursor:pointer}

@media (max-width:768px){
  .bubble{max-width:88%}
}

/* лента — запас снизу, чтобы форма не перекрывала */
.chat__feed{ padding-bottom:80px; }

/* форма: компактно, по центру */
.chat__form{
  position: sticky;      /* приятно липнет у низа экрана */
  bottom: 0;
  background:#fff;
  display:flex;
  gap:8px;
  align-items:flex-end;
  margin:10px auto 0;    /* центрируем */
  padding:10px 0;
  max-width:720px;       /* ОГРАНИЧИВАЕМ ширину формы */
}

/* textarea: контролируем размеры */
.chat__form textarea{
  flex:1;
  width:100%;
  min-height:44px;
  max-height:160px;
  padding:10px;
  border-radius:10px;
  border:1px solid #ddd;
  resize:vertical;
}

/* кнопка — компактная */
.chat__form button{
  padding:10px 14px;
  border-radius:10px;
  border:0;
  background:#2a965a;
  color:#fff;
  cursor:pointer;
}

.chat__feed{ padding-bottom:80px; }

.chat__form{
  position: sticky; bottom:0; background:#fff;
  display:flex; gap:8px; align-items:flex-end;
  margin:10px auto 0; padding:10px 0; max-width:720px;
}
.chat__form textarea{
  flex:1; width:100%; min-height:44px; max-height:160px;
  padding:10px; border-radius:10px; border:1px solid #ddd; resize:vertical;
}
.chat__form button{
  padding:10px 14px; border-radius:10px; border:0; background:#2a965a; color:#fff; cursor:pointer;
}

