/* 聊天和通知样式 - 黑白简洁风格 */

/* ========== 加载动画居中 ========== */
.chat-rooms,
.chat-messages,
.notifications-list {
    position: relative;
    min-height: 200px;
}

/* Element Plus loading 遮罩层居中优化 */
.chat-rooms .el-loading-mask,
.chat-messages .el-loading-mask,
.notifications-list .el-loading-mask {
    background-color: rgba(255, 255, 255, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chat-rooms .el-loading-spinner,
.chat-messages .el-loading-spinner,
.notifications-list .el-loading-spinner {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
}

.chat-rooms .el-loading-spinner .circular,
.chat-messages .el-loading-spinner .circular,
.notifications-list .el-loading-spinner .circular {
    width: 50px !important;
    height: 50px !important;
}

.chat-rooms .el-loading-text,
.chat-messages .el-loading-text,
.notifications-list .el-loading-text {
    margin-top: 12px !important;
    font-size: 14px !important;
    color: #666 !important;
}

/* ========== 群聊列表 - 企业客服风格 ========== */
.chat-list-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 120px);
    background: #fff;
}

.chat-list-header {
    margin-bottom: 0;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.chat-list-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    letter-spacing: 0;
}

.chat-rooms {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
}

/* 电脑端：列表式布局（非卡片） */
@media (min-width: 769px) {
    .chat-room-card {
        background: #fff;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        padding: 16px 24px;
        margin-bottom: 0;
        cursor: pointer;
        transition: background 0.2s;
        display: flex;
        gap: 14px;
        align-items: center;
        box-shadow: none;
    }

    /* 官方客服群聊 - 左侧色条 */
    .chat-room-card.official-room {
        background: #fff;
        border-left: 3px solid #ff6b6b;
        border-bottom: 1px solid #f0f0f0;
        box-shadow: none;
    }

    .chat-room-card:hover {
        background: #f7f7f7;
        border-color: #f0f0f0;
        box-shadow: none;
        transform: none;
    }

    .chat-room-card:active {
        background: #f0f0f0;
        transform: none;
        box-shadow: none;
    }
}

/* 手机端：保持卡片样式 */
@media (max-width: 768px) {
    .chat-room-card {
        background: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 8px;
        padding: 14px 16px;
        margin: 8px 12px;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        gap: 12px;
        align-items: flex-start;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }

    .chat-room-card.official-room {
        background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
        border: 2px solid #ff6b6b;
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
    }

    .chat-room-card:hover {
        background: #fafafa;
        border-color: #d0d0d0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        transform: translateY(-1px);
    }

    .chat-room-card:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    }
}

.room-avatar-wrapper {
    flex-shrink: 0;
}

.room-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.room-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.status-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #07c160 0%, #05a850 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(7, 193, 96, 0.2);
}

