* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; }
body {
  font-size:15px; color:#1f2329; background:#eceff3;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",Arial,sans-serif;
  overscroll-behavior:none;
}
.text-center::after { content:' '; display:inline-block; width:0; height:100%; vertical-align:middle; }
.clearfix::after { content:""; display:block; clear:both; }

.service {
  width:100%; max-width:640px; height:100%; position:fixed; left:0; right:0; margin:auto;
  display:flex; flex-direction:column; background:#f5f7fa; box-shadow:0 0 40px rgba(0,0,0,.06);
}
.msg-head {
  height:52px; background:#fff; border-bottom:1px solid #eceef2; color:#1f2329;
  font-size:16px; font-weight:600; display:flex; align-items:center; justify-content:center;
  position:relative; flex-shrink:0; padding:0 54px; text-align:center;
}
.msg-head a {
  position:absolute; left:8px; top:50%; transform:translateY(-50%);
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  border-radius:10px; color:#4e5969; text-decoration:none;
}
.msg-head a i { font-size:20px; }
.msg-head .tha { font-size:15px; font-weight:600; line-height:1.3; }
.msg-head .thb { font-size:12px; font-weight:400; color:#86909c; line-height:1.4; }

.msg-box { flex:1; overflow-y:auto; padding:16px 14px 10px; -webkit-overflow-scrolling:touch; }
.msg { display:flex; align-items:flex-start; gap:10px; margin-bottom:16px; }
.msg .img1, .msg .img2 { width:36px; height:36px; flex-shrink:0; }
.msg .img1 img, .msg .img2 img {
  width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; background:#e5e6eb;
}
.msg .img2 { display:none; }
.msg .content {
  position:relative; max-width:72%; background:#fff; border-radius:4px 14px 14px 14px;
  padding:10px 13px; line-height:1.55; font-size:15px; word-break:break-word;
  overflow-wrap:anywhere; box-shadow:0 1px 2px rgba(0,0,0,.06);
}
.msg .content .indicate { display:none; }
.msg .content img { max-width:100%; border-radius:8px; display:block; }
.msg.on { flex-direction:row-reverse; }
.msg.on .img1 { display:none; }
.msg.on .img2 { display:block; }
.msg.on .content {
  background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff;
  border-radius:14px 4px 14px 14px; box-shadow:0 2px 6px rgba(37,99,235,.25);
}
.msg-box p { margin-top:-4px; }

input, textarea { border:none; font-family:inherit; }
input:focus, textarea:focus { outline:none; }
.msg-post {
  flex-shrink:0; background:#fff; border-top:1px solid #eceef2;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom));
  display:flex; align-items:flex-end; gap:8px;
}
.msg-post form { display:flex; align-items:center; flex-shrink:0; }
.msg-post textarea {
  flex:1; resize:none; border:1px solid #e5e6eb; border-radius:16px;
  padding:9px 12px; font-size:15px; line-height:1.4; max-height:96px;
  background:#f7f8fa; color:#1f2329;
}
.msg-post textarea:focus { border-color:#3b82f6; background:#fff; }
.msg-post label {
  position:static; width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.msg-post label .iconfont { font-size:22px; color:#4e5969; }
.msg-post input[type="file"] { display:none; }
.msg-post input[type="button"] {
  height:38px; padding:0 18px; border-radius:19px; background:#3b82f6; color:#fff;
  font-size:15px; border:none; cursor:pointer; flex-shrink:0;
}
.msg-post input[type="button"]:active { background:#2563eb; }

.service-box { flex:1; background:#f5f7fa; overflow-y:auto; font-size:14px; }
.user-box { padding:10px; }
.user-box a { text-decoration:none; color:inherit; }
.user-list {
  display:flex; align-items:center; gap:10px; background:#fff; border-radius:12px;
  padding:10px; margin-bottom:10px; box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.user-list img { width:44px; height:44px; border-radius:50%; flex-shrink:0; }
.user-list .user { flex:1; min-width:0; }
.user-list .user .name { font-size:15px; font-weight:600; color:#1f2329; }
.user-list .user .name .ison { margin-left:6px; font-size:12px; color:#86909c; font-weight:400; }
.user-list .user .last-msg { font-size:13px; color:#86909c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.user-list .data { text-align:right; flex-shrink:0; }
.user-list .data .time { font-size:12px; color:#c9cdd4; }
.user-list .data .num { display:inline-block; min-width:18px; height:18px; line-height:18px; border-radius:9px; background:#f53f3f; color:#fff; font-size:11px; text-align:center; padding:0 5px; margin-top:4px; }
.foot { display:flex; gap:10px; padding:10px; background:#fff; border-top:1px solid #eceef2; }
.foot > div { flex:1; height:42px; line-height:42px; text-align:center; background:#3b82f6; color:#fff; border-radius:10px; }
.foot a { display:block; height:100%; text-decoration:none; color:inherit; }

.pc-main { width:1014px; height:100%; position:fixed; left:0; right:0; margin:auto; }
.pc-left { width:372px; height:100%; float:left; background:#f5f7fa; border-right:1px solid #e5e6eb; }
.pc-right { width:642px; height:100%; float:left; display:flex; flex-direction:column; }
.msg-post label { color:#4e5969; }
.msg-post label svg { width:22px; height:22px; display:block; }
.msg-post label:hover { background:#f2f3f5; }
.msg-time { text-align:center; font-size:12px; color:#9aa0a6; margin:12px 0 10px; }

/* ===== 后台聊天窗口：全宽布局 ===== */
.pc-main {
  width:100% !important; height:100%; position:static !important; margin:0 !important;
  display:flex; align-items:stretch; background:#f5f7fa; padding:0;
}
.pc-left {
  width:340px !important; height:100%; flex-shrink:0; border:none !important;
  border-right:1px solid #e8ecf1 !important; background:#fff;
  display:flex; flex-direction:column;
}
.pc-right {
  flex:1; min-width:0; height:100%; border:none !important; background:#f5f7fa;
}
.pc-right iframe { width:100%; height:100%; border:none; display:block; }
.pc-service { height:100%; display:flex; flex-direction:column; }
.pc-service .service-box { flex:1; overflow-y:auto; }
.pc-service .foot { flex-shrink:0; }

/* 会话列表放大 */
.user-list { padding:14px 12px !important; gap:12px !important; border-radius:12px !important; margin-bottom:8px !important; }
.user-list img { width:46px !important; height:46px !important; }
.user-list .user .name { font-size:15px !important; }
.user-list .user .last-msg { font-size:13px !important; margin-top:3px !important; }
.user-list .data .time { font-size:12px !important; }
.user-box { padding:12px !important; }

/* ===== 菜单选项（蓝色可点）===== */
.opt {
  color: #3b82f6 !important;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 1px 2px;
  transition: color .15s;
}
.opt:hover { color: #2563eb !important; }
.opt:active { opacity: .7; }
