/* 在线客服挂件 */
.cs-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 300;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #2b5cff, #7b5cff);
  box-shadow: 0 8px 24px rgba(43,92,255,.4);
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.cs-fab:hover { transform: scale(1.06); }
.cs-fab svg { width: 26px; height: 26px; fill: #fff; }
.cs-fab .cs-badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 999px;
  background: #e0564f; color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px;
}
.cs-panel {
  position: fixed; right: 24px; bottom: 92px; z-index: 300;
  width: 340px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 14px; box-shadow: 0 16px 48px rgba(20,40,90,.25);
  display: flex; flex-direction: column; overflow: hidden;
}
.cs-panel.hidden { display: none; }
.cs-head {
  background: linear-gradient(90deg, #2b5cff, #7b5cff); color: #fff;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.cs-head .t { font-weight: 600; font-size: 15px; }
.cs-head .sub { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.cs-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; }
.cs-close { cursor: pointer; opacity: .85; font-size: 18px; line-height: 1; background: none; border: none; color: #fff; }
.cs-close:hover { opacity: 1; }
.cs-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; background: #f5f8ff; }
.cs-msg { display: flex; margin-bottom: 12px; gap: 8px; }
.cs-msg.me { flex-direction: row-reverse; }
.cs-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover;
  background: linear-gradient(135deg, #2b5cff, #7b5cff); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.cs-msg .bubble {
  max-width: 72%; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.6;
  background: #fff; border: 1px solid #e8eefb; color: #1f2d3d; word-break: break-word; white-space: pre-wrap;
}
.cs-msg.me .bubble { background: linear-gradient(90deg, #2b5cff, #7b5cff); color: #fff; border: none; }
.cs-msg .time { font-size: 11px; color: #a0aec0; margin-top: 3px; }
.cs-msg.me .time { text-align: right; }
.cs-input { border-top: 1px solid #e8eefb; padding: 10px; display: flex; gap: 8px; background: #fff; }
.cs-input input {
  flex: 1; min-width: 0; border: 1px solid #d8e0f0; border-radius: 999px; padding: 8px 14px; font-size: 13.5px; outline: none;
}
.cs-input input:focus { border-color: #2b5cff; }
.cs-send {
  border: none; cursor: pointer; border-radius: 999px; padding: 8px 18px; font-size: 13.5px; color: #fff;
  background: linear-gradient(90deg, #2b5cff, #7b5cff);
}
.cs-send:disabled { opacity: .5; cursor: not-allowed; }
.cs-offline { padding: 30px 16px; text-align: center; color: #6b7a90; font-size: 13.5px; }
