.layui-container.user {
    margin: 30px auto 60px;
}


.user-avatar {
    border-radius: 50%;
}

/* ===== 页面标题和工具栏 ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 35px;
    background-color: #fff;
    padding: 30px 35px;
    border-radius: 20px
}

.page-header h2 {
    font-size: 26px;
    color: #2d3748;
    font-weight: 700;
}

.page-header h2 i {
    color: #1e9fff;
    margin-right: 10px;
}

.page-header .subtitle {
    color: #718096;
    font-size: 14px;
    font-weight: 400;
    margin-left: 10px;
}

.page-body {
    background-color: #fff;
    /*padding: 10px 0;*/
    border-radius: 10px;
}

.toolbar-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 18px 10px 42px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    width: 240px;
    transition: all 0.3s;
    background: white;
    outline: none;
}

.search-box input:focus {
    border-color: #1e9fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.filter-select {
    padding: 10px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    background: white;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
    color: #2d3748;
}

.filter-select:focus {
    border-color: #1e9fff;
}

.btn-primary-custom {
    padding: 10px 28px;
    background: linear-gradient(135deg, #1e9fff 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary-custom {
    padding: 10px 22px;
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-custom:hover {
    border-color: #1e9fff;
    color: #1e9fff;
    background: #f7fafc;
}

.user-stats {
    display: flex;
    gap: 50px;
}


.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 30px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
}

.stat-number.active {
    color: #48bb78;
}

.stat-number.warning {
    color: #ed8936;
}

.stat-label {
    font-size: 13px;
    color: #a0aec0;
    margin-top: 4px;
    font-weight: 500;
}


/* ========== 主容器 ========== */
.messaging-container {
    display: flex;
    height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}

/* ========== 左侧边栏 ========== */
.messaging-sidebar {
    width: 220px;
    background: #f7f8fa;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    transition: width 0.3s ease;
}

.messaging-sidebar .layui-nav-tree {
    background: transparent !important;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item > a {
    color: #555;
    padding: 10px 15px;
    font-size: 14px;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item > a:hover {
    color: #1e9fff;
    background: #f0f7ff;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item.layui-this > a {
    color: #1e9fff;
    background: #e8f0fe;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item.layui-this > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #1e9fff;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item .layui-icon {
    margin-right: 8px;
    font-size: 16px;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item .layui-badge {
    background: #FF5722;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    float: right;
    margin-top: 2px;
}

.messaging-sidebar .layui-nav-tree .layui-nav-item .layui-badge.hidden {
    display: none;
}

/* 子菜单 */
.messaging-sidebar .layui-nav-tree .layui-nav-child {
    background: #f8f9fc !important;
    border: none !important;
}

.messaging-sidebar .layui-nav-tree .layui-nav-child dd {
    border-bottom: 1px solid #f0f0f0;
}

.messaging-sidebar .layui-nav-tree .layui-nav-child dd > a {
    color: #666;
    padding: 8px 15px 8px 40px;
    font-size: 13px;
}

.messaging-sidebar .layui-nav-tree .layui-nav-child dd > a:hover {
    color: #1e9fff;
    background: #edf2f7;
}

.messaging-sidebar .layui-nav-tree .layui-nav-child dd.layui-this > a {
    color: #1e9fff;
    background: #e8f0fe;
}

.messaging-sidebar .layui-nav-tree .layui-nav-child dd.layui-this > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #1e9fff;
}

/* 侧边栏头部 */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.sidebar-header h3 .layui-icon {
    color: #1e9fff;
    margin-right: 8px;
}

.sidebar-header .toggle-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-header .toggle-btn:hover {
    background: #f0f2f5;
    color: #333;
}

/* ========== 用户信息 ========== */
.sidebar-user {
    padding: 16px 18px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e9fff, #0096e6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-user .user-info .name {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.sidebar-user .user-info .email {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 侧边栏底部 ========== */
.sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
    margin-top: auto;
}

/* ========== 右侧内容 ========== */
.messaging-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border-radius: 24px;
}

/* ========== 工具栏 ========== */
.content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-left .hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 4px 8px;
}

.toolbar-left h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.toolbar-left .count {
    font-size: 13px;
    color: #999;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-right .layui-input {
    height: 32px;
    width: 160px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 13px;
}

.toolbar-right .layui-input:focus {
    border-color: #1e9fff;
}

.toolbar-right .search-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 12px;
}

