/* ===== 消息中心 / 关注 / 咨询（移动优先） ===== */
.ms-wrap{ max-width:430px; width:100%; box-sizing:border-box; margin:0 auto; padding:12px 12px 90px; background:#f5f7f5; min-height:100vh; overflow-x:hidden; }
@media (min-width:861px){ .ms-wrap{ max-width:720px; } }

/* 顶部子导航 */
.ms-tabs{ display:flex; gap:6px; background:#fff; border-radius:12px; padding:6px; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,.04); position:sticky; top:0; z-index:20; }
.ms-tabs a{ flex:1; text-align:center; padding:9px 2px; border-radius:9px; font-size:13.5px; color:#5b6b60; text-decoration:none; position:relative; white-space:nowrap; }
.ms-tabs a.on{ background:#e8f5ec; color:#176e3c; font-weight:600; }
.ms-tabs a .n{ display:inline-block; min-width:16px; height:16px; line-height:16px; padding:0 4px; border-radius:8px; background:#e24c4c; color:#fff; font-size:11px; vertical-align:top; margin-left:3px; }

/* 未读红点 */
.dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:#e24c4c; }
.ms-badge{ display:inline-block; min-width:17px; height:17px; line-height:17px; padding:0 5px; border-radius:9px; background:#e24c4c; color:#fff; font-size:11px; text-align:center; font-weight:600; }

/* 卡片 */
.ms-card{ background:#fff; border-radius:12px; padding:14px; margin-bottom:12px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.ms-card h3{ margin:0 0 10px; font-size:15px; color:#176e3c; display:flex; align-items:center; justify-content:space-between; }
.ms-card h3 a{ font-size:12.5px; color:#7d8d82; font-weight:400; text-decoration:none; }

/* 四宫格入口 */
.ms-quad{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.ms-quad a{ display:block; text-align:center; padding:14px 2px 10px; background:#fff; border-radius:12px; text-decoration:none; color:#3c5145; box-shadow:0 1px 4px rgba(0,0,0,.04); position:relative; }
.ms-quad a .ic{ font-size:22px; display:block; margin-bottom:5px; }
.ms-quad a .lb{ font-size:12px; }
.ms-quad a .bd{ position:absolute; top:6px; right:8px; }

/* 列表行 */
.ms-row{ display:flex; gap:10px; padding:12px 2px; border-bottom:1px solid #f0f3f1; text-decoration:none; color:inherit; }
.ms-row:last-child{ border-bottom:0; }
.ms-row .av{ width:40px; height:40px; border-radius:50%; flex-shrink:0; background:#e8f0ea center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size:17px; color:#2c6b47; }
.ms-row .bd2{ flex:1; min-width:0; }
.ms-row .ti{ font-size:14.5px; color:#26332c; line-height:1.5; display:flex; gap:6px; align-items:center; }
.ms-row .ti b{ background:#e24c4c; color:#fff; font-size:10.5px; padding:1px 5px; border-radius:4px; font-weight:600; }
.ms-row .ds{ font-size:12.5px; color:#7d8d82; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ms-row .tm{ font-size:11.5px; color:#a8b4ac; margin-top:4px; }
.ms-row.unread{ background:#fbfdfb; }
.ms-row.unread .ti{ font-weight:600; }

/* 通知类型图标 */
.ms-ico{ width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; background:#eef6f0; }

/* 空态 */
.ms-empty{ text-align:center; color:#9aa8a0; font-size:13.5px; padding:44px 0; }
.ms-empty .ic{ font-size:34px; display:block; margin-bottom:8px; opacity:.5; }

/* 聊天 */
.chat-box{ background:#f5f7f5; min-height:calc(100vh - 220px); padding-bottom:8px; }
.ms-bubble{ display:flex; gap:8px; margin-bottom:14px; align-items:flex-start; }
.ms-bubble .av{ width:34px; height:34px; border-radius:50%; flex-shrink:0; background:#e8f0ea center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size:15px; color:#2c6b47; overflow:hidden; }
.ms-bubble .txt{ max-width:76%; background:#fff; border-radius:12px; padding:9px 12px; font-size:14px; line-height:1.65; color:#26332c; word-break:break-word; white-space:pre-wrap; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.ms-bubble .tm{ font-size:11px; color:#a8b4ac; margin-top:4px; }
.ms-bubble.me{ flex-direction:row-reverse; }
.ms-bubble.me .txt{ background:#1f8a4c; color:#fff; }
.ms-bubble.me .tm{ text-align:right; }
.ms-bubble.notice .txt{ background:#fffbe8; border:1px solid #f2e3ac; }
.chat-day{ text-align:center; font-size:11.5px; color:#a8b4ac; margin:10px 0 14px; }

/* 输入栏 */
.ms-inputbar{ position:fixed; left:0; right:0; bottom:0; z-index:40; background:#fff; border-top:1px solid #e6ece8; padding:8px 10px; display:flex; gap:8px; align-items:flex-end; box-shadow:0 -2px 10px rgba(0,0,0,.04); }
.ms-inputbar .inner{ max-width:430px; margin:0 auto; width:100%; display:flex; gap:8px; align-items:flex-end; }
@media (min-width:861px){ .ms-inputbar .inner{ max-width:720px; } }
.ms-inputbar textarea{ flex:1; border:1px solid #e2e9e4; border-radius:20px; padding:9px 14px; font-size:14px; resize:none; height:40px; line-height:1.4; outline:none; font-family:inherit; background:#f7f9f8; }
.ms-inputbar textarea:focus{ border-color:#9ad0ae; background:#fff; }
.ms-inputbar button{ border:0; background:#1f8a4c; color:#fff; border-radius:20px; padding:0 18px; height:40px; font-size:14px; cursor:pointer; flex-shrink:0; }
body.app-shell .ms-inputbar{ bottom:56px; }

/* 表单 */
.ms-field{ margin-bottom:14px; }
.ms-field label{ display:block; font-size:13.5px; color:#3c5145; margin-bottom:6px; font-weight:600; }
.ms-field input[type=text],.ms-field textarea,.ms-field select{ width:100%; box-sizing:border-box; border:1px solid #e2e9e4; border-radius:10px; padding:11px 12px; font-size:14.5px; outline:none; font-family:inherit; background:#fff; }
.ms-field textarea{ min-height:120px; resize:vertical; line-height:1.7; }
.ms-field input:focus,.ms-field textarea:focus{ border-color:#9ad0ae; }

/* 开关 */
.ms-sw{ display:flex; align-items:center; justify-content:space-between; padding:14px 2px; border-bottom:1px solid #f0f3f1; }
.ms-sw:last-child{ border-bottom:0; }
.ms-sw .lb{ display:block; font-size:14.5px; color:#26332c; }
.ms-sw .ds{ display:block; font-size:12px; color:#93a29a; margin-top:3px; line-height:1.5; }
.ms-sw input[type=checkbox]{ appearance:none; -webkit-appearance:none; width:46px; height:26px; border-radius:13px; background:#d8e1da; position:relative; outline:none; transition:.2s; flex-shrink:0; cursor:pointer; }
.ms-sw input[type=checkbox]:checked{ background:#1f8a4c; }
.ms-sw input[type=checkbox]::after{ content:''; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.ms-sw input[type=checkbox]:checked::after{ left:23px; }
.ms-sw input[type=checkbox]:disabled{ opacity:.45; }

/* 状态标签 */
.ms-tag{ display:inline-block; font-size:11.5px; padding:2px 8px; border-radius:10px; background:#eef2ef; color:#66786c; }
.ms-tag.wait{ background:#fff3e0; color:#a86a00; }
.ms-tag.ok{ background:#e8f5ec; color:#1f8a4c; }
.ms-tag.urgent{ background:#fdeaea; color:#d33; font-weight:600; }
.ms-tag.done{ background:#eef2ef; color:#7d8d82; }

/* 关注按钮 */
.ms-follow{ display:inline-flex; align-items:center; gap:4px; border:1px solid #1f8a4c; color:#1f8a4c; background:#fff; border-radius:18px; padding:6px 16px; font-size:13px; cursor:pointer; text-decoration:none; }
.ms-follow.on{ background:#eef6f0; border-color:#cfe3d6; color:#5f7261; }
.ms-follow.solid{ background:#1f8a4c; color:#fff; border-color:#1f8a4c; }

/* 用户主页头部 */
.ms-hero{ background:linear-gradient(135deg,#1f8a4c,#14572f); border-radius:14px; padding:18px; color:#fff; display:flex; gap:14px; align-items:center; }
.ms-hero .av{ width:60px; height:60px; border-radius:50%; background:#fff3 center/cover no-repeat; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:24px; color:#1f8a4c; overflow:hidden; }
.ms-hero .nm{ font-size:18px; font-weight:700; }
.ms-hero .sub{ font-size:12.5px; color:#c8e6d5; margin-top:4px; }
.ms-nums{ display:flex; gap:18px; margin-top:10px; font-size:12.5px; color:#d9eee1; }
.ms-nums b{ font-size:15px; color:#fff; }

/* 底部固定操作（咨询提问） */
.ms-cta{ position:fixed; left:0; right:0; bottom:0; z-index:40; background:#fff; border-top:1px solid #e6ece8; padding:10px 12px; }
.ms-cta .inner{ max-width:430px; margin:0 auto; }
body.app-shell .ms-cta{ bottom:56px; }

/* 横幅提示 */
.ms-banner{ display:flex; align-items:center; gap:10px; background:#fff7e6; border:1px solid #f2dcaa; color:#8a5b00; border-radius:12px; padding:12px 14px; margin-bottom:12px; font-size:13px; line-height:1.6; }
.ms-banner a{ color:#8a5b00; font-weight:600; }

/* ===== App 顶栏消息/版本入口 ===== */
.app-msg{ display:flex; align-items:center; justify-content:center; width:32px; height:32px; flex-shrink:0; color:#3c5145; position:relative; text-decoration:none; }
.app-msg .hh-dot{ box-shadow:none; }

/* ===== 新版本提示弹层 ===== */
#hhVerMask{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9998; display:flex; align-items:center; justify-content:center; padding:24px; }
.hh-verbox{ background:#fff; border-radius:16px; padding:24px 20px 18px; width:100%; max-width:320px; text-align:center; box-shadow:0 18px 50px rgba(0,0,0,.25); }
.hh-verico{ width:52px; height:52px; line-height:52px; margin:0 auto 12px; border-radius:50%; background:#e8f5ec; color:#1f8a4c; font-size:24px; font-weight:bold; }
.hh-vertitle{ font-size:17px; font-weight:700; color:#176e3c; }
.hverdesc{ font-size:13.5px; color:#5f7261; line-height:1.8; margin:10px 0 18px; }
.hh-verbtns{ display:flex; gap:10px; }
.hh-verbtns button{ flex:1; border:0; border-radius:10px; padding:12px 0; font-size:14.5px; cursor:pointer; font-family:inherit; }
.hh-verignore{ background:#f1f4f2; color:#5f7261; }
.hh-vergo{ background:#1f8a4c; color:#fff; }
.hh-vergo[disabled]{ opacity:.7; }

/* ===== 安装到桌面引导条 ===== */
#hhInstBar{ position:fixed; left:0; right:0; bottom:0; z-index:9997; background:rgba(20,87,47,.97); color:#fff; padding:10px 12px; box-shadow:0 -4px 20px rgba(0,0,0,.22); }
#hhInstBar .hh-instin{ max-width:430px; margin:0 auto; display:flex; align-items:center; gap:10px; }
@media (min-width:861px){ #hhInstBar .hh-instin{ max-width:720px; } }
#hhInstBar .hh-instic{ font-size:18px; flex-shrink:0; }
#hhInstBar .hh-insttx{ flex:1; font-size:12.5px; line-height:1.6; color:#dff0e5; }
#hhInstBar button{ border:0; border-radius:99px; font-size:12.5px; padding:7px 14px; flex-shrink:0; cursor:pointer; font-family:inherit; }
#hhInstBar .hh-instdismiss{ background:rgba(255,255,255,.16); color:#e6f3ea; }
#hhInstBar .hh-instgo{ background:#7fd6a1; color:#0c3d22; font-weight:600; }
body.app-shell #hhInstBar{ bottom:56px; }

/* 底部 tab 上的红点 */
.hh-dot.tabdot{ top:-3px; right:-10px; box-shadow:none; min-width:15px; height:15px; line-height:15px; font-size:10px; }
.hh-dot.tabdot-mini{ min-width:0; width:8px; height:8px; padding:0; line-height:0; border-radius:50%; top:-2px; right:-4px; }

/* 未读红点基础样式（App 壳页面不输出 layout 内联样式，必须在这里兜底） */
.hh-dot{ position:absolute; top:-2px; right:-8px; min-width:16px; height:16px; line-height:16px; padding:0 4px; border-radius:8px; background:#e24c4c; color:#fff; font-size:10.5px; font-weight:600; text-align:center; box-shadow:0 0 0 2px #14572f; }
.hh-dot-mini{ min-width:0; width:9px; height:9px; padding:0; font-size:0; line-height:0; border-radius:50%; top:-3px; right:-2px; }
