/* Inbox list — restored canonical layout (the source rules were lost while
   the composer CSS was consolidated; collectstatic exposed the regression). */
.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;
  text-decoration:none;
}
.chat-inbox__avatar{
  width:40px;
  height:40px;
  flex:0 0 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{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:700;
}
.chat-inbox__date{
  opacity:.7;
  font-size:12px;
  white-space:nowrap;
}
.chat-inbox__product{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  opacity:.85;
}
.chat-inbox__text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:14px;
  opacity:.85;
}
.chat-inbox__text.is-unread{
  font-weight:700;
  opacity:1;
}
.chat-inbox__empty{
  list-style:none;
  opacity:.6;
  text-align:center;
  padding:24px 0;
  background:#fff;
  border-radius:12px;
}

@media (max-width:768px){
  .chat-inbox{
    width:100%;
    max-width:none;
    box-sizing:border-box;
    margin:16px auto 12px;
    padding:0 8px;
  }

  .chat-inbox__head{
    margin:0 0 8px;
    font-size:20px;
  }

  .chat-inbox__item{
    margin:5px 0;
    padding:9px 10px;
  }
}

/* Chat input layout. Message bubbles and thread live in dialog.css. */

@media (max-width: 768px) {
  .chat-page .chat-wrap {
    min-height: calc(100dvh - 86px);
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .chat-page .chat-thread {
    max-height: calc(100dvh - 222px);
    overflow-y: auto;
  }

  .chat-page .chat-form {
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 6000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .chat-page .chat-form textarea {
    min-width: 0;
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    box-sizing: border-box;
    resize: none;
    overflow-y: auto;
    padding: 10px 13px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    outline: none;
    font-size: 16px;
    line-height: 22px;
  }

  .chat-page .chat-form textarea:focus {
    border-color: rgba(31, 140, 104, 0.45);
    box-shadow: 0 0 0 3px rgba(31, 140, 104, 0.12);
  }

  .chat-page .chat-form button {
    height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: #1f8c68;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(31, 140, 104, 0.22);
  }

  .chat-page .chat-form button:active {
    transform: translateY(1px);
  }

  .chat-page .aiw-launcher {
    right: 12px;
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 769px) {
  .chat-page .chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: start;
    gap: 10px;
    margin-top: 10px;
  }

  .chat-page .chat-form textarea {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 180px;
    box-sizing: border-box;
    resize: vertical;
    overflow-y: auto;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 20px;
  }

  .chat-page .chat-form button {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
  }
}