.status-refunding {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.status-done {
    background: #f0f0f0;
    color: #999;
}

.status-official {
    background: linear-gradient(135deg, #07c160 0%, #05a850 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(7, 193, 96, 0.2);
    animation: pulse 2s infinite;
}

.status-busy {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.status-away {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.status-offline {
    background: #e0e0e0;
    color: #666;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.room-time {
    font-size: 13px;
    color: #999;
    flex-shrink: 0;
    font-weight: 400;
}

.room-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.room-message {
    flex: 1;
    min-width: 0;
}

.message-preview {
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    line-height: 1.5;
}

.room-amount {
    font-size: 18px;
    font-weight: 700;
    color: #ff4d4f;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.room-participants {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
}

.participant {
    display: flex;
    align-items: center;
    gap: 5px;
}

.divider {
    color: #d9d9d9;
    font-weight: 300;
}

.role-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    line-height: 1.2;
}

.buyer-badge {
    background: linear-gradient(135deg, #1989fa 0%, #0c7cd5 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(25, 137, 250, 0.3);
}

.seller-badge {
    background: linear-gradient(135deg, #ff976a 0%, #ff7a45 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(255, 151, 106, 0.3);
}

/* 官方标识 */
.official-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(255, 107, 107, 0.3);
}

.official-title {
    font-weight: 700;
    color: #ff6b6b;
}

.official-desc {
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 500;
}

/* 商品咨询样式 */
.consultation-badge {
    display: inline-block;
    background: linear-gradient(135deg, #67c23a 0%, #5daf34 100%);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(103, 194, 58, 0.3);
}

.consultation-title {
    font-weight: 700;
    color: #67c23a;
}

.consultation-room {
    border-left: 3px solid #67c23a !important;
}

/* 自定义群聊样式 */
.custom-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e6a23c 0%, #f39c12 100%);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 6px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(230, 162, 60, 0.3);
}

.custom-title {
    font-weight: 700;
    color: #e6a23c;
}

.status-consultation {
    background: linear-gradient(135deg, #67c23a 0%, #5daf34 100%);
    color: #fff;
}

/* 商品信息卡片 */
.product-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 12px 20px;
}

.product-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-card-image-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.product-card-image-wrapper:hover .product-card-image {
    transform: scale(1.05);
}

.product-card-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.product-card-info {
    flex: 1;
    min-width: 0;
}

.product-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-title:hover {
    color: #409eff;
}

.product-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #f56c6c;
}

/* 快捷回复 */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px 8px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.quick-reply-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 16px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-reply-btn:hover {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.quick-reply-btn:active {
    transform: translateY(0);
}

.chat-room-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-room-item:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.room-main {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.room-left {
    flex-shrink: 0;
}

.room-avatars {
    position: relative;
    width: 60px;
    height: 45px;
}

.room-avatars .avatar-buyer {
    position: absolute;
    left: 0;
    top: 0;
    border: 2px solid #fff;
    background: #f5f5f5;
}

.room-avatars .avatar-seller {
    position: absolute;
    right: 0;
    top: 0;
    border: 2px solid #fff;
    background: #f5f5f5;
}

.room-center {
    flex: 1;
    min-width: 0;
}

.room-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.order-no {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
}

.status-trading {
    background: #000;
    color: #fff;
}

.status-completed {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.product-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participants-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.participant-label {
    padding: 1px 6px;
    border-radius: 2px;
    font-weight: 500;
}

.participant-label.buyer {
    background: #000;
    color: #fff;
}

.participant-label.seller {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.participant-name {
    color: #666;
}

.participant-divider {
    color: #ddd;
}

.last-message {
    font-size: 13px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-right {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.room-right .time {
    font-size: 12px;
    color: #999;
}

.room-right .amount {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.unread-dot {
    background: #000;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    font-weight: 500;
}

/* 置顶标识 */
.chat-room-card.pinned {
    background: #fffbf0 !important;
}

/* 右键菜单 */
.context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 140px;
    padding: 6px 0;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background: #f5f5f5;
}

.context-menu-danger {
    color: #ff4d4f;
}

.context-menu-danger:hover {
    background: #fff1f0;
}

.context-menu-warning {
    color: #faad14;
}

.context-menu-warning:hover {
    background: #fffbe6;
}

.context-menu-disabled {
    color: #d9d9d9 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.context-menu-disabled:hover {
    background: #fafafa !important;
}

/* 删除消息按钮 */
.delete-message-btn {
    margin-left: 8px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.message-header:hover .delete-message-btn {
    opacity: 1;
}

.delete-message-btn:hover {
    background: #fff1f0;
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.delete-message-btn svg {
    fill: currentColor;
}

/* 已删除消息样式 */
.deleted-message {
    background: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    opacity: 0.7;
}

.my-message .deleted-message {
    background: #444 !important;
    border-color: #333 !important;
}

/* 消息右键菜单 */
.message-context-menu {
    min-width: 160px;
}

/* ========== 群聊对话 - 现代企业风格 ========== */
.chat-room-container {
    max-width: 100%;
    margin: 0 auto;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.chat-room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    background: #fff;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
}

.back-button:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.back-button svg {
    flex-shrink: 0;
}

.room-info {
    flex: 1;
}

.room-title-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.order-label {
    font-size: 12px;
    color: #666;
}

.order-number {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.order-status-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-paid {
    background: #e3f2fd;
    color: #1976d2;
}

.status-trading {
    background: #e8f5e9;
    color: #388e3c;
}

.status-completed {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-cancelled {
    background: #fafafa;
    color: #757575;
}

.status-refunding {
    background: #fff3e0;
    color: #f57c00;
}

.status-refunded {
    background: #ffebee;
    color: #c62828;
}

.room-subtitle {
    font-size: 13px;
    color: #666;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #f5f5f5;
    position: relative;
}

/* 新消息提示按钮 */
.new-message-notice {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    z-index: 100;
    transition: all 0.3s ease;
    user-select: none;
}

.new-message-notice:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.new-message-notice:active {
    transform: translateX(-50%) translateY(0px);
}

/* 淡入淡出动画 */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-enter-from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

.fade-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

.message-item {
    margin-bottom: 20px;
}

.system-message {
    text-align: center;
}

.system-content {
    display: inline-block;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    white-space: pre-wrap;
    line-height: 1.6;
}

.message-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.my-message .message-content {
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
    background: #f5f5f5;
}

.message-body {
    max-width: 60%;
    min-width: 100px;
}

.my-message .message-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.my-message .message-header {
    flex-direction: row-reverse;
}

.message-header .nickname {
    font-weight: 600;
    color: #333;
}

.role-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 500;
}

.buyer-badge {
    background: #000;
    color: #fff;
}

.seller-badge {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.admin-badge {
    background: #ff6b6b;
    color: #fff;
    font-weight: 600;
}

.message-header .time {
    color: #999;
    font-size: 11px;
}

.message-text {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    border-radius: 4px;
    word-wrap: break-word;
    line-height: 1.6;
    color: #333;
}

.my-message .message-text {
    background: #000;
    color: #fff;
    border-color: #000;
}

.message-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin-top: 6px;
    transition: transform 0.2s;
}

.message-image:hover {
    transform: scale(1.02);
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 2px solid #000;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-toolbar {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.toolbar-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-button:hover {
    background: #f5f5f5;
    border-color: #000;
}

.toolbar-button svg {
    flex-shrink: 0;
}

.emoji-picker {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.emoji-item {
    font-size: 24px;
    cursor: pointer;
    text-align: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: #f5f5f5;
}

.image-preview {
    position: relative;
    display: block;
    max-width: 200px;
    margin: 8px 12px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 8px;
}

.image-preview img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.remove-image {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-image:hover {
    background: #333;
}

.input-send-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.input-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
}

.message-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 42px;
    max-height: 120px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.message-input:focus {
    outline: none;
    border-color: #000;
}

.message-input::placeholder {
    color: #999;
}

.send-button {
    padding: 10px 24px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.send-button:hover:not(:disabled) {
    background: #333;
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ========== 通知中心 ========== */
.notifications-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #000;
}

.notifications-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.mark-read-button, .clear-all-button {
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-read-button:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.clear-all-button {
    border-color: #f56c6c;
    color: #f56c6c;
}

.clear-all-button:hover {
    background: #f56c6c;
    color: #fff;
    border-color: #f56c6c;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px;
    transition: all 0.2s;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.notification-item:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notification-item.unread {
    background: #fafafa;
    border-color: #000;
}

.notification-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex: 1;
    cursor: pointer;
}

.delete-notification-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-notification-btn:hover {
    background: #f5f5f5;
    color: #f56c6c;
}

.notification-type {
    flex-shrink: 0;
}

.type-badge {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 2px;
    font-weight: 500;
}

.type-order {
    background: #000;
    color: #fff;
}

.type-consultation {
    background: linear-gradient(135deg, #67c23a 0%, #5daf34 100%);
    color: #fff;
}

.type-task {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.type-message {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.type-system {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: #000;
    font-size: 15px;
    margin-bottom: 6px;
}

.notification-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.notification-time {
    color: #999;
    font-size: 12px;
}

.unread-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
}

/* ========== 手机端适配 ========== */
@media (max-width: 768px) {
    .chat-list-container,
    .notifications-container {
        padding: 0;
    }
    
    .chat-list-header {
        padding: 12px 16px;
        margin-bottom: 0;
    }
    
    .chat-rooms {
        background: #fff;
    }
    
    .chat-room-card {
        padding: 14px 16px;
    }
    
    .room-avatar-wrapper .el-avatar {
        width: 48px !important;
        height: 48px !important;
    }
    
    .product-name {
        font-size: 15px;
    }
    
    .room-time {
        font-size: 11px;
    }
    
    .message-preview {
        font-size: 13px;
    }
    
    .room-amount {
        font-size: 13px;
    }
    
    .room-participants {
        font-size: 11px;
    }
    
    .chat-list-header,
    .notifications-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
        flex-wrap: wrap;
    }
    
    .notifications-header > div {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }
    
    .chat-list-header h2,
    .notifications-header h2 {
        font-size: 20px;
        width: 100%;
    }
    
    .mark-read-button, .clear-all-button {
        padding: 8px 14px;
        font-size: 14px;
    }
    
    .chat-room-container {
        height: calc(100vh - 100px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .chat-room-header {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .product-info-card {
        padding: 10px 12px;
    }
    
    .product-card-content {
        gap: 10px;
    }
    
    .product-card-image-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .product-card-title {
        font-size: 13px;
    }
    
    .product-card-price {
        font-size: 15px;
    }
    
    .quick-replies {
        padding: 10px 12px 6px;
        gap: 6px;
    }
    
    .quick-reply-btn {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 12px;
    }
    
    .back-button {
        padding: 6px 10px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .back-button span {
        display: none;  /* 手机端隐藏"返回"文字，只显示图标 */
    }
    
    .room-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .room-title-main {
        gap: 8px;
        margin-bottom: 4px;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .order-label {
        font-size: 11px;
        flex-shrink: 0;
        padding: 4px 10px;
        border-radius: 4px;
    }
    
    .order-number {
        font-size: 14px;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 0 1 auto;
        max-width: 100%;
    }
    
    .order-status-badge {
        font-size: 12px;
        padding: 4px 10px;
        flex-shrink: 0;
        font-weight: 600;
    }
    
    .room-subtitle {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.4;
        color: #333;
        font-weight: 600;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    /* 移动端新消息提示 */
    .new-message-notice {
        bottom: 20px;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 18px;
    }
    
    .message-body {
        max-width: 75%;
    }
    
    .message-text {
        font-size: 14px;
    }
    
    .chat-input-area {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
        position: relative;
    }
    
    .input-toolbar {
        display: flex;
        gap: 6px;
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .toolbar-button {
        width: 32px;
        height: 32px;
    }
    
    .input-wrapper {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: flex-end;
    }
    
    .message-input {
        font-size: 15px;
        padding: 10px 12px;
        min-height: 42px;
        max-height: 100px;
        width: 100%;
    }
    
    .send-button {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 42px;
        width: auto;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .input-send-row {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }
    
    .chat-room-item {
        padding: 12px;
    }
    
    .room-main {
        gap: 12px;
    }
    
    .room-avatars {
        width: 55px;
        height: 40px;
    }
    
    .room-avatars .avatar-buyer,
    .room-avatars .avatar-seller {
        width: 40px;
        height: 40px;
    }
    
    .order-no {
        font-size: 14px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .room-right .amount {
        font-size: 15px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-text {
        font-size: 13px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .emoji-item {
        font-size: 20px;
    }
    
    .image-preview {
        max-width: 120px;
        max-height: 120px;
        margin: 6px 8px;
        padding: 3px;
    }
    
    .image-preview img {
        max-height: 100px;
    }
    
    .remove-image {
        width: 24px;
        height: 24px;
        font-size: 16px;
        border-width: 1px;
    }
    
    .message-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    .toolbar-button {
        width: 32px;
        height: 32px;
    }
}

/* ========== 滚动条样式 ========== */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========== 移动端适配 - 加载动画 ========== */
@media (max-width: 768px) {
    /* 移动端加载动画更小更精致 */
    .chat-rooms .el-loading-spinner .circular,
    .chat-messages .el-loading-spinner .circular,
    .notifications-list .el-loading-spinner .circular {
        width: 40px !important;
        height: 40px !important;
    }
    
    .chat-rooms .el-loading-text,
    .chat-messages .el-loading-text,
    .notifications-list .el-loading-text {
        font-size: 13px !important;
        margin-top: 10px !important;
    }
    
    /* 移动端容器最小高度调整 */
    .chat-rooms,
    .notifications-list {
        min-height: 150px;
    }
    
    .chat-messages {
        min-height: 300px;
    }
    
    /* 移动端聊天列表容器 */
    .chat-list-container {
        padding: 16px 12px;
        min-height: calc(100vh - 150px);
    }
    
    /* 移动端聊天窗口容器 */
    .chat-window-container {
        padding: 12px;
        min-height: calc(100vh - 120px);
    }
}

/* 超小屏幕适配（手机竖屏） */
@media (max-width: 480px) {
    .chat-rooms .el-loading-spinner .circular,
    .chat-messages .el-loading-spinner .circular,
    .notifications-list .el-loading-spinner .circular {
        width: 35px !important;
        height: 35px !important;
    }
    
    .chat-rooms .el-loading-text,
    .chat-messages .el-loading-text,
    .notifications-list .el-loading-text {
        font-size: 12px !important;
    }
}

/* 引用消息样式 */
.reply-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f7fa;
    border-left: 3px solid #409EFF;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.reply-preview-content {
    flex: 1;
    overflow: hidden;
}

.reply-preview-header {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #409EFF;
    margin-bottom: 4px;
    font-weight: 500;
}

.reply-preview-text {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    color: #909399;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.reply-preview-close:hover {
    color: #F56C6C;
    transform: scale(1.1);
}

.quoted-message {
    background-color: #f5f7fa;
    border-left: 3px solid #409EFF;
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 4px;
    max-width: 100%;
}

.quoted-message-header {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #409EFF;
    margin-bottom: 3px;
    font-weight: 500;
}

.quoted-message-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 消息高亮动画 */
.message-highlight {
    animation: highlightMessage 2s ease-in-out;
}

@keyframes highlightMessage {
    0% {
        background-color: rgba(64, 158, 255, 0.3);
        transform: scale(1);
    }
    50% {
        background-color: rgba(64, 158, 255, 0.2);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* 引用消息hover效果 */
.quoted-message:hover {
    background-color: #e6f2ff;
    border-left-color: #1890ff;
}
