.pm_chat_list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pm_chat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--card-border-radius);
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--card-bg);
}

.pm_chat:hover {
    background-color: var(--btn-light-bg-hover);
}

.pm_chat_avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.pm_chat_avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.pm_badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: var(--color-red);
    border-radius: 50%;
}

.pm_chat_body {
    flex: 1;
    min-width: 0;
}

.pm_chat_header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.pm_chat_user {
    font-weight: 600;
    color: var(--color-title);
}

.pm_chat_date {
    font-size: 12px;
    opacity: 0.6;
    color: var(--color-text);
}

.pm_chat_message {
    font-size: 13px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text);
}

.pm_chat_checkbox {
    padding-left: 10px;
}



/* ================================= */
/* PM CHAT */
/* ================================= */

.pm-chat__messages{
flex:1 !important;
overflow-y:auto !important;
padding:14px !important;
display:flex !important;
flex-direction:column !important;
gap:14px !important;
}



/* ================================= */
/* MESSAGE */
/* ================================= */

.pm-msg{
display:flex !important;
gap:10px !important;
max-width:100% !important;
animation:pmMsg .25s ease !important;
}

.pm-msg--me{
flex-direction:row-reverse !important;
}



/* ================================= */
/* AVATAR */
/* ================================= */

.pm-msg__avatar{
flex-shrink:0 !important;
}

.pm-msg__avatar img{
width:40px !important;
height:40px !important;
border-radius:50% !important;
object-fit:cover !important;
}



/* ================================= */
/* MESSAGE BUBBLE */
/* ================================= */

.pm-msg__bubble{
background:#f1f3f5 !important;
border-radius:14px !important;
padding:10px 14px !important;
max-width:75% !important;
display:flex !important;
flex-direction:column !important;
gap:6px !important;
word-break:break-word !important;
}

.pm-msg--me .pm-msg__bubble{
background:#0d6efd !important;
color:#fff !important;
}



/* ================================= */
/* MESSAGE HEADER */
/* ================================= */

.pm-msg__header{
display:flex !important;
align-items:center !important;
gap:8px !important;
}

.pm-msg__name{
font-weight:600 !important;
font-size:14px !important;
}

.pm-msg__menu{
border:none !important;
background:none !important;
padding:0 !important;
color:inherit !important;
cursor:pointer !important;
}



/* ================================= */
/* MESSAGE TEXT */
/* ================================= */

.pm-msg__text{
font-size:14px !important;
line-height:1.4 !important;
}

.pm-msg__text img{
max-width:100% !important;
height:auto !important;
border-radius:8px !important;
}

.pm-msg__text iframe{
max-width:100% !important;
}



/* ================================= */
/* DATE */
/* ================================= */

.pm-msg__date{
font-size:12px !important;
opacity:.7 !important;
}



/* ================================= */
/* SEND BLOCK */
/* ================================= */

.pm-chat__send{
display:flex !important;
gap:10px !important;
padding:12px !important;
border-top:1px solid #eee !important;
align-items:center !important;
background:#fff !important;
}

.pm-chat__editor{
flex:1 !important;
min-width:0 !important;
}

.pm-chat__btn{
border:none !important;
background:#0d6efd !important;
color:#fff !important;
border-radius:10px !important;
padding:10px 14px !important;
display:flex !important;
align-items:center !important;
justify-content:center !important;
cursor:pointer !important;
transition:.15s !important;
}

.pm-chat__btn:hover{
background:#0b5ed7 !important;
}



/* ================================= */
/* MESSAGE ANIMATION */
/* ================================= */

@keyframes pmMsg{

from{
opacity:0 !important;
transform:translateY(6px) !important;
}

to{
opacity:1 !important;
transform:none !important;
}

}



/* ================================= */
/* CHATLIST */
/* ================================= */

.chatlist{
max-width:760px !important;
margin:auto !important;
}

.chatlist__header{
font-weight:700 !important;
font-size:18px !important;
margin-bottom:15px !important;
}

.chatlist__list table{
width:100% !important;
border-collapse:collapse !important;
}

.chatlist__list tbody{
display:block !important;
}

.chatlist__list tr{
display:flex !important;
align-items:center !important;
gap:12px !important;
padding:12px !important;
border-bottom:1px solid #eee !important;
transition:.15s !important;
cursor:pointer !important;
}

.chatlist__list tr:hover{
background:#f7f7f7 !important;
}

.chatlist__list td{
border:none !important;
padding:0 !important;
display:flex !important;
align-items:center !important;
}



/* аватар */

.chatlist__list img{
width:44px !important;
height:44px !important;
border-radius:50% !important;
object-fit:cover !important;
}



/* имя */

.chatlist__list a{
font-weight:600 !important;
text-decoration:none !important;
color:#111 !important;
}



/* превью */

.chatlist__list small{
display:block !important;
color:#888 !important;
font-size:13px !important;
margin-top:3px !important;
}



/* ================================= */
/* MOBILE */
/* ================================= */

@media (max-width:768px){

.pm-chat__messages{
padding:10px !important;
gap:12px !important;
}

.pm-msg__bubble{
max-width:85% !important;
font-size:14px !important;
}

.pm-msg__avatar img{
width:36px !important;
height:36px !important;
}

.pm-chat__send{
padding:10px !important;
}

.pm-chat__btn{
padding:9px 12px !important;
}

.chatlist{
max-width:100% !important;
}

.chatlist__list tr{
padding:10px !important;
gap:10px !important;
}

.chatlist__list img{
width:38px !important;
height:38px !important;
}

}



/* ================================= */
/* FIXES */
/* ================================= */

.pm-msg__text pre{
overflow:auto !important;
}

.pm-msg__text code{
word-break:break-word !important;
}

.pm-msg__text video{
max-width:100% !important;
}

.pm-msg__text table{
max-width:100% !important;
display:block !important;
overflow:auto !important;
}