body.has-chat {
    background-color: #f8f9fa;
}

.pointer {
    cursor: pointer;
}

.table-fixed-head thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.role-badge.user {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
}

.role-badge.admin {
    background: #6c757d;
    color: #fff;
}

.role-badge.manager {
    background: #0d6efd;
    color: #fff;
}

.chat-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 360px;
    z-index: 1020;
}

.chat-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    z-index: 1080;
}

.toast-container-fixed {
    position: fixed;
    right: 0;
    bottom: 0;
    padding: 1rem;
    z-index: 1080;
}

.chat-msg {
    max-width: 75%;
}

.chat-bubble {
    font-size: 0.9rem;
    line-height: 1.35;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    position: relative;
}

.chat-name {
    font-weight: 700;
    color: #0d6efd;
}

.msg-time {
    position: absolute;
    right: 0.5rem;
    top: 0.35rem;
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 0.78rem;
    color: #6c757d;
}

.chat-bubble:hover .msg-time {
    opacity: 0.85;
}

.chat-img {
    max-width: 340px;
    border-radius: 0.5rem;
    display: block;
}

.chat-dropzone.drag {
    background: #f8f9fa;
    border-color: #86b7fe;
    color: #0d6efd;
}

.chat-form .form-control,
.chat-form .btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.chat-form .chat-text {
    min-height: 38px;
    max-height: 120px;
    overflow: auto;
}

.chat-file-input {
    max-width: 220px;
}

@media (min-width: 992px) {
    body.has-chat {
        padding-right: 380px;
    }
}

.offcanvas-chat .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-preview img {
    max-width: 220px;
    border-radius: 0.5rem;
}

.toast-container-fixed .toast {
    min-width: 240px;
}
.comment-tree {
    border-left: 2px solid #e9ecef;
    padding-left: 12px;
}
.comment-node {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}
.comment-node .comment-header {
    font-size: 0.85rem;
}
.comment-node .comment-body {
    font-size: 0.92rem;
    line-height: 1.35;
}