.toolbar-right .layui-select {
    height: 32px;
    line-height: 32px;
    padding: 0 25px 0 10px;
    border-radius: 4px;
    font-size: 13px;
    width: 120px;
}

.toolbar-right .layui-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.toolbar-right .layui-btn .layui-icon {
    font-size: 14px;
}

.toolbar-right .layui-btn-primary {
    background: #fff;
    border: 1px solid #e6e6e6;
    color: #555;
}

.toolbar-right .layui-btn-primary:hover {
    background: #f0f2f5;
    border-color: #ccc;
}

/* ========== 消息列表 ========== */
.message-list {
    flex: 1;
    overflow-y: auto;
}

.message-list .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #999;
}

.message-list .loading-state .layui-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #1e9fff;
}

.message-list .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #999;
}

.message-list .empty-state .layui-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d0d4dd;
}

.message-list .empty-state h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 6px;
}

.message-list .empty-state p {
    font-size: 14px;
}

/* ===== 消息项 ===== */
.message-item {
    display: flex;
    align-items: stretch;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: background 0.2s;
}

.message-item:hover {
    background: #f7f8fa;
}

.message-item.unread {
    background: #f0f7ff;
}

.message-item.unread:hover {
    background: #e5f0ff;
}

.message-item .msg-checkbox {
    display: flex;
    align-items: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.message-item .msg-checkbox .layui-form-checkbox {
    margin: 0;
}

.message-item .msg-body {
    flex: 1;
    min-width: 0;
}

.message-item .msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.message-item .msg-sender {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.message-item .msg-recipient {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.message-item .msg-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.message-item .msg-subject {
    font-size: 14px;
    color: #333;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.message-item .msg-subject .unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #1e9fff;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.message-item .msg-preview {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-item .msg-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 16px;
}

.message-item .msg-priority {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.message-item .msg-priority.low {
    background: #e8f5e9;
    color: #2e7d32;
}

.message-item .msg-priority.medium {
    background: #fff3e0;
    color: #e65100;
}

.message-item .msg-priority.high {
    background: #ffebee;
    color: #c62828;
}

.message-item .msg-priority.urgent {
    background: #dc3545;
    color: #fff;
}

.message-item .msg-reply-count {
    font-size: 12px;
    color: #999;
}

.message-item .msg-reply-indicator {
    font-size: 12px;
    color: #1e9fff;
    margin-right: 4px;
}

.message-item .msg-attachment {
    font-size: 12px;
    color: #999;
    margin-right: 4px;
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========== 分页 ========== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
    background: #fff;
}

.pagination-wrapper .page-info {
    font-size: 13px;
    color: #666;
    margin: 0 16px;
}

.pagination-wrapper .layui-btn {
    height: 30px;
    line-height: 30px;
    padding: 0 14px;
    font-size: 13px;
}

.pagination-wrapper .layui-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   LayUI layer 右侧弹出详情样式
   ============================================================ */
.layui-layer-page .layui-layer-content {
    padding: 0 !important;
    overflow: hidden !important;
}

/* 详情内容 */
.detail-content-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* ===== 详情头部 ===== */
.detail-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
    background: #fff;
}

.detail-header-custom h3 {
    font-size: 16px;
    color: #1a1a2e;
    margin: 0;
}

.detail-header-custom h3 .layui-icon {
    color: #1e9fff;
    margin-right: 8px;
}

/* ===== 详情主体 ===== */
.detail-body-custom {
    flex: 1;
    overflow-y: auto;
    padding: 24px 24px 12px 24px;
}


/* ===== 回复区域 ===== */
#replyAreaInDetail {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e8eaed;
}

#replyAreaInDetail .reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#replyAreaInDetail .reply-header h5 {
    margin: 0;
    color: #333;
    font-size: 15px;
}

#replyAreaInDetail .reply-header h5 .layui-icon {
    color: #1e9fff;
    margin-right: 6px;
}

#replyAreaInDetail .reply-original {
    background: #f8f8f8;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #1e9fff;
    font-size: 13px;
    color: #666;
    max-height: 100px;
    overflow-y: auto;
}

