/* ============================================================
   ClawBot V5 — Global Stylesheet
   纯原生 CSS / 深色模式默认 / 玻璃拟态 / 蜘蛛网动态背景
   ============================================================ */

/* ---------- 主题变量（深色默认） ---------- */
:root {
  --wx-green: #07c160;
  --wx-green-dark: #06ad56;
  --bubble-green: #95ec69;
  --bubble-green-dark: #7fd854;

  --bg-base: #1a1a1a;
  --bg-panel: #2d2d2d;
  --bg-panel-2: #333333;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-strong: rgba(40, 40, 40, 0.75);
  --bg-input: rgba(255, 255, 255, 0.08);
  --bg-hover: rgba(255, 255, 255, 0.08);
  --bg-active: rgba(7, 193, 96, 0.15);

  --text-primary: #e8e8e8;
  --text-secondary: #9a9a9a;
  --text-tertiary: #666666;
  --text-inverse: #1a1a1a;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --bubble-in: #2d2d2d;
  --bubble-in-text: #e8e8e8;
  --bubble-out: #95ec69;
  --bubble-out-text: #1a1a1a;

  --danger: #ff4d4f;
  --warning: #faad14;
  --info: #1890ff;

  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --nav-width: 60px;
  --conv-width: 300px;

  --transition: 0.3s ease;
}

/* ---------- 浅色主题 ---------- */
[data-theme="light"] {
  --bg-base: #f2f3f5;
  --bg-panel: #ffffff;
  --bg-panel-2: #f7f7f7;
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-glass-strong: rgba(255, 255, 255, 0.82);
  --bg-input: rgba(0, 0, 0, 0.05);
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-active: rgba(7, 193, 96, 0.12);

  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);

  --bubble-in: #ffffff;
  --bubble-in-text: #1a1a1a;

  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; border: none; outline: none; background: transparent; color: inherit; }
ul, ol { list-style: none; }
a { color: var(--wx-green); text-decoration: none; }
img { max-width: 100%; display: block; }

/* 去除点击默认光影，改用震动反馈 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
button:focus, input:focus, textarea:focus { outline: none; }

/* ---------- 蜘蛛网动态背景 ---------- */
#spider-web {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

/* ---------- 玻璃拟态工具类 ---------- */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
}
.glass-strong {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(128, 128, 128, 0.5); }

/* ============================================================
   登录页 / 访客页 通用居中布局
   ============================================================ */
.center-page {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--wx-green), #0a8a45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(7, 193, 96, 0.35);
}
.auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.form-group { margin-bottom: 16px; }
.form-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  font-size: 15px;
  transition: all var(--transition);
}
.form-input:focus {
  border-color: var(--wx-green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15);
}
.form-input::placeholder { color: var(--text-tertiary); }
.btn-primary {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--wx-green), var(--wx-green-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-tip {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ============================================================
   客服工作台 — PC 三栏布局
   ============================================================ */
.agent-layout {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- 左侧 60px 图标导航 ---- */
.side-nav {
  width: var(--nav-width);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}
.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--wx-green), #0a8a45);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.nav-item {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--bg-active); color: var(--wx-green); }
.nav-item .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-spacer { flex: 1; }
.nav-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wx-green);
  margin-bottom: 8px;
}
.nav-status-dot.busy { background: var(--danger); }
.nav-status-dot.away { background: var(--warning); }

