/* 消息管理 v1.0 —— 样式（对齐 platform 后台页公共样式，2026-09-16 新建）*/
*{margin:0;padding:0;box-sizing:border-box}
img{vertical-align:middle}
body{font-family:'寒蝉全圆体','ChillRoundF','PingFang SC','Microsoft YaHei',sans-serif;background:#FBFCFD;color:#202124;font-size:13px;-webkit-font-smoothing:antialiased}
.layout{display:flex;min-height:100vh}
/* ===== 顶栏 ===== */
.main{flex:1;min-width:0}
.topbar{height:60px;display:flex;align-items:center;padding:0 44px;background:#FBFCFD;border-bottom:2px solid #F1F3F5}
.crumb{font-size:13px;color:#9CA3AF}
.crumb .sep{color:#D1D5DB;margin:0 4px}
.crumb b{color:#202124;font-weight:600}
.topbar-right{margin-left:auto;display:flex;gap:16px;align-items:center}
.hbtn{width:32px;height:32px;border:none;background:none;color:#9CA3AF;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}
.hbtn:hover{background:#F1F3F5;color:#202124}
.user{font-size:13px;color:#4B5563;display:flex;align-items:center;gap:8px}
.user .av{width:26px;height:26px;border-radius:50%;background:#5E6AD2;color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
/* ===== 内容 ===== */
.content{padding:24px 44px 20px;max-width:100%}
h1{font-size:20px;font-weight:700;letter-spacing:-.3px;margin-bottom:16px}
.ver-tag{display:inline-block;vertical-align:middle;margin-left:6px;padding:2px 8px;border-radius:6px;background:#EEF2FF;color:#5E6AD2;font-size:12px;font-weight:600;line-height:1.6}
/* ===== 筛选 ===== */
.filter{display:flex;gap:12px;margin-bottom:18px;flex-wrap:wrap;align-items:center}
.fin{height:34px;border:1px solid #E8EAED;border-radius:6px;padding:0 10px;font-size:12.5px;outline:none;background:#fff;font-family:inherit;transition:all .15s;color:#202124}
.fin:focus{border-color:#5E6AD2;box-shadow:0 0 0 4px rgba(94,106,210,.12)}
.fin::placeholder{color:#B0B7C3}
.fbtn{height:34px;padding:0 14px;border-radius:6px;font-size:12.5px;cursor:pointer;font-family:inherit;font-weight:500;border:1px solid #E8EAED;background:#fff;color:#4B5563;transition:all .15s;display:inline-flex;align-items:center;gap:6px}
.fbtn:hover{border-color:#D5D9DF}
.fbtn.primary{background:#5E6AD2;color:#fff;border-color:#5E6AD2}
.fbtn.primary:hover{background:#4F5AC9}
.fbtn.primary img{filter:brightness(0) invert(1)}
/* ===== 主区：左会话列表 + 右会话详情 ===== */
.card{background:#fff;border:1px solid #F1F3F5;border-radius:10px;overflow:hidden}
.msg-wrap{display:flex;gap:16px;height:calc(100vh - 268px);min-height:420px}
.conv-card{width:330px;flex-shrink:0;display:flex;flex-direction:column;min-height:0}
.card-hd{height:40px;display:flex;align-items:center;gap:6px;padding:0 16px;border-bottom:2px solid #F1F3F5;font-size:13px;font-weight:600;color:#202124;flex-shrink:0}
.card-hd-n{font-size:12px;color:#9CA3AF;font-weight:500}
/* 会话列表项 */
.conv-list{flex:1;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#D1D5DB transparent}
.conv-list::-webkit-scrollbar{width:6px}
.conv-list::-webkit-scrollbar-thumb{background:#D1D5DB;border-radius:3px}
.conv{display:flex;gap:10px;padding:12px 16px;border-bottom:2px solid #F5F6F7;cursor:pointer;transition:background .12s}
.conv:hover{background:#F5F6FF}
.conv.on{background:#EEF2FF}
.conv-main{flex:1;min-width:0}
.conv-name{font-size:13px;font-weight:600;color:#202124;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-phone{font-size:11.5px;color:#9CA3AF;font-weight:400;margin-left:6px}
.conv-title{font-size:12.5px;color:#4B5563;line-height:1.6;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-last{font-size:11.5px;color:#B0B7C3;line-height:1.6;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.conv-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}
.conv-time{font-size:11px;color:#B0B7C3;white-space:nowrap}
.badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#FF3B30;color:#fff;font-size:11px;line-height:18px;text-align:center;font-weight:600}
.conv-empty{padding:28px 16px;text-align:center;color:#B0B7C3;font-size:12.5px;line-height:1.8}
/* 会话详情 */
.chat-card{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
.chat-hd{height:40px;display:flex;align-items:center;gap:8px;padding:0 16px;border-bottom:2px solid #F1F3F5;font-size:13px;font-weight:600;color:#202124;flex-shrink:0;white-space:nowrap;overflow:hidden}
.chat-hd .chat-phone{font-size:12px;color:#9CA3AF;font-weight:400}
.chat-hd .chat-meta{font-size:12px;color:#B0B7C3;font-weight:400;margin-left:auto;white-space:nowrap}
.chat-hd.empty{color:#B0B7C3;font-weight:400}
.chat-body{flex:1;overflow-y:auto;min-height:0;background:#F9FAFB;padding:16px;scrollbar-width:thin;scrollbar-color:#D1D5DB transparent}
.chat-body::-webkit-scrollbar{width:6px}
.chat-body::-webkit-scrollbar-thumb{background:#D1D5DB;border-radius:3px}
.chat-hint{padding:40px 16px;text-align:center;color:#B0B7C3;font-size:12.5px;line-height:1.9}
.chat-sys{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:14px}
.chat-row{display:flex;flex-direction:column;margin-bottom:14px}
.chat-row.right{align-items:flex-end}
.chat-row.left{align-items:flex-start}
.bubble{max-width:78%;padding:9px 12px;border-radius:10px;font-size:12.5px;line-height:1.7;white-space:pre-wrap;word-break:break-word}
.bubble.sys{max-width:86%;background:#fff;border:1px solid #E8EAED;color:#374151}
.bubble.svc{background:#E7F6EC;color:#1B5E20}
.bubble.usr{background:#fff;border:1px solid #E8EAED;color:#374151}
.sys-tag{display:inline-block;font-size:10.5px;color:#5E6AD2;background:#EEF2FF;border-radius:4px;padding:1px 6px;margin-bottom:6px}
.bubble-t{font-size:12.5px;font-weight:600;color:#202124;margin-bottom:4px}
.chat-time{font-size:11px;color:#B0B7C3;margin-top:5px}
/* 回复框 */
.reply-bar{border-top:2px solid #F1F3F5;padding:12px 16px;flex-shrink:0}
.fta{width:100%;min-height:76px;border:1px solid #E8EAED;border-radius:6px;padding:8px 10px;font-size:12.5px;font-family:inherit;color:#202124;outline:none;resize:vertical;line-height:1.7}
.fta:focus{border-color:#5E6AD2;box-shadow:0 0 0 4px rgba(94,106,210,.12)}
.fta::placeholder{color:#B0B7C3}
.reply-foot{display:flex;align-items:center;gap:12px;margin-top:10px}
.reply-count{font-size:11.5px;color:#B0B7C3;margin-right:auto}
/* ===== 说明面板（spec-fab.js 接管为右下角悬浮浮层） ===== */
.spec{background:#fff;border:1px solid #F1F3F5;border-radius:8px;margin-top:12px;overflow:hidden}
.spec-hd{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;cursor:pointer;font-size:13.5px;font-weight:500;user-select:none}
.spec-hd:hover{background:#F9FAFB}
.spec-arrow{font-size:10px;color:#B0B7C3;transition:transform .2s}
.spec-arrow.open{transform:rotate(90deg)}
.log-hd{display:flex;align-items:center;justify-content:space-between;padding:12px 0 10px;cursor:pointer;font-size:13px;font-weight:600;user-select:none}
.log-hd:hover{color:#5E6AD2}
.log-bd{display:none;padding:2px 0 6px}
.log-bd.open{display:block}
.log-item{font-size:12.5px;color:#4B5563;line-height:1.7;padding:6px 0;border-bottom:1px dashed #F1F3F5}
.log-item:last-child{border-bottom:none}
.spec-bd{display:none;padding:0 20px 20px}
.spec-bd.open{display:block}
.spec-sec{margin-top:14px}
.spec-sec h4{font-size:13px;font-weight:600;padding-bottom:6px;border-bottom:2px solid #F1F3F5;margin-bottom:8px}
.spec-sec p{font-size:12.5px;color:#4B5563;line-height:1.7}
.spec-sec code{background:#F1F3F5;border-radius:4px;padding:1px 5px;font-size:12px;color:#4F46E5;font-family:Consolas,Monaco,monospace}
.spec-table{width:100%;border-collapse:collapse;font-size:12.5px}
.spec-table th{background:#F9FAFB;padding:6px 12px;text-align:left;font-size:11.5px;color:#9CA3AF;border-bottom:2px solid #F1F3F5;white-space:nowrap}
.spec-table td{padding:6px 12px;border-bottom:2px solid #F5F6F7;color:#4B5563;white-space:normal}
