/* ============================================================
   微聊 - 全局样式 v2（精致微信风格 · 移动优先）
   ============================================================ */
:root {
    --bg: #f2f2f2;
    --bg-chat: #ededed;
    --card: #ffffff;
    --primary: #07c160;
    --primary-grad: linear-gradient(135deg, #07c160 0%, #05a852 100%);
    --primary-soft: #e8f8ef;
    --text: #1a1a1a;
    --text-sub: #999999;
    --text-light: #b8b8b8;
    --line: #ececec;
    --red: #fa5151;
    --nav-h: 48px;
    --shadow: 0 2px 12px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .14);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    height: 100%;
}
a { text-decoration: none; color: inherit; }
img { border: none; display: block; }
button { font-family: inherit; }
input, textarea { font-family: inherit; }

/* ============ 登录页 ============ */
.login-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #e9f9f0 0%, #f5f5f5 45%, #eef1f5 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-body::before, .login-body::after {
    content: ''; position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(7, 193, 96, .14) 0%, transparent 70%);
}
.login-body::before { width: 420px; height: 420px; top: -140px; right: -120px; }
.login-body::after { width: 380px; height: 380px; bottom: -160px; left: -100px; }
.login-wrap { position: relative; z-index: 2; width: 100%; max-width: 400px; padding: 28px; text-align: center; }
.login-logo-icon {
    width: 76px; height: 76px; margin: 0 auto 14px;
    background: var(--primary-grad); border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px rgba(7, 193, 96, .4);
    animation: logoFloat 3.2s ease-in-out infinite;
}
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.chat-bubble-icon {
    width: 34px; height: 26px; background: #fff; border-radius: 9px;
    position: relative; display: block;
}
.chat-bubble-icon::after {
    content: ''; position: absolute; left: 9px; bottom: -7px;
    border: 7px solid transparent; border-top-color: #fff; border-bottom: none;
}
.login-logo h1 { font-size: 30px; font-weight: 700; letter-spacing: 3px; background: linear-gradient(135deg, #07c160, #028a45); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-sub { color: var(--text-sub); font-size: 13px; margin-top: 6px; letter-spacing: 1px; }
.login-announce {
    margin: 20px 0 16px; padding: 11px 15px; background: rgba(255, 251, 230, .9);
    color: #8a6d3b; border: 1px solid #f5e9c8; border-radius: 10px;
    font-size: 12.5px; line-height: 1.6; text-align: left; backdrop-filter: blur(4px);
}
.login-announce .la-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: #7a5d1e; }
.login-card {
    background: var(--card); border-radius: 18px; padding: 26px 24px 22px;
    box-shadow: var(--shadow-lg); text-align: left;
    animation: cardIn .5s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.login-tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.login-tabs .tab {
    flex: 1; padding: 10px 0; text-align: center; font-size: 15px; color: var(--text-sub);
    border-bottom: 2px solid transparent; cursor: pointer; transition: all .25s; position: relative;
}
.login-tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.login-form .input-group { margin-bottom: 14px; position: relative; }
.login-form input {
    width: 100%; height: 48px; padding: 0 15px; border: 1.5px solid #e8e8e8;
    border-radius: 12px; font-size: 15px; outline: none; background: #f8f8f8;
    transition: all .25s;
}
.login-form input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(7, 193, 96, .12); }
.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; }
.btn-sms {
    height: 48px; padding: 0 16px; border: none; border-radius: 12px;
    background: #f0f0f0; color: var(--text-sub); font-size: 13px; cursor: pointer;
    white-space: nowrap; transition: all .2s;
}
.btn-sms:active { background: #e2e2e2; }
.btn-login {
    width: 100%; height: 48px; border: none; border-radius: 12px;
    background: var(--primary-grad); color: #fff; font-size: 16px; font-weight: 600;
    cursor: pointer; margin-top: 8px; transition: all .2s; letter-spacing: 2px;
    box-shadow: 0 6px 16px rgba(7, 193, 96, .3);
}
.btn-login:active { transform: scale(.98); box-shadow: 0 3px 8px rgba(7, 193, 96, .3); }
.login-tip { color: var(--text-sub); font-size: 12px; margin-top: 16px; text-align: center; }
.login-ver { color: #cfcfcf; font-size: 12px; margin-top: 26px; text-align: center; }

/* ============ Toast ============ */
.toast {
    position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9);
    background: rgba(0, 0, 0, .78); color: #fff; padding: 12px 24px;
    border-radius: 12px; font-size: 14px; z-index: 9999; backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none; transition: all .25s cubic-bezier(.2, .9, .3, 1.3);
    max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ============ 主框架 ============ */
.app-body { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
.app-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; max-width: 520px; margin: 0 auto;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.app-nav .nav-title { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.app-nav .nav-actions { display: flex; gap: 16px; color: var(--text); }
.app-nav .nav-actions .nav-icon { width: 26px; height: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; }
.app-body .page { padding-top: var(--nav-h); padding-bottom: 60px; }

/* 底部 Tab */
.app-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, .05);
    display: flex; max-width: 520px; margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom);
}
.app-tabbar .tab-item {
    flex: 1; padding: 6px 0 8px; text-align: center; color: var(--text-sub);
    font-size: 10.5px; cursor: pointer; position: relative; transition: color .2s;
    -webkit-user-select: none; user-select: none;
}
.app-tabbar .tab-item svg { width: 25px; height: 25px; margin: 0 auto 2px; display: block; fill: currentColor; }
.app-tabbar .tab-item.active { color: var(--primary); }
.app-tabbar .tab-item:active { opacity: .7; }
.app-tabbar .tab-badge {
    position: absolute; top: 1px; left: 56%; min-width: 17px; height: 17px;
    background: var(--red); color: #fff; border-radius: 9px;
    font-size: 10px; line-height: 17px; padding: 0 5px; font-style: normal;
    box-shadow: 0 0 0 2px #fff; animation: badgePop .3s;
}
@keyframes badgePop { from { transform: scale(.4); } to { transform: scale(1); } }

/* ============ 会话列表 ============ */
.conv-list { list-style: none; }
.conv-item {
    display: flex; align-items: center; padding: 13px 16px; background: var(--card);
    border-bottom: 1px solid #f5f5f5; cursor: pointer; position: relative;
    transition: background .15s;
    /* #1 修复：去掉入场动画——每次新消息触发列表重建时所有项重播动画，视觉上像“刷新”，改为只更新角标无动画 */
}
@keyframes itemIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.conv-item:active { background: #f4f4f4; }
.conv-avatar {
    width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff; font-weight: 600; position: relative;
    overflow: hidden;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 群聊 2x2 头像组 */
.conv-avatar.ga { background: transparent; }
.gav-grid { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.5px; }
.gav { border-radius: 3px; overflow: hidden; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; }
.conv-top-mark { font-size: 9px; color: #fff; background: #07c160; border-radius: 3px; padding: 0 3px; margin-left: 6px; transform: scale(.92); flex-shrink: 0; }
.conv-mute-mark { font-size: 9px; color: #999; background: #eee; border-radius: 3px; padding: 0 3px; margin-left: 4px; transform: scale(.92); flex-shrink: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: center; }
.conv-name { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-top .conv-name { flex-shrink: 0; max-width: 58%; }
.conv-time { font-size: 11px; color: var(--text-light); flex-shrink: 0; margin-left: auto; padding-left: 6px; }
.conv-last { font-size: 13px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.conv-last .last-prefix { color: var(--text-light); }
.conv-unread {
    position: absolute; right: 14px; bottom: 14px; min-width: 19px; height: 19px;
    background: var(--red); color: #fff; border-radius: 10px; font-size: 11px;
    line-height: 19px; text-align: center; padding: 0 6px; font-style: normal;
    box-shadow: 0 2px 6px rgba(250, 81, 81, .4);
}

/* 搜索条 */
.search-bar {
    margin: 10px 12px; padding: 0 14px; height: 38px; border-radius: 19px;
    background: #fff; display: flex; align-items: center; gap: 8px;
    color: var(--text-light); font-size: 14px; box-shadow: var(--shadow);
}
.search-bar input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; }
.search-bar .search-btn { border: none; background: var(--primary-grad, #07c160); color: #fff; font-size: 13px; font-weight: 600; border-radius: 6px; padding: 6px 14px; margin-left: 8px; flex-shrink: 0; }

.empty-page {
    text-align: center; color: var(--text-sub); padding: 90px 24px; font-size: 14px;
    animation: itemIn .4s ease both;
}
.empty-page .empty-icon {
    width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%;
    background: linear-gradient(135deg, #e8f8ef, #f0f7ff); display: flex;
    align-items: center; justify-content: center; font-size: 44px;
}

/* ============ 聊天页 ============ */
.chat-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: var(--bg-chat); }
/* 问题2：页面打开过渡（避免像打开网页一样生硬） */
.chat-page, .sub-page { animation: pageIn .22s ease; }
@keyframes pageIn { from { opacity: .45; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
.chat-header {
    height: var(--nav-h); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    display: flex; align-items: center; padding: 0 8px; flex-shrink: 0; z-index: 10;
}
.chat-header .back {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); border-radius: 50%; transition: background .2s;
}
.chat-header .back:active { background: rgba(0, 0, 0, .05); }
.chat-header .back svg { width: 22px; height: 22px; fill: currentColor; }
.chat-header .title-wrap { flex: 1; text-align: center; min-width: 0; cursor: pointer; }
.chat-header .title { font-size: 16.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header .title-sub { font-size: 10.5px; color: var(--text-light); margin-top: -1px; }
.chat-header .more {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%; transition: background .2s; color: var(--text);
}
.chat-header .more:active { background: rgba(0, 0, 0, .05); }
.chat-header .more svg { width: 21px; height: 21px; fill: currentColor; }

.chat-body {
    flex: 1; overflow-y: auto; padding: 16px 12px 8px; -webkit-overflow-scrolling: touch;
    background: var(--bg-chat);
}
.msg-time-divider {
    text-align: center; font-size: 11px; color: #b5b5b5; margin: 14px 0;
    background: rgba(0, 0, 0, .04); display: inline-block; padding: 3px 12px;
    border-radius: 8px; width: 100%;
}
.msg-row { display: flex; margin-bottom: 16px; align-items: flex-start; animation: msgIn .3s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.msg-row.me { flex-direction: row-reverse; }
.msg-avatar { width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-avatar .no-avatar {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; color: #fff; font-size: 16px; font-weight: 600;
}
.msg-content-wrap { max-width: 70%; margin: 0 10px; min-width: 0; }
.msg-nick { font-size: 11px; color: #b0b0b0; margin-bottom: 3px; padding: 0 2px; }
.msg-row.me .msg-nick { text-align: right; }
.msg-bubble {
    padding: 10px 13px; border-radius: 8px; font-size: 15.5px; line-height: 1.5;
    background: var(--card); word-break: break-word; position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.msg-row.other .msg-bubble::before {
    content: ''; position: absolute; left: -7px; top: 14px;
    border: 7px solid transparent; border-right-color: var(--card); border-left: none;
}
.msg-row.me .msg-bubble { background: #a8d8f9; }
.msg-row.other .msg-bubble { background: var(--card); }
.msg-row.me .msg-bubble::after {
    content: ''; position: absolute; right: -7px; top: 14px;
    border: 7px solid transparent; border-left-color: #95ec69; border-right: none;
}
.msg-bubble img.msg-img { max-width: 150px; max-height: 200px; width: auto; height: auto; border-radius: 6px; display: block; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.msg-bubble .msg-recalled { color: #b0b0b0; font-size: 13px; font-style: italic; }
.msg-time-divider.recall-note span { color: #999; }
.msg-bubble .msg-reply {
    background: rgba(0, 0, 0, .05); border-left: 3px solid var(--primary);
    padding: 6px 9px; border-radius: 4px; font-size: 12px; color: var(--text-sub);
    margin-bottom: 6px; cursor: pointer; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.msg-bubble .msg-sticker { width: 130px; height: 130px; object-fit: contain; cursor: pointer; }
.msg-time { font-size: 10px; color: #c8c8c8; align-self: center; padding: 0 2px; }

/* 图片查看弹层 */
.img-viewer {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 300;
    display: flex; align-items: center; justify-content: center; opacity: 0;
    transition: opacity .25s; pointer-events: none;
}
.img-viewer.show { opacity: 1; pointer-events: auto; }
.img-viewer img { max-width: 94%; max-height: 90%; border-radius: 6px; }
.img-save {
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 13px;
    padding: 8px 18px; border-radius: 18px; cursor: pointer; z-index: 301;
    text-decoration: none;
}
.img-save:hover { background: rgba(255, 255, 255, 0.3); }
.img-viewer .close {
    position: absolute; top: 18px; right: 18px; color: #fff; font-size: 30px;
    cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .12);
}

/* 聊天输入栏 */
.chat-inputbar {
    background: #fff; border-top: 1px solid var(--line); padding: 8px 10px;
    flex-shrink: 0; z-index: 10; padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.inputbar-row { display: flex; align-items: flex-end; gap: 8px; }
.inputbar-tool {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); flex-shrink: 0; border-radius: 8px;
    transition: background .2s;
}
.inputbar-tool:active { background: #f0f0f0; }
.inputbar-tool svg { width: 26px; height: 26px; fill: currentColor; }
.inputbar-row textarea {
    flex: 1; height: 36px; max-height: 110px; border: none; outline: none; resize: none;
    font-size: 15.5px; padding: 8px 4px; line-height: 1.4; background: transparent;
}
.btn-send {
    height: 34px; padding: 0 18px; border: none; border-radius: 17px;
    background: var(--primary-grad); color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; flex-shrink: 0; display: none; box-shadow: 0 3px 10px rgba(7, 193, 96, .3);
    transition: transform .15s;
}
.btn-send.show { display: block; }
.btn-send:active { transform: scale(.95); }
.inputbar-tools { display: flex; gap: 4px; padding-top: 4px; }

/* 表情面板 */
.sticker-panel {
    position: fixed; left: 0; right: 0; bottom: 64px; z-index: 250;
    background: #fff; max-width: 520px; margin: 0 auto;
    border-radius: 16px 16px 0 0; box-shadow: 0 -4px 30px rgba(0, 0, 0, .12);
    padding: 16px 12px 20px; max-height: 45vh; overflow-y: auto;
    transform: translateY(110%); transition: transform .3s cubic-bezier(.2, .9, .3, 1);
    visibility: hidden; opacity: 0; pointer-events: none;
}
.sticker-panel.show { transform: translateY(0); visibility: visible; opacity: 1; pointer-events: auto; }
.sticker-panel .sp-title { font-size: 13px; color: var(--text-sub); margin-bottom: 12px; }
.sticker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sticker-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; cursor: pointer; border-radius: 8px; transition: transform .15s; background: #f8f8f8; }
.sticker-grid img:active { transform: scale(.88); }

/* ============ 通讯录 ============ */
.contact-group { background: var(--card); margin-top: 10px; border-radius: 12px; overflow: hidden; margin-left: 10px; margin-right: 10px; box-shadow: var(--shadow); }
.contact-group-title { padding: 10px 16px; font-size: 12.5px; color: var(--text-sub); background: #fafafa; font-weight: 500; }
.contact-item {
    display: flex; align-items: center; padding: 12px 16px; cursor: pointer;
    border-bottom: 1px solid #f5f5f5; background: var(--card); transition: background .15s;
}
.contact-item:last-child { border-bottom: none; }
.contact-item:active { background: #f4f4f4; }
.contact-item .conv-avatar { width: 42px; height: 42px; font-size: 17px; border-radius: 7px; }
.contact-item .conv-avatar img { width: 42px; height: 42px; }
.contact-name { flex: 1; margin-left: 12px; font-size: 15.5px; }
.contact-sign { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.contact-arrow { color: #d0d0d0; font-size: 13px; }
.contact-actions { display: flex; gap: 6px; align-items: center; }
.contact-actions .mini-btn {
    padding: 5px 12px; border-radius: 6px; font-size: 12.5px; border: none; cursor: pointer;
    background: var(--primary-soft); color: var(--primary); font-weight: 500;
}
.contact-actions .mini-btn:active { opacity: .8; }
.contact-actions .mini-btn.gray { background: #f2f2f2; color: #666; }

/* 我的页 */
.me-card {
    margin: 12px; background: var(--card); border-radius: 14px; padding: 18px 16px;
    display: flex; align-items: center; box-shadow: var(--shadow); cursor: pointer;
}
.me-card .me-avatar { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; margin-right: 14px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.me-card .me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-card .me-avatar .no-avatar { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 600; }
.me-card .me-name { font-size: 19px; font-weight: 600; }
.me-card .me-id { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.me-card .me-sign { font-size: 12.5px; color: var(--text-sub); margin-top: 4px; }
/* 问题6：我的页卡片右侧二维码入口 */
.me-card .me-qr-btn { width: 38px; height: 38px; border-radius: 50%; background: #f2f4f5; color: #576b95; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 10px; }
.me-card .me-qr-btn:active { transform: scale(.92); }
.me-list { margin: 12px; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.me-list .list-item {
    display: flex; align-items: center; padding: 14px 16px; cursor: pointer;
    border-bottom: 1px solid #f5f5f5; transition: background .15s;
}
.me-list .list-item:last-child { border-bottom: none; }
.me-list .list-item:active { background: #f4f4f4; }
.me-list .li-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; margin-right: 12px; flex-shrink: 0; }
.me-list .li-text { flex: 1; font-size: 15px; }
.me-list .li-value { color: var(--text-sub); font-size: 13px; margin-right: 4px; }
.me-list .li-arrow { color: #d5d5d5; font-size: 13px; }

/* 弹层 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 200;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal-sheet {
    background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: 6px 0 16px;
    transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .9, .3, 1);
}
.modal-mask.show .modal-sheet { transform: translateY(0); }
.modal-sheet .ms-item {
    padding: 15px; text-align: center; font-size: 15px; border-bottom: 1px solid #f5f5f5; cursor: pointer;
}
.modal-sheet .ms-item:last-child { border-bottom: none; }
.modal-sheet .ms-item:active { background: #f5f5f5; }
.modal-sheet .ms-cancel { color: var(--text-sub); margin-top: 6px; font-weight: 500; }
.modal-sheet .ms-item.danger { color: var(--red); }

/* 居中弹窗 */
.dialog-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 220;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s;
}
.dialog-mask.show { opacity: 1; pointer-events: auto; }
.dialog {
    width: 300px; background: #fff; border-radius: 14px; padding: 22px 20px 16px;
    transform: scale(.9); transition: transform .2s cubic-bezier(.2, .9, .3, 1.2);
}
.dialog-mask.show .dialog { transform: scale(1); }
.dialog .d-title { font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 6px; }
.dialog .d-desc { font-size: 13px; color: var(--text-sub); text-align: center; margin-bottom: 14px; line-height: 1.5; }
.dialog input {
    width: 100%; height: 42px; border: 1.5px solid #e8e8e8; border-radius: 10px;
    padding: 0 12px; font-size: 14px; outline: none; margin-bottom: 10px; background: #f8f8f8;
}
.dialog input:focus { border-color: var(--primary); background: #fff; }
.dialog .d-btns { display: flex; gap: 10px; }
.dialog .d-btns button {
    flex: 1; height: 40px; border: none; border-radius: 10px; font-size: 14px; cursor: pointer;
    background: #f0f0f0; color: #666; font-weight: 500;
}
.dialog .d-btns button.primary { background: var(--primary-grad); color: #fff; }
.dialog .d-btns button:active { opacity: .85; }

/* 用户卡片（搜索结果/资料） */
.user-card {
    display: flex; align-items: center; padding: 14px 16px; background: var(--card);
    border-bottom: 1px solid #f5f5f5; gap: 12px;
}
.user-card .conv-avatar { width: 46px; height: 46px; border-radius: 8px; font-size: 19px; }
.user-card .conv-avatar img { width: 46px; height: 46px; }
.user-card .uc-info { flex: 1; min-width: 0; }
.user-card .uc-name { font-size: 15.5px; font-weight: 500; }
.user-card .uc-sub { font-size: 12px; color: var(--text-sub); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .uc-btn {
    padding: 7px 16px; border-radius: 8px; font-size: 13px; border: none; cursor: pointer;
    background: var(--primary-grad); color: #fff; font-weight: 500; flex-shrink: 0;
}
.user-card .uc-btn:active { opacity: .85; }
.user-card .uc-btn.gray { background: #f0f0f0; color: #999; }

/* 页面标题栏（子页） */
.sub-page-head {
    height: var(--nav-h); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, .05); display: flex; align-items: center;
    padding: 0 8px; position: sticky; top: 0; z-index: 50;
}
.sub-page-head .back {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 50%;
}
.sub-page-head .back:active { background: rgba(0, 0, 0, .05); }
.sub-page-head .back svg { width: 22px; height: 22px; fill: currentColor; }
.sub-page-head .sp-title { flex: 1; text-align: center; font-size: 16.5px; font-weight: 600; }
.sub-page-head .sp-right { width: 36px; }
.sub-page { padding-bottom: 40px; min-height: 100%; background: var(--bg); }

/* 页脚版权 */
.page-footer { text-align: center; color: #cfcfcf; font-size: 11px; padding: 24px 0; }

/* ---------- 扫一扫 ---------- */
.scan-wrap { position: relative; width: 100%; height: calc(100vh - 130px); background: #000; overflow: hidden; }
.scan-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 230px; height: 230px; border: 2px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); }
.scan-line { position: absolute; left: 6px; right: 6px; top: 0; height: 2px; background: #07c160; box-shadow: 0 0 12px #07c160; animation: scanMove 2.2s ease-in-out infinite; }
@keyframes scanMove { 0%,100% { top: 6px; } 50% { top: calc(100% - 8px); } }
.scan-tip { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scan-err { position: absolute; top: 50%; left: 20px; right: 20px; transform: translateY(-50%); text-align: center; color: #ffd666; font-size: 13px; line-height: 1.7; }

/* ===== v3.0 新增样式 ===== */
.bind-tip { margin: 10px 14px 0; padding: 10px 14px; background: #fffbe8; border: 1px solid #ffe58f; border-radius: 10px; font-size: 13px; color: #d48806; cursor: pointer; }
.login-reg { text-align: center; font-size: 14px; color: #999; padding: 14px 0 4px; }
.login-reg a { color: var(--primary); text-decoration: none; }

/* ============ v2.2.0 会话列表间距 ============ */
.conv-main { flex: 1; min-width: 0; margin-left: 14px; padding-right: 4px; }

/* ============ v2.2.0 时间分隔（微信式居中短条） ============ */
.msg-time-divider { text-align: center; font-size: 11px; color: #a8a8a8; margin: 14px 0; background: none; padding: 0; width: 100%; display: block; border-radius: 0; }
.msg-time-divider span { display: inline-flex; align-items: center; gap: 8px; }
.msg-time-divider span::before, .msg-time-divider span::after { content: ''; height: 1px; width: 22px; background: #e3e3e3; flex-shrink: 0; }

/* ============ v2.2.0 草稿标记 ============ */
.draft-mark { color: var(--red); font-weight: 500; margin-right: 4px; }

/* ============ v2.2.0 通讯录分组 ============ */
.group-title { font-size: 12px; color: #999; padding: 12px 16px 4px; }
.bot-tag { font-size: 11px; margin-left: 2px; }

/* ============ v2.2.0 预设表情 ============ */
.emoji-cell { font-size: 26px; padding: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; background: #f8f8f8; }
.emoji-cell:active { transform: scale(.85); background: #eee; }

/* ============ v2.2.0 聊天信息页（chat_info.php） ============ */
.group-info-head { text-align: center; padding: 24px 16px 18px; background: var(--card); margin: 12px 10px 0; border-radius: 12px; box-shadow: var(--shadow); }
.gih-avatar { width: 72px; height: 72px; border-radius: 14px; margin: 0 auto 10px; background: #e8e8e8; display: flex; align-items: center; justify-content: center; font-size: 36px; overflow: hidden; position: relative; cursor: pointer; }
.gih-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gih-edit { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 10px; padding: 2px 0; }
.gih-name { font-size: 17px; font-weight: 600; }
.gih-sub { font-size: 12px; color: #999; margin-top: 4px; }
.member-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 16px; background: var(--card); margin: 10px 10px 0; border-radius: 12px; box-shadow: var(--shadow); }
.member-cell { text-align: center; cursor: pointer; }
.member-cell img, .mc-noav { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; margin: 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 600; }
.mc-name { font-size: 12px; color: #333; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-role { font-size: 10px; color: #07c160; }
.list-item.danger .li-text { color: var(--red); }
.info-body .list-item .li-value { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ v2.3.0 添加好友三入口 ============ */
.add-friend-actions { display: flex; gap: 14px; padding: 20px 18px 6px; }
.afa-item { flex: 1; text-align: center; cursor: pointer; }
.afa-ico { width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.afa-name { font-size: 12px; color: #333; }

/* ============ v2.3.0 群成员 + 号 ============ */
.mc-add { width: 52px; height: 52px; border-radius: 10px; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; background: #e8e8e8; color: #999; }

/* ============ v2.3.0 禁止 iOS 长按弹出系统菜单 ============ */
.chat-body-page { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.chat-body-page input, .chat-body-page textarea { -webkit-user-select: text; user-select: text; }

/* ============ v2.4.0 免打扰红点 + @我 ============ */
.conv-unread-dot { width: 10px; height: 10px; border-radius: 50%; padding: 0; min-width: 0; font-size: 0; }
.conv-at-me { color: #fa5151; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.at-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; }
.at-item:active { background: #f5f5f5; }
.at-av { width: 34px; height: 34px; border-radius: 6px; flex-shrink: 0; object-fit: cover; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.at-name { font-size: 14px; color: var(--text); }

/* ================= v2.5.3 新功能样式 ================= */
/* 语音 */
.voice-tool { position: relative; }
.voice-tool.recording { animation: voicePulse 1s infinite; }
@keyframes voicePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.voice-tip { display: none; position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%); background: rgba(0,0,0,.75); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; z-index: 999; pointer-events: none; }
.msg-voice { display: flex; align-items: center; gap: 6px; cursor: pointer; min-width: 70px; }
.msg-voice.playing { background: #d8f5e4 !important; }
.voice-icon { font-size: 16px; }
.voice-dur { font-size: 13px; color: #666; }
.msg-voice audio { display: none; }
/* 文件卡片 */
.msg-file { display: flex; align-items: center; gap: 10px; cursor: pointer; max-width: 230px; }
/* 群聊名片卡片（问题4） */
.msg-namecard { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.msg-namecard .nc-ico { font-size: 30px; }
.msg-namecard .nc-info { display: flex; flex-direction: column; }
.msg-namecard .nc-name { font-size: 14px; font-weight: 600; }
.msg-namecard .nc-tip { font-size: 11px; color: #999; margin-top: 2px; }
/* 问题8：助手模板卡片消息（微信模板消息样式） */
.msg-card { background: var(--card); border-radius: 10px; padding: 12px 14px; min-width: 220px; max-width: 270px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.msg-card .card-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; margin-bottom: 8px; }
.msg-card .card-badge { font-size: 13px; font-weight: 600; color: #07c160; }
.msg-card .card-time { font-size: 10px; color: #bbb; }
.msg-card .card-body { font-size: 14px; color: #333; line-height: 1.55; word-break: break-all; }
body.dark .msg-card { background: #1c1c1e; }
body.dark .msg-card .card-head { border-bottom-color: #2c2c2e; }
body.dark .msg-card .card-body { color: #eee; }
/* 问题5：可点击头像 */
.msg-avatar-link img, .msg-avatar-link .no-avatar { cursor: pointer; }
/* 问题3：会话列表红包红字 */
.last-red { color: var(--red); font-weight: 600; }
.file-icon { font-size: 26px; }
.file-info { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-size: 14px; color: var(--text); word-break: break-all; }
.file-size { font-size: 11px; color: #999; margin-top: 2px; }
/* 已读回执 */
.msg-read-state { font-size: 11px; color: #b2b2b2; text-align: right; margin-top: 2px; padding-right: 2px; height: 14px; }
/* 多选 */
.multi-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #eee; display: flex; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 900; gap: 10px; }
.multi-count { flex: 1; font-size: 14px; color: #333; }
.multi-btn { padding: 7px 16px; border-radius: 16px; background: #07c160; color: #fff; font-size: 13px; }
.multi-btn.danger { background: #fa5151; }
.msg-row.multi-capable { position: relative; }
.multi-cb { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border: 2px solid #ccc; border-radius: 50%; background: #fff; font-size: 12px; color: #fff; display: flex; align-items: center; justify-content: center; z-index: 5; }
.msg-row.multi-on .multi-cb { background: #07c160; border-color: #07c160; }
.msg-row.multi-on .msg-bubble { opacity: .75; }
.msg-row.flash .msg-bubble { animation: msgFlash 1.6s; }
@keyframes msgFlash { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px rgba(7,193,96,.4); } }
/* 搜索弹层 */
.search-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 950; display: flex; align-items: flex-start; justify-content: center; padding-top: 8vh; }
.search-box { width: 92%; max-width: 420px; background: #fff; border-radius: 12px; overflow: hidden; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f0f0f0; }
.search-input-row input { flex: 1; border: none; outline: none; font-size: 15px; background: #f2f2f2; border-radius: 18px; padding: 8px 14px; }
.search-cancel { font-size: 14px; color: #07c160; white-space: nowrap; }
.search-results { max-height: 60vh; overflow-y: auto; }
.sr-empty { padding: 30px 0; text-align: center; color: #999; font-size: 13px; }
.sr-item { padding: 11px 14px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.sr-item:active { background: #f7f7f7; }
.sr-name { font-size: 12px; color: #999; margin-bottom: 3px; }
.sr-text { font-size: 14px; color: #333; word-break: break-all; }
/* 红包 */
.msg-rp { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg,#ffb347,#f7620c) !important; color: #fff !important; min-width: 178px; cursor: pointer; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 3px 10px rgba(247,98,12,.35); padding: 2px 4px; }
.msg-rp .rp-ico { font-size: 28px; }
.msg-rp .rp-info { display: flex; flex-direction: column; }
.msg-rp .rp-note { font-size: 14px; font-weight: 600; color: #fff; }
.msg-rp .rp-tip { font-size: 11px; color: rgba(255,255,255,.85); margin-top: 2px; }
.rp-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 980; display: flex; align-items: center; justify-content: center; }
.rp-modal-box { width: 82%; max-width: 340px; background: #fff; border-radius: 12px; padding: 22px 20px 18px; }
.rp-modal-title { text-align: center; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.rp-modal-gold { text-align: center; font-size: 13px; color: #999; margin-bottom: 12px; }
.rp-modal-gold b { color: #fa5151; }
.rp-input { width: 100%; box-sizing: border-box; border: 1px solid #e5e5e5; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; outline: none; }
.rp-input:focus { border-color: #fa9d3b; }
.rp-modal-btns { display: flex; gap: 10px; margin-top: 14px; }
.rp-btn { flex: 1; padding: 10px 0; border-radius: 8px; border: none; background: #f2f2f2; color: #333; font-size: 14px; }
.rp-btn.primary { background: #fa9d3b; color: #fff; }

/* ================= v2.5.9 + 面板（微信式） ================= */
.plus-panel {
    display: flex; flex-wrap: wrap; gap: 2px 6px;
    padding: 8px 6px 4px; border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.pp-item { width: 25%; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; }
.pp-ico {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.pp-name { font-size: 11px; color: #666; }

/* 红包弹窗美化 */
.rp-modal-box { width: 82%; max-width: 340px; background: linear-gradient(180deg, #fff7ec 0%, #fff 40%); border-radius: 16px; padding: 24px 20px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.rp-modal-title { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 6px; color: #e05a1a; }
.rp-modal-title::before { content: '🧧 '; }
.rp-modal-gold { text-align: center; font-size: 13px; color: #b0855e; margin-bottom: 14px; }
.rp-input { background: #fff; border: 1px solid #f0dcc8; }
.rp-btn.primary { background: linear-gradient(180deg, #fa9d3b, #f57c1a); box-shadow: 0 4px 12px rgba(245,124,26,.35); }

/* ================= v2.5.3 深色模式 ================= */
body.dark { background:#111; color:#eee; }
body.dark .page, body.dark .sub-page, body.dark .chat-page { background:#111; color:#eee; }
body.dark .header, body.dark .chat-header, body.dark .inputbar, body.dark .nav-bar, body.dark .mom-header, body.dark .prof-header { background:#1c1c1e; border-color:#2c2c2e; color:#eee; }
body.dark .conv-item, body.dark .contact-item, body.dark .list-item, body.dark .me-card, body.dark .me-list, body.dark .mom-card, body.dark .prof-card, body.dark .prof-meta, body.dark .search-box { background:#1c1c1e; color:#eee; border-color:#2c2c2e; }
body.dark .conv-name, body.dark .contact-name, body.dark .li-text, body.dark .me-name, body.dark .mom-content, body.dark .sr-text { color:#eee; }
body.dark .conv-time, body.dark .contact-sign, body.dark .li-value, body.dark .mom-time, body.dark .sr-name, body.dark .prof-line .k { color:#8e8e93; }
body.dark .msg-bubble { background:#1c1c1e; color:#eee; }
body.dark .msg-bubble.me { background:#0b5c3a; color:#fff; }
body.dark .app-tabbar { background:#1c1c1e; border-color:#2c2c2e; }
body.dark .tab-item { color:#8e8e93; }
body.dark .tab-item.active { color:var(--primary); }
body.dark .chat-inputbar { background:#1c1c1e; border-color:#2c2c2e; }
body.dark .plus-panel { background:#1c1c1e; border-color:#2c2c2e; }
body.dark .pp-name { color:#8e8e93; }
body.dark .sticker-panel { background:#1c1c1e; }
body.dark .sticker-grid img { background:#2c2c2e; }
body.dark .modal-sheet { background:#1c1c1e; color:#eee; }
body.dark .modal-sheet .ms-item { color:#eee; border-color:#2c2c2e; }
/* ===== 第三批深色补全：搜索框/顶部/通讯录/发现页/个人名片 ===== */
body.dark .search-bar { background:#1f1f1f; }
body.dark .search-bar span { color:#bbb; }
body.dark .sub-page-head { background:#1f1f1f; border-bottom-color:#2a2a2a; }
body.dark .sub-page-head .sp-title { color:#e8e8e8; }
body.dark .sub-page-head .back svg path { fill:#e8e8e8; }
body.dark .contact-group-title, body.dark .group-title { color:#aaa; }
body.dark .contact-item { background:#1c1c1c; }
body.dark .contact-item .contact-name div { color:#e8e8e8; }
body.dark .contact-item .contact-sign { color:#999; }
body.dark .me-list .list-item { background:#1c1c1c; color:#e8e8e8; }
body.dark .me-list .list-item .li-text { color:#e8e8e8; }
body.dark .me-list .list-item .li-value { color:#999; }
body.dark .page-footer { color:#666; }
body.dark #pageDiscover .me-list .list-item { background:#1c1c1c; }
body.dark .prof-page { background:#111; }
body.dark .prof-header { background:#1f1f1f; border-bottom-color:#2a2a2a; color:#e8e8e8; }
body.dark .prof-header .prof-back svg path { fill:#e8e8e8; }
body.dark .prof-card, body.dark .prof-meta { background:#1c1c1c; }
body.dark .prof-name { color:#e8e8e8; }
body.dark .prof-sign { color:#999; }
body.dark .prof-line { border-bottom-color:#2a2a2a; }
body.dark .prof-line .k { color:#999; }
body.dark .prof-line .v { color:#e8e8e8; }
body.dark .prof-btn.gray { background:#2a2a2a; color:#e8e8e8; border-color:#333; }
body.dark .rp-modal-box { background:linear-gradient(180deg, #2a2018 0%, #1c1c1e 40%); }
body.dark .rp-modal-title { color:#ffb37e; }
body.dark .rp-input { background:#2c2c2e; border-color:#3a3a3c; color:#eee; }
body.dark .msg-reply { background:#2c2c2e; color:#8e8e93; }
body.dark .msg-time-divider span { background:#1c1c1e; color:#8e8e93; }
body.dark .multi-bar { background:#1c1c1e; border-color:#2c2c2e; }
body.dark .btn-send { background:#07c160; }
body.dark .inputbar-tool { color:#8e8e93; }
body.dark textarea#msgInput { background:#2c2c2e; color:#eee; }
body.dark .msg-voice.playing { background:#0b5c3a !important; }
body.dark .inputbar-row input { background:#2c2c2e; color:#eee; }
body.dark .search-input-row input { background:#2c2c2e; color:#eee; }
body.dark .multi-bar { background:#1c1c1e; border-color:#2c2c2e; }
body.dark .dialog, body.dark .modal-sheet, body.dark .rp-modal-box, body.dark .mom-editor-box { background:#1c1c1e; color:#eee; }
body.dark .d-title { color:#eee; }
body.dark .at-panel { background:#1c1c1e; }
body.dark .at-item:active, body.dark .sr-item:active { background:#2c2c2e; }
body.dark .mom-likebox { background:#2c2c2e; }
body.dark .chat-body { background:#111 !important; }

/* 在线状态点 */
.conv-online { display:inline-block; width:8px; height:8px; border-radius:50%; background:#07c160; margin-left:6px; vertical-align:middle; }
/* 好友标签 */
.f-tag { display:inline-block; background:#e8f7ef; color:#07c160; font-size:11px; padding:1px 6px; border-radius:4px; margin-left:6px; vertical-align:middle; }
body.dark .f-tag { background:#0b3d27; }

/* ============================================================
   PC 端双栏布局（需求③：左列表右内容，微信 PC 风格）
   仅 body.pc-mode 时生效
   ============================================================ */
body.pc-mode .app-nav,
body.pc-mode .app-tabbar,
body.pc-mode #chatSearchBar { display:none !important; }

.pc-wrap { display:none; position:fixed; inset:0; z-index:20; background:#f7f7f7; }
/* v11：主题变量（默认浅色，.pc-dark 深色，微信电脑版风格） */
.pc-mode { --pc-bg-nav:#f7f7f7; --pc-bg-side:#ffffff; --pc-text:#222; --pc-text-sub:#8a8a8a; --pc-hover:#f2f2f2; --pc-active:rgba(7,193,96,0.12); --pc-search-bg:#f2f2f2; --pc-border:#ececec; --pc-svg:#5f5f5f; }
.pc-mode.pc-dark { --pc-bg-nav:#262626; --pc-bg-side:#2e2e2e; --pc-text:#e8e8e8; --pc-text-sub:#8a8a8a; --pc-hover:rgba(255,255,255,0.06); --pc-active:rgba(7,193,96,0.25); --pc-search-bg:#1f1f1f; --pc-border:#232323; --pc-svg:#dcdcdc; }
.pc-nav { width:60px; min-width:60px; background:var(--pc-bg-nav); display:flex; flex-direction:column; align-items:center; padding-top:10px; border-right:1px solid var(--pc-border); }
.pc-nav-avatar { width:38px; height:38px; border-radius:8px; overflow:hidden; cursor:pointer; margin-bottom:18px; flex-shrink:0; }
.pc-nav-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.pc-nav-avatar .pc-me-char { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:16px; font-weight:600; }
.pc-nav-btn { width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; cursor:pointer; margin-bottom:6px; position:relative; transition:background .15s; }
.pc-nav-btn:hover { background:var(--pc-hover); }
.pc-nav-btn.active { background:var(--pc-active); }
.pc-nav-btn.active .pc-nav-svg { fill:var(--pc-svg); }
.pc-nav-svg { width:24px; height:24px; fill:var(--pc-svg); }
.pc-nav-spacer { flex:1; }
.pc-nav-badge { position:absolute; top:2px; right:2px; min-width:16px; height:16px; line-height:16px; border-radius:8px; background:#fa5151; color:#fff; font-size:10px; text-align:center; padding:0 4px; }
.pc-side { width:280px; min-width:280px; background:var(--pc-bg-side) !important; display:flex; flex-direction:column; height:100%; }
.pc-side-head { display:flex; align-items:center; gap:10px; padding:14px 12px 10px; }
.pc-me { width:40px; height:40px; border-radius:6px; cursor:pointer; flex-shrink:0; overflow:hidden; }
.pc-me img { width:100%; height:100%; object-fit:cover; display:block; }
.pc-me-char { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:18px; font-weight:600; }
.pc-search { flex:1; min-width:0; background:var(--pc-search-bg) !important; color:var(--pc-text); font-size:13px; padding:8px 12px; border-radius:4px; border:none; outline:none; }
.pc-search::placeholder { color:var(--pc-text-sub); }
.pc-search-plus { width:36px; height:36px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:var(--pc-text); font-size:22px; font-weight:300; border-radius:6px; cursor:pointer; background:var(--pc-hover); }
.pc-search-plus:hover { background:var(--pc-hover); }
.pc-convs { flex:1; overflow-y:auto; padding:4px 0 8px; }
.pc-convs::-webkit-scrollbar { width:4px; }
.pc-convs::-webkit-scrollbar-thumb { background:#bbb; border-radius:2px; }
.pc-conv-empty { color:var(--pc-text-sub); font-size:13px; text-align:center; padding:30px 10px; }
.pc-convs .conv-item { background:transparent !important; padding:10px 14px; border-bottom:1px solid var(--pc-border); }
.pc-convs .conv-item:hover { background:var(--pc-hover) !important; }
.pc-convs .conv-item.active { background:var(--pc-active) !important; }
.pc-convs .conv-name { color:var(--pc-text); }
.pc-bot-tag { font-size:10px; color:#fff; background:#576b95; border-radius:3px; padding:1px 5px; margin-left:6px; vertical-align:1px; }
.pc-convs .conv-last { color:#9a9a9a; }
.pc-convs .conv-time { color:#7a7a7a; }
.pc-convs .conv-top-mark { background:#07c160; color:#fff; font-size:10px; padding:1px 5px; border-radius:3px; margin-left:6px; }
.pc-convs .conv-unread { background:#fa5151; color:#fff; font-size:11px; min-width:18px; height:18px; border-radius:9px; line-height:18px; text-align:center; padding:0 5px; }
.pc-side-foot { border-top:1px solid var(--pc-border); padding:6px 8px; display:flex; flex-direction:column; }
.pc-foot-btn { display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:6px; color:var(--pc-text); font-size:14px; cursor:pointer; }
.pc-foot-btn:hover { background:var(--pc-hover); }
.pc-main { flex:1; background:#f5f5f5; position:relative; }
.pc-frame { width:100%; height:100%; border:none; display:block; background:#f5f5f5; }
.pc-empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#999; font-size:15px; }
/* PC 模式下 iframe 内聊天页背景（chat.php 自带） */

/* 我的资料小面板（左上角头像点击） */
.pc-me-panel { position:fixed; top:64px; left:12px; width:240px; background:#fff; border-radius:8px; box-shadow:0 6px 24px rgba(0,0,0,0.18); z-index:400; padding:16px; }
.pmp-avatar { width:60px; height:60px; border-radius:10px; overflow:hidden; margin-bottom:10px; }
.pmp-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.pmp-char { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:26px; font-weight:600; }
.pmp-name { font-size:16px; font-weight:700; color:#222; }
.pmp-wxid { font-size:12px; color:#888; margin-top:4px; }
.pmp-sign { font-size:12px; color:#999; margin-top:6px; word-break:break-all; }
.pmp-btns { display:flex; gap:8px; margin-top:14px; }
.pmp-btn { flex:1; text-align:center; padding:8px 0; border-radius:6px; background:#f2f2f2; color:#333; font-size:13px; cursor:pointer; }
.pmp-btn:hover { background:#e8e8e8; }
body.dark .pc-me-panel { background:#1c1c1e; }
body.dark .pmp-name { color:#eee; }
body.dark .pmp-btn { background:#2c2c2e; color:#ddd; }
