/* ============================================================
 * Messages.css — Messages.html 独立样式
 * ============================================================ */

/* 底色与 ActivityList 统一 */
html,
body {
            background: #f5f5f5;
        }
.tab-bar .tab-btn.active::after { background: #2196f3; opacity: 0.5; }
/* body 弹性布局：tab-bar + scroll-root 自然撑满视口 */
body {
            display: flex;
            flex-direction: column;
        }
/* 内容区：弹性占满剩余空间 */
#scroll-root {
            flex: 1;
            min-height: 0;
            margin-top: 0;
            padding-bottom: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-y: contain;
            display: flex;
            flex-direction: column;
            background: #f5f5f5; /* 覆盖 common.css 的渐变，与 ActivityList 统一 */
        }
/* 内容容器：左右间距与首页一致（0.31rem），宽屏 96vw 自适应 */
.container {
            margin-top: 0;
            padding: 0 0.31rem 0.52rem 0.31rem;
        }
@media (min-width: 1070px) {
            .container { max-width: 96vw; }
            /* 为底部备案栏 #home-filing-bar（约 0.72rem 高）预留空间，避免遮挡底部卡片 */
            #scroll-root { padding-bottom: 0.8rem; }
        }
button:focus,
        button:focus-visible,
        button:active:focus,
        *:focus {
            outline: none !important;
        }
/* iOS Safari 点击后焦点残留强力清除 */
        button, .quick-btn, .chat-item {
            -webkit-tap-highlight-color: transparent;
        }
.card {
            background: #fff;
            border-radius: 0.47rem;
            box-shadow: none;
            padding: 0.21rem 2px;
            margin-bottom: 0.52rem;
            flex-shrink: 0;
        }
.card:last-child {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
            margin-bottom: 0;
        }/* ====== 快捷入口图标（与我的界面工具图标一致） ====== */
        .quick-grid {display: grid;
            grid-template-columns: repeat(4, 1fr); 
            padding: 0.21rem 0.16rem;
            grid-column-gap: 0.16rem; grid-row-
        }/* ====== 快捷入口图标（与我的界面工具图标一致） ====== */
        .quick-grid > * + * { margin-left: 0.16rem; }
.quick-btn {display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center; 
            border-radius: 0.21rem;
            padding: 0.16rem 0.1rem;
            background: transparent;
            border: none;
            cursor: pointer;
            user-select: none;
            font-size: 0.29rem;
            color: #9e9e9e;
            min-height: 1.15rem;
        }
.quick-btn > * + * { margin-left: 0.1rem; }
.quick-btn > * + * { margin-top: 0.1rem; }
.quick-label { font-size: 0.29rem; color: #9e9e9e; }
.quick-icon {
            position: relative;
            width: 0.89rem;
            height: 0.89rem;
            border-radius: 50%;
            background: #f0f0f0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #333;
        }
.quick-icon svg {
            width: 0.64rem;
            height: 0.64rem;
            display: block;
        }
.quick-badge {
            position: absolute;
            top: 0;
            right: 0;
            transform: translate(50%, -50%);
            width: 0.42rem; height: 0.42rem;
            border-radius: 50%;
            background: #2196f3;
            color: #fff;
            font-size: 0.24rem; font-weight: bold;
            text-align: center;
            display: none;
            box-sizing: border-box;
            align-items: center;
            justify-content: center;
            line-height: 1;
            box-shadow: 0 0 0 0.02rem #fff; z-index: 2;
        }
.quick-badge.show { display: flex; }
/* ====== 聊天列表 ====== */
        .chat-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.chat-item {display: flex;
            align-items: center; 
            padding: 0.37rem 0.31rem;
            border-bottom: 1px solid #f4f4f4;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: background .12s;
        }
.chat-item > * + * { margin-left: 0.31rem; }
.chat-item > * + * { margin-left: 0.31rem; }
.chat-item:last-child { border-bottom: none; }
.chat-item:active { background: #f9f9f9; }
.chat-avatar {
            width: 1.15rem;
            height: 1.15rem;
            border-radius: 50%;
            background: #f0f0f0;
            color: #333;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.47rem;
            flex: 0 0 1.15rem;
            user-select: none;
        }
.chat-info {
            flex: 1 1 auto;
            min-width: 0;
        }
.chat-name {
            font-size: 0.37rem;
            font-weight: 500;
            color: #333;
            margin-bottom: 0.08rem;
        }
.chat-preview {
            font-size: 0.31rem;
            color: #b0b0b0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
.chat-meta {display: flex;
            flex-direction: column;
            align-items: flex-end; 
            flex: 0 0 auto;
        }
.chat-meta > * + * { margin-left: 0.16rem; }
.chat-meta > * + * { margin-top: 0.16rem; }
.chat-time {
            font-size: 0.29rem;
            color: #c0c0c0;
        }
.chat-badge {
            min-width: 0.37rem;
            height: 0.37rem;
            padding: 0 0.06rem;
            border-radius: 999px;
            background: #2196f3;
            color: #fff;
            font-size: 0.22rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            box-sizing: border-box;
            box-shadow: 0 0 0 0.02rem #fff; z-index: 2;
        }
.chat-empty {
            color: #b0b0b0;
            text-align: center;
            font-size: 0.31rem;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
        }
/* ====== 公告条（在线客服上方） ====== */
.announce-item {
            text-decoration: none;
            background: #fff;
        }
.announce-item .announce-avatar {
            background: #f0f0f0;
            font-size: 0.55rem;
        }
/* ====== 长按拖动排序 ====== */
.chat-item[data-sort-key] {
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            touch-action: pan-y;
        }
.chat-item.dragging {
            position: fixed !important;
            z-index: 1000;
            left: 0;
            transform: translateY(-50%);
            box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.2);
            background: #fff;
            opacity: 0.95;
            pointer-events: none;
            margin: 0;
        }
.chat-item.drag-placeholder {
            display: block;
            background: #fafafa;
            border: 1px dashed #ccc;
            border-radius: 0.21rem;
            box-sizing: border-box;
            padding: 0;
        }
body.drag-sorting {
            -webkit-user-select: none;
            user-select: none;
        }