#replyAreaInDetail .reply-original .original-subject {
    font-weight: 500;
    color: #333;
}

#replyAreaInDetail .reply-original .original-sender {
    color: #999;
    font-size: 12px;
    margin: 4px 0;
}

#replyAreaInDetail .reply-original .original-content {
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 6px;
    color: #555;
    max-height: 60px;
    overflow-y: auto;
    font-size: 13px;
}

#replyAreaInDetail .reply-input-wrapper {
    position: relative;
}

#replyAreaInDetail .reply-input-wrapper .layui-textarea {
    min-height: 100px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
}

#replyAreaInDetail .reply-input-wrapper .layui-textarea:focus {
    border-color: #1e9fff;
}

#replyAreaInDetail .reply-input-wrapper .char-count {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 12px;
    color: #999;
    pointer-events: none;
}

#replyAreaInDetail .reply-input-wrapper .char-count.warning {
    color: #FF5722;
}

#replyAreaInDetail .reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

#replyAreaInDetail .reply-actions .layui-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 16px;
    font-size: 13px;
}

.reply-success {
    display: none;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 6px;
    color: #2e7d32;
    text-align: center;
    margin-top: 12px;
}

.reply-success.show {
    display: block;
}

.reply-success .layui-icon {
    font-size: 18px;
    margin-right: 8px;
}

/* ============================================================
   消息详情样式
   ============================================================ */

.detail-msg {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f2f5;
    transition: all 0.3s;
}

/* ===== 详情头部 ===== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}

.detail-sender-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

/* 发件人头像 */
.sender-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #1e9fff, #0096e6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sender-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sender-avatar .avatar-text {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

/* 发送者详情 */
.sender-detail {
    flex: 1;
    min-width: 0;
}

.sender-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sender-name strong {
    font-size: 16px;
    color: #1a1a2e;
    font-weight: 600;
}

.sender-badge {
    display: inline-block;
    padding: 1px 10px;
    background: #e8f0fe;
    color: #1e9fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.sender-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.sender-email {
    font-size: 12px;
    color: #999;
}

.sender-time {
    font-size: 12px;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* 优先级标签 */
.detail-priority-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    margin-top: 4px;
}

.detail-priority-tag.low {
    background: #e8f5e9;
    color: #2e7d32;
}

.detail-priority-tag.medium {
    background: #fff3e0;
    color: #e65100;
}

.detail-priority-tag.high {
    background: #ffebee;
    color: #c62828;
}

.detail-priority-tag.urgent {
    background: #dc3545;
    color: #fff;
}

/* ===== 收件人信息 ===== */
.detail-recipient {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #f8f9fc;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.detail-recipient .layui-icon {
    color: #999;
    font-size: 16px;
    margin-right: 4px;
}

.detail-recipient .label {
    color: #999;
    margin-right: 2px;
}

.detail-recipient .recipient-name {
    font-weight: 500;
    color: #333;
}

.detail-recipient .recipient-email {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

.detail-recipient .recipient-email::before {
    content: '<';
}

.detail-recipient .recipient-email::after {
    content: '>';
}

/* ===== 主题 ===== */
.detail-subject {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    flex-wrap: wrap;
}

.detail-subject .layui-icon {
    color: #999;
    font-size: 16px;
    margin-right: 4px;
}

.detail-subject .label {
    color: #999;
    margin-right: 2px;
}

.detail-subject .subject-text {
    font-weight: 500;
    color: #1a1a2e;
}

/* ===== 分割线 ===== */
.detail-divider {
    height: 1px;
    background: #f0f2f5;
    margin: 14px 0 16px 0;
}

/* ===== 内容 ===== */
.detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 4px 0;
    min-height: 60px;
}

/* ============================================================
   对话记录样式（完整版）
   ============================================================ */

.detail-conversation {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}

.detail-conversation .conv-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.detail-conversation .conv-title .layui-icon {
    color: #1e9fff;
    font-size: 18px;
}

.detail-conversation .conv-title .conv-count {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-left: auto;
}

/* ===== 对话项 ===== */
.detail-conversation .conv-item {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border-left: 3px solid #e8eaed;
    transition: all 0.2s;
}