/* ---- 中栏 300px 会话列表 ---- */
.conv-panel {
  width: var(--conv-width);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.conv-search {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}
.conv-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.conv-list {
  flex: 1;
  overflow-y: auto;
}
.conv-item {
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-color);
}
.conv-item:hover { background: var(--bg-hover); }
.conv-item.active { background: var(--bg-active); }
.conv-item.pinned { background: var(--bg-input); }
.conv-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #667eea, #764ba2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  position: relative;
}
.conv-avatar .unread {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.conv-info { flex: 1; min-width: 0; }
.conv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.conv-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-time { font-size: 11px; color: var(--text-tertiary); flex-shrink: 0; margin-left: 8px; }
.conv-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.conv-msg {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.conv-pin-tag {
  font-size: 10px;
  color: var(--warning);
  margin-left: 4px;
  flex-shrink: 0;
}

/* ---- 右侧聊天区 ---- */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  min-width: 0;
}
.chat-header {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-panel);
}
.chat-header-info { min-width: 0; }
.chat-header-name {
  font-size: 15px;
  font-weight: 600;
}
.chat-header-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.chat-header-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn.danger:hover { color: var(--danger); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.time-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 8px 0;
  cursor: pointer;
  user-select: none;
}
.msg-row {
  display: flex;
  gap: 10px;
  max-width: 70%;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-row.in { align-self: flex-start; }
.msg-row.out { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.msg-row.in .msg-avatar { background: linear-gradient(135deg, #667eea, #764ba2); }
.msg-row.out .msg-avatar { background: linear-gradient(135deg, var(--wx-green), #0a8a45); }
.bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}
.msg-row.in .bubble {
  background: var(--bubble-in);
  color: var(--bubble-in-text);
  border-bottom-left-radius: 4px;
}
.msg-row.out .bubble {
  background: var(--bubble-out);
  color: var(--bubble-out-text);
  border-bottom-right-radius: 4px;
}
.bubble img {
  max-width: 260px;
  max-height: 260px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.bubble .file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  min-width: 200px;
}
.bubble .file-card .file-name { font-size: 13px; }
.bubble .file-card .file-size { font-size: 11px; opacity: 0.7; }

/* 底部输入栏 */
.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-panel);
}
.input-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.input-area {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.input-area textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-size: 14px;
  resize: none;
  line-height: 1.4;
}
.send-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--wx-green);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.send-btn:hover { background: var(--wx-green-dark); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 快捷回复面板（右侧滑出） ---------- */
.quick-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-color);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.quick-panel.open { transform: translateX(0); }
.quick-panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quick-panel-title { font-size: 15px; font-weight: 600; }
.quick-panel-search { padding: 12px 16px; }
.quick-panel-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-size: 13px;
}
.quick-list { flex: 1; overflow-y: auto; padding: 0 12px; }
.quick-item {
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 6px;
}
.quick-item:hover { background: var(--bg-hover); }
.quick-item-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.quick-item-content {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 管理面板（右侧抽屉，替代中栏） ---------- */
.manage-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow-y: auto;
}
.manage-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
}
.manage-title { font-size: 18px; font-weight: 600; }
.manage-body { padding: 24px; max-width: 800px; width: 100%; margin: 0 auto; }
.manage-list-item {
  padding: 14px 16px;
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.manage-list-item .info { flex: 1; min-width: 0; }
.manage-list-item .info .title { font-size: 14px; font-weight: 500; }
.manage-list-item .info .sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.btn-sm {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all var(--transition);
}
.btn-sm:hover { background: var(--bg-hover); }
.btn-sm.danger { color: var(--danger); }
.btn-sm.primary { background: var(--wx-green); color: #fff; }

/* ============================================================
   图片查看器 / 弹窗 / Toast
   ============================================================ */
.image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.image-viewer.open { display: flex; }
.image-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn-ghost {
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition);
}
.btn-ghost:hover { background: var(--bg-hover); }

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease;
  pointer-events: auto;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.success { border-left: 3px solid var(--wx-green); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ============================================================
   访客端二维码页
   ============================================================ */
.qr-wrapper {
  padding: 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.qr-wrapper svg, .qr-wrapper img {
  width: 220px;
  height: 220px;
  display: block;
}
.qr-status {
  text-align: center;
  font-size: 15px;
  color: var(--wx-green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.qr-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wx-green);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.qr-status.error { color: var(--danger); }
.qr-status.error .dot { background: var(--danger); animation: none; }

/* ============================================================
   移动端适配 (<768px)
   ============================================================ */
.mobile-only { display: none; }
.mobile-nav-bar { display: none; }

@media (max-width: 767px) {
  .side-nav, .conv-panel { display: none; }

  /* 移动端底部导航 */
  .mobile-nav-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    z-index: 30;
  }
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-secondary);
    font-size: 10px;
    position: relative;
  }
  .mobile-nav-item.active { color: var(--wx-green); }
  .mobile-nav-item .badge {
    position: absolute;
    top: 6px;
    right: 50%;
    margin-right: -18px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 移动端页面容器 */
  .agent-layout { flex-direction: column; }
  .chat-panel { padding-bottom: 56px; }
  .manage-panel { padding-bottom: 56px; }

  /* 移动端会话列表页 */
  .mobile-conv-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  .mobile-header {
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
  }
  .mobile-header .title { font-size: 17px; font-weight: 600; }
  .mobile-conv-list { flex: 1; overflow-y: auto; padding-bottom: 56px; }

  /* 移动端聊天页 */
  .mobile-chat-page {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    background: var(--bg-base);
    z-index: 25;
  }
  .mobile-chat-page.open { display: flex; }
  .mobile-chat-page .chat-messages { padding-bottom: 10px; }
  .mobile-chat-page .chat-input-bar { padding-bottom: 10px; }

  .back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--wx-green);
    font-size: 15px;
  }

  .msg-row { max-width: 82%; }
  .quick-panel { width: 100%; }

  .desktop-only { display: none !important; }
  .mobile-only { display: flex; }
}

/* PC 端隐藏移动端元素 */
@media (min-width: 768px) {
  .mobile-chat-page, .mobile-conv-page, .mobile-nav-bar { display: none !important; }
}

/* ============================================================
   工具类
   ============================================================ */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--wx-green); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