.detail-conversation .conv-item-active {
    background: #f0f2f5;
    border-left-color: #1e9fff;
}

.detail-conversation .conv-item:hover {
    background: #f0f2f5;
    border-left-color: #1e9fff;
}

.detail-conversation .conv-item:last-child {
    margin-bottom: 0;
}

/* ===== 对话头部 ===== */
.detail-conversation .conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-conversation .conv-sender-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-conversation .conv-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1e9fff, #0096e6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.detail-conversation .conv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%
}


.detail-conversation .conv-sender-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.detail-conversation .conv-sender {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.detail-conversation .conv-role {
    display: inline-block;
    padding: 0 8px;
    background: #e8f0fe;
    color: #1e9fff;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
}

.detail-conversation .conv-date {
    font-size: 12px;
    color: #bbb;
    flex-shrink: 0;
}

/* ===== 对话收件人 ===== */
.detail-conversation .conv-recipient {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0 4px 42px;
    font-size: 12px;
    color: #999;
}

.detail-conversation .conv-recipient .layui-icon {
    font-size: 14px;
    color: #bbb;
    margin-right: 2px;
}

.detail-conversation .conv-recipient .recipient-name {
    color: #666;
    font-weight: 500;
}

.detail-conversation .conv-recipient .recipient-email {
    color: #bbb;
    font-size: 11px;
}

.detail-conversation .conv-recipient .recipient-email::before {
    content: '<';
}

.detail-conversation .conv-recipient .recipient-email::after {
    content: '>';
}

/* ===== 对话主题 ===== */
.detail-conversation .conv-subject {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 0 3px 42px;
    font-size: 13px;
    color: #555;
}

.detail-conversation .conv-subject .layui-icon {
    font-size: 14px;
    color: #bbb;
    margin-right: 2px;
}

.detail-conversation .conv-subject .subject-text {
    font-weight: 500;
    color: #333;
}

/* ===== 对话分割线 ===== */
.detail-conversation .conv-divider {
    height: 1px;
    background: #e8eaed;
    margin: 8px 0 8px 42px;
}

/* ===== 对话内容 ===== */
.detail-conversation .conv-content {
    padding-left: 42px;
    font-size: 13px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================================
   底部操作栏（固定在底部）
   ============================================================ */
.detail-footer-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 10;
    min-height: 56px;
}

.detail-footer-custom .detail-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 13px;
}

.detail-footer-custom .detail-footer-left .reply-count-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-footer-custom .detail-footer-left .reply-count-info .layui-icon {
    font-size: 16px;
}

.detail-footer-custom .detail-footer-right {
    display: flex;
    gap: 8px;
}

.detail-footer-custom .detail-footer-right .layui-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 16px;
    font-size: 13px;
}

/* 底部操作栏动画 */
.detail-footer-custom {
    animation: slideUpFooter 0.3s ease;
}

@keyframes slideUpFooter {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== 弹窗样式 ===== */
.modal-content {
    padding: 25px 30px;
}

.modal-content h3 {
    color: #2d3748;
    margin-bottom: 6px;
}

.modal-content .modal-desc {
    color: #a0aec0;
    font-size: 14px;
    margin-bottom: 20px;
}


@media (max-width: 768px) {
    .messaging-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    }

    .messaging-sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 99;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .toolbar-left .hamburger-btn {
        display: block;
    }

    .content-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px;
    }

    .toolbar-left {
        justify-content: center;
    }

    .toolbar-right {
        justify-content: center;
    }

    .message-item {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .message-item .msg-meta {
        margin-left: 30px;
        margin-top: 4px;
    }

    .toolbar-right .layui-input {
        width: 100px;
    }

    .detail-footer-custom {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }

    .detail-footer-custom .detail-footer-left {
        width: 100%;
        justify-content: center;
    }

    .detail-footer-custom .detail-footer-right {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .toolbar-right .layui-btn span {
        display: none;
    }

    .toolbar-right .layui-select {
        width: 90px;
        font-size: 12px;
    }

    .message-item .msg-header {
        flex-wrap: wrap;
        gap: 4px;
    }

    .message-item .msg-date {
        font-size: 11px;
    }
}


@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

