/* ============================================================
   系统运维助手 — 浅色主题（参考豆包 / Codex）
   ============================================================ */
:root{
  --bg: #ffffff;            /* 主区背景 */
  --bg-side: #f7f8fa;       /* 侧栏 */
  --bg-raise: #f2f3f5;      /* 浮起面板/用户气泡/输入框 */
  --bg-hover: #f0f1f4;      /* 悬停 */
  --border: #e5e7eb;
  --border-light: #eef0f3;
  --text: #1f2328;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --accent: #1f2328;        /* 发送按钮：深墨 */
  --brand: #4d6bfe;         /* 豆包蓝：logo/头像/链接 */
  --link: #4d6bfe;
  --danger: #e5484d;
  --red: #C52E1E; --red-hover: #B52A1C; --red-tint: #FCF2F1;  /* 印章红（两端共用） */
  --wash: #f5f6f8;          /* 悬停/按压水洗色 */
}
*{ box-sizing: border-box; }
[hidden]{ display:none !important; }  /* 修复：容器写了 display 会盖掉 hidden 属性（用户管理弹层关不掉的根因） */
html, body{ height: 100%; }
body{
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Roboto, "PingFang SC", sans-serif;
  font-size: 14.5px; line-height: 1.6;
}

.layout{ display: flex; height: 100vh; }

/* ======== 侧栏 ======== */
.sidebar{
  width: 260px; flex: none; background: var(--bg-side);
  display: flex; flex-direction: column; border-right: 1px solid var(--border-light);
}
.brand{ display: flex; align-items: center; gap: 10px; padding: 16px 14px 10px; }
.brand-logo{
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name{ font-weight: 600; font-size: 14.5px; }
.brand-version{ font-size: 11px; color: var(--text-3); }

.btn-new-chat{
  margin: 6px 14px 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; width: calc(100% - 28px); box-sizing: border-box;
}
.btn-new-chat svg{ flex: 0 0 auto; }
.btn-new-chat:hover{ background: var(--bg-raise); }

/* 侧栏收起/展开 */
.side-toggle{ margin-left:auto; flex:none; width:30px; height:30px; padding:0; border:none;
  background:transparent; border-radius:8px; color:var(--text-3); cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; }
.side-toggle:hover{ background:var(--bg-hover); color:var(--text); }
.side-open-fab{ display:none; position:absolute; top:12px; left:12px; z-index:40;
  width:34px; height:34px; border:1px solid var(--border-light); background:#fff;
  border-radius:9px; color:var(--text-2); cursor:pointer;
  align-items:center; justify-content:center; }
.side-open-fab:hover{ background:var(--bg-hover); color:var(--text); }
body.side-hidden .sidebar{ display:none; }
body.side-hidden .side-open-fab{ display:inline-flex; }

.conv-section{ flex: 1; display: flex; flex-direction: column; min-height: 0; }
.section-head{ display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; }
.section-title{ font-size: 12px; color: var(--text-3); }
.conv-list{ list-style: none; overflow-y: auto; flex: 1; padding: 2px 8px; margin: 0; }
.conv-item{
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 1px 0;
  border-radius: 8px; cursor: pointer; color: var(--text-2); font-size: 13.5px;
}
.conv-item:hover{ background: var(--bg-hover); }
.conv-dot{ width: 6px; height: 6px; border-radius: 50%; background: #565656; flex: none; }
.conv-title{ flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.conv-del{ border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 13px;
  opacity: 0; padding: 2px 4px; border-radius: 5px; transition: opacity .12s ease; }
.conv-rename-btn{ border: none; background: none; color: var(--text-3); cursor: pointer;
  opacity: 0; padding: 2px 3px; border-radius: 5px; display: inline-flex; align-items: center;
  transition: opacity .12s ease; }
.conv-item:hover .conv-del, .conv-item:hover .conv-rename-btn{ opacity: 1; }
.conv-del:hover{ color: var(--danger); background: rgba(255,107,107,.12); }
.conv-rename-btn:hover{ color: var(--text); background: var(--bg-hover); }
/* 触屏无 hover：图标常显，避免点不到 */
@media (hover: none){
  .conv-del, .conv-rename-btn{ opacity: .75; }
}
.conv-empty{ text-align: center; color: var(--text-3); font-size: 12.5px; padding: 20px 0; }
.conv-empty-error{ color: #b04c3a; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.sidebar-footer{ border-top: 1px solid var(--border-light); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.me-line{ display: flex; align-items: center; gap: 9px; padding: 2px 2px 8px; }
.me-avatar{
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.me-name{ flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.role-badge{ display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; background: var(--red-tint); color: var(--red); white-space: nowrap; }
.role-badge.plain{ background: transparent; color: var(--text-2); border: 1px solid var(--border-light); padding: 0 7px; }
.admin-link{ display: flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none;
  font-size: 13px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.admin-link:hover{ background: var(--bg-hover); color: var(--text); }
.admin-link-icon{ font-size: 14px; }
.sidebar-note{ font-size: 11px; color: var(--text-3); margin-top: 6px; padding: 0 8px; }

/* ======== 主区 ======== */
.main{ flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.main-scroll{ flex: 1; overflow-y: auto; }

/* ---- 欢迎页（首页态：问候居中，输入框沉底变窄） ---- */
.welcome{ display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 24px; min-height: 100%; justify-content: center; }
body.home .main-scroll{ display: flex; flex-direction: column; }
body.home .welcome{ flex: 1; }
.composer-slot{ width: 100%; }
body.home .composer-wrap{ width: min(780px, 100%); margin: 0 auto; padding: 14px 0 4px; }
body.home .composer{ max-width: 100%; margin: 0; }
body.home .composer-note{ display: none; }
.welcome-title{ font-size: 30px; font-weight: 600; margin: 0 0 6px; letter-spacing: .5px; }
.welcome-sub{ color: var(--text-2); margin: 0 0 4px; font-size: 14px; }
.examples{ display: flex; flex-direction: column; gap: 2px; align-items: stretch; width: min(780px, 100%); margin: 10px auto 0; }
.example-chip{
  text-align: left; padding: 9px 14px; border-radius: 10px; border: none;
  background: transparent; color: var(--text-2); font-size: 13.5px; cursor: pointer;
}
.example-chip:hover{ background: var(--bg-raise); color: var(--text); }

/* ---- 消息流 ---- */
.chat-flow{ display: flex; flex-direction: column; gap: 24px; max-width: 780px; margin: 0 auto; padding: 24px 20px 8px; width: 100%; }
.msg{ display: flex; gap: 12px; }
.msg-user{ justify-content: flex-end; }
.msg-user .msg-body{ max-width: 78%; display: flex; flex-direction: column; align-items: flex-end; }
.msg-user .bubble{
  background: var(--bg-raise); border-radius: 18px; padding: 10px 16px;
}
.msg-avatar{
  width: 30px; height: 30px; border-radius: 50%; flex: none; margin-top: 2px;
  background: var(--brand); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.msg-user .msg-avatar{ display: none; }
.msg-body{ min-width: 0; }
/* 用户消息里的图片：气泡内缩略图，点击放大。
   根因修复：body 改 column flex + 内容贴右。否则 flex item 的 shrink-to-fit 宽度
   会按 img 自然宽参与计算，而 img 被 max-width:min(240px,100%) 的循环百分比压到 240，
   两者脱节 → 图片右侧留大片空白，宽扁图看起来像“居中”。 */
.msg-imgs{ display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; width: 100%; justify-content: flex-end; }
.msg-img{ max-width: 240px; max-width: min(240px, 100%); max-height: 180px; border-radius: 10px;
  border: 1px solid var(--border-light); background: #fff; display: block; cursor: zoom-in; }
.bubble{ min-width: 0; }
.msg-user .bubble{ white-space: pre-wrap; word-break: break-word; max-width: 100%; }
.msg-foot{ display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ---- Markdown ---- */
.md h1, .md h2, .md h3, .md h4{ margin: 12px 0 6px; line-height: 1.45; }
.md h1{ font-size: 17.5px; } .md h2{ font-size: 16px; } .md h3{ font-size: 14.5px; } .md h4{ font-size: 14px; }
.md p{ margin: 7px 0; }
.md p:first-child{ margin-top: 0; } .md p:last-child{ margin-bottom: 0; }
.md ul, .md ol{ margin: 6px 0 6px 20px; }
.md li{ margin: 3px 0; }
.md code{
  background: #f4f5f7; border: 1px solid var(--border-light); border-radius: 5px;
  padding: 1px 6px; font-size: 12.5px; font-family: Consolas, Menlo, monospace; color: #d8d8d8;
}
.md pre{
  background: #f7f8fa; border: 1px solid var(--border-light); border-radius: 10px;
  padding: 12px 14px; overflow-x: auto; margin: 8px 0;
}
.md pre code{ background: transparent; border: none; color: inherit; padding: 0; font-size: 12.5px; line-height: 1.55; }
.md a{ color: var(--link); }
.md blockquote{ margin: 8px 0; padding: 2px 12px; border-left: 3px solid var(--border); color: var(--text-2); }
.md hr{ border: none; border-top: 1px solid var(--border-light); margin: 12px 0; }
.md-table-wrap{ overflow-x: auto; margin: 8px 0; }
.md table{ border-collapse: collapse; font-size: 13px; width: 100%; }
.md th, .md td{ border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md th{ background: #f7f8fa; font-weight: 600; }

/* ---- 工具提示（检索中） ---- */
.tool-trace{ display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 0; }
.tool-trace:empty{ display: none; }
.tool-chip{
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--text-3); background: transparent; border: 1px solid var(--border-light);
  border-radius: 8px; padding: 3px 9px;
}
.tool-chip.running{ color: var(--text-2); border-color: transparent; padding: 3px 0; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{ opacity: .55; } 50%{ opacity: 1; } }

.src-chip{ display: inline-block; font-size: 12px; color: var(--text-3); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 3px 9px; cursor: default; }
.src-chip:hover{ color: var(--text-2); border-color: var(--border); }
.src-row{ display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---- 处理过程折叠条（参照原型“后台处理过程”） ---- */
.trace-block{ min-width: 0; }
.trace-toggle{
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--text-3); background: transparent; border: 1px solid var(--border-light);
  border-radius: 8px; padding: 3px 9px; cursor: pointer;
}
.trace-toggle::before{ content: '▸'; font-size: 10px; transition: transform .15s ease; }
.trace-toggle.open::before{ transform: rotate(90deg); }
.trace-toggle:hover{ color: var(--text-2); border-color: var(--border); }
.trace-steps{ display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.trace-step{
  display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--text-2);
  background: var(--bg-side); border: 1px solid var(--border-light); border-radius: 8px; padding: 6px 10px;
}
.trace-ico{ flex: none; font-size: 12px; }
.trace-txt{ min-width: 0; overflow-wrap: anywhere; }

/* ---- 反馈（回执式：解决了 / 没解决，对齐解决率指标） ---- */
.fb-wrap{ display: inline-flex; gap: 2px; align-items: center; }
.fb-btn{
  width: 28px; height: 28px; padding: 0; border: none; border-radius: 8px;
  background: none; color: var(--text-3); font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.fb-btn:hover{ background: var(--bg-raise); color: var(--text); }
.fb-btn svg{ display: block; }
.fb-btn.active-up{ color: #1e8e4e; background: #e5f6ec; }
.fb-btn.active-down{ color: var(--danger); background: #fdf0f0; }
/* 已解决 / 转工单：主操作按钮，醒目 */
.fb-act{
  height: 32px; padding: 0 16px; margin-left: 10px; border-radius: 16px;
  border: 1px solid transparent; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; display: inline-flex; align-items: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fb-act.resolve{ background: #e8f7ee; color: #12703c; border-color: #c6e9d3; }
.fb-act.resolve:hover{ background: #dcf2e5; }
.fb-act.resolve.active{ background: #1e8e4e; color: #fff; border-color: #1e8e4e; }
.fb-act.ticket{ background: var(--red-tint); color: var(--red); border-color: #f0d5d2; }
.fb-act.ticket:hover{ background: #fbe9e7; }
.fb-act.ticket.active{ background: var(--red); color: #fff; border-color: var(--red); }
.fb-note{ font-size: 12px; color: var(--text-3); }
/* 参照 ChatGPT：回答无气泡无头像，正文贴左对齐 */
.msg-assistant .msg-avatar{ display: none; }
.msg-assistant .bubble{ background: transparent; }

/* ---- 错误条 ---- */
.msg-error{ display: flex; align-items: center; gap: 10px; background: #fdf0f0; border: 1px solid #f3c8c8;
  color: #b42323; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-top: 6px; }
.btn-retry{ border: 1px solid #f3c8c8; background: none; color: #b42323; border-radius: 7px;
  padding: 3px 10px; cursor: pointer; font-size: 12px; }
.btn-retry:hover{ background: #4a2e2e; }

/* ---- 输入区（两行式：上输入、下工具行，参考 Coze 风格） ---- */
.composer-wrap{ padding: 10px 20px 14px; }
.composer{
  display: flex; flex-direction: column; max-width: 780px; margin: 0 auto;
  background: var(--bg-raise); border: 1px solid var(--border-light); border-radius: 22px;
  padding: 10px 12px 8px;
}
.composer:focus-within{ border-color: #565656; }
.composer-bar{ display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.bar-spacer{ flex: 1; }
.icon-btn{ border: none; background: none; color: var(--text-2); font-size: 17px; cursor: pointer;
  padding: 4px 6px; border-radius: 8px; }
.btn-plus{ width: 32px; height: 32px; padding: 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border-light); border-radius: 50%;
  color: #3c4043; }
.btn-plus svg{ display: block; }
.btn-plus:hover{ border-color: #c9ced6; background: #f7f8fa; }
.icon-btn:hover{ background: var(--bg-hover); }
#input{
  width: 100%; box-sizing: border-box; border: none; background: transparent; color: var(--text);
  font-size: 14.5px; font-family: inherit; line-height: 1.55; resize: none; outline: none;
  max-height: 180px; padding: 4px 4px 0;
}
#input::placeholder{ color: var(--text-3); }
.btn-send{
  width: 36px; height: 36px; flex: none; border: none; border-radius: 50%;
  background: var(--accent); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-send svg{ display: block; }
.btn-send:hover{ background: #000; }
.btn-send:disabled{ background: #c7cdd6; opacity: 1; cursor: not-allowed; }
.btn-send.idle{ background: #fff; color: #17181a; box-shadow: inset 0 0 0 1px var(--border-light); }
.btn-send.idle:hover{ background: #f5f6f8; }
body.sending .btn-send{ opacity: .55; }

/* 语音输入按钮（发送键左侧）：与发送键同规格（36px 白底圆形描边），水平居中对齐 */
.btn-mic{ width:36px; height:36px; padding:0; flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--border-light); border-radius:50%;
  color:#17181a; }
.btn-mic:hover{ background:#f5f6f8; }
.btn-mic.recording{ background:#fdecec; border-color:#f3c1c3; color:#e5484d; animation:micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(229,72,77,.32); } 50%{ box-shadow:0 0 0 7px rgba(229,72,77,0); } }
@media (prefers-reduced-motion: reduce){ .btn-mic.recording{ animation:none; } }

/* 上传中进度 chip */
.attach-chip.uploading{ position: relative; overflow: hidden; padding-right: 30px; }
.attach-chip.uploading .up-pct{ margin-left: 6px; font-size: 11.5px; color: var(--brand); font-variant-numeric: tabular-nums; }
.attach-chip.uploading .up-bar{ position: absolute; left: 0; bottom: 0; height: 3px;
  background: var(--brand); opacity: .55; transition: width .2s ease; }

/* 全局 toast */
#g-toast{ position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: rgba(30,32,36,.92); color: #fff; font-size: 13px; padding: 9px 16px;
  border-radius: 10px; opacity: 0; pointer-events: none; transition: all .22s ease;
  z-index: 300; max-width: min(80vw, 520px); text-align: center; }
#g-toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
.composer-note{ text-align: center; font-size: 11px; color: var(--text-3); margin-top: 8px; }
.attachments{ display: flex; flex-wrap: wrap; gap: 6px; max-width: 780px; margin: 0 auto 8px; }
.attach-chip{ display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2);
  background: var(--bg-raise); border: 1px solid var(--border-light); border-radius: 9px; padding: 4px 10px; }
.attach-chip:has(.attach-thumb){ padding: 3px 8px 3px 3px; }
.attach-thumb{ width: 34px; height: 34px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border-light); background: #fff; display: block; }
.attach-remove{ border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 12px; padding: 0; }
.attach-remove:hover{ color: var(--danger); }
/* 拖拽上传：拖文件悬停时全屏提示 + 输入区高亮虚线框 */
body.dragging-file::after{
  content: '松手上传附件';
  position: fixed; inset: 0; z-index: 250; pointer-events: none;  /* 不挡 drop 事件 */
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.55);
  font-size: 15px; font-weight: 600; color: var(--brand); letter-spacing: 2px;
}
body.dragging-file .composer{ outline: 2px dashed var(--brand); outline-offset: 3px; background: var(--bg-raise); }

/* ---- 移动端悬浮新建按钮 ---- */
.btn-fab{ display:none; position:fixed; right:16px; bottom:76px; width:48px; height:48px;
  border-radius:50%; border:none; background:var(--brand); color:#fff;
  font-size:26px; line-height:1; box-shadow:0 4px 12px rgba(0,0,0,.4); cursor:pointer; z-index:50; }

/* ======== 用户管理弹层 ======== */
.modal-mask{ position:fixed; inset:0; background:rgba(15,18,22,.35); z-index:100;
  display:flex; align-items:center; justify-content:center; }
.modal{ background:#ffffff; border:1px solid var(--border-light); border-radius:14px; width:min(780px, 94vw); max-height:82vh; overflow:auto;
  padding:20px 22px; box-shadow:0 12px 40px rgba(0,0,0,.5); }
.modal-head{ display:flex; justify-content:space-between; align-items:center; font-size:17px; font-weight:600; }
.btn-x{ border:none; background:none; font-size:22px; line-height:1; cursor:pointer; color:var(--text-3); }
.btn-x:hover{ color:var(--text); }
.modal-sub{ font-size:12px; color:var(--text-3); margin:6px 0 14px; }
.users-modal{ width:min(1080px, 96vw); }
.users-table{ width:100%; border-collapse:collapse; font-size:13px; }
.users-table th{ text-align:left; color:var(--text-3); font-weight:500; padding:10px 10px; border-bottom:1px solid var(--border); white-space:nowrap; }
.users-table td{ padding:11px 10px; border-bottom:1px solid var(--border-light); vertical-align:middle; white-space:nowrap; }
.users-table tbody tr:last-child td{ border-bottom:none; }
.users-table td.mono{ font-size:11px; color:var(--text-3); max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.users-table td.ops{ white-space:nowrap; }
.users-empty{ text-align:center; color:var(--text-3); padding:24px 0 !important; }
.u-btn{ border:1px solid var(--border); background:transparent; color:var(--text); border-radius:7px;
  padding:4px 10px; font-size:12px; cursor:pointer; margin-right:6px; }
.u-btn:hover:not(:disabled){ background:var(--bg-hover); }
.u-btn.primary{ background:transparent; color:var(--text); border-color:var(--border); }
.u-btn.warn{ color:var(--danger); border-color:#5c3333; }
.u-btn:disabled{ opacity:.4; cursor:not-allowed; }
.st-badge{ display:inline-block; padding:1px 8px; border-radius:9px; font-size:11px; white-space:nowrap; }
.st-badge.on{ background:#e5f6ec; color:#1e8e4e; }
.st-badge.off{ background:transparent; color:var(--text-2); border:1px solid var(--border-light); padding:0 7px; }

/* ======== 滚动条（深色） ======== */
::-webkit-scrollbar{ width: 8px; height: 8px; }
::-webkit-scrollbar-thumb{ background: #d5d8de; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover{ background: #c0c4cc; }
::-webkit-scrollbar-track{ background: transparent; }

/* ======== 移动端 ======== */
/* 手机端专用元素：桌面默认隐藏（手机断点内再开启） */
.m-topbar{ display:none; }
.examples-label{ display:none; }
.hello-desktop{ display:none; }
.welcome-avatar{ display:none; }

/* ======== 手机端（Kimi 式布局）：顶栏胶囊 / 抽屉会话 / 沉底输入 / 横滑示例 ======== */
/* 仅手机断点生效；桌面端零改动。新建会话从右下悬浮球上移到顶栏 ＋ */
@media (max-width: 720px){
  /* 会话列表：从左侧抽屉唤出（原来手机上根本打不开，这里修复） */
  .sidebar, body.side-hidden .sidebar{ display:flex; position:fixed; left:0; top:0; bottom:0;
    width:min(78vw,320px); z-index:70; transform:translateX(-102%);
    transition:transform .22s ease; box-shadow:0 0 40px rgba(15,18,22,.18); }
  .sidebar.open{ transform:none; }
  .side-open-fab{ display:none !important; }
  .btn-fab{ display:none; }
  .drawer-mask{ position:fixed; inset:0; background:rgba(15,18,22,.38); z-index:65; border:none; padding:0; }

  /* 对话页眉只在桌面用（手机顶栏已有会话名，否则重复一条） */
  .chat-head{ display:none; }

  /* 侧栏抽屉：与桌面同款——灰纸面 + 圆标 logo + 墨黑新对话 + 红左条激活项 */
  .sidebar{ background:#F5F6F8; }
  .brand-logo{ background:url('logo-mark.png') center/contain no-repeat; color:transparent; font-size:0;
    border-radius:0; }
  .btn-new-chat{ height:42px; padding:0 16px; border:none; border-radius:8px; background:var(--text);
    color:#fff; font-weight:600; justify-content:center; }
  .conv-dot{ display:none; }
  .conv-item.active{ background:#fff; border:1px solid var(--border-light); color:var(--text);
    font-weight:600; position:relative; overflow:hidden; }
  .conv-item.active::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--red); }
  .me-avatar{ background:var(--border-light); color:var(--text); }
  .role-badge{ background:var(--bg-raise); color:var(--text-2); }
  .sidebar .login-btn{ background:var(--red); }

  /* 顶栏：浮动胶囊风（☰ / 品牌名 / ＋） */
  .m-topbar{ display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:8px 12px; background:#fff; border-bottom:1px solid var(--border-light); }
  .m-left{ display:flex; align-items:center; gap:8px; min-width:40px; }
  .m-right{ width:88px; flex:none; }   /* 左侧☰+✎两个按钮宽88，右侧等宽占位，标题严格居中 */
  .m-brand{ flex:1; text-align:center; font-size:14px; font-weight:600; color:var(--text); opacity:.85;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #m-new{ display:flex; }                      /* 新建按钮常驻：首页/对话界面都在 ☰ 旁 */

  .m-icon-btn{ width:40px; height:40px; flex:none; border:1px solid var(--border-light); border-radius:50%; background:#fff;
    color:var(--text); cursor:pointer;
    display:flex; align-items:center; justify-content:center; }
  .m-icon-btn:active{ background:var(--bg-raise); }

  /* 首页：与桌面「白纸鹅卵石」一致——单行问候 + 输入卡 + 标签 + 白胶囊建议（去掉圆球与两行问候） */
  body.home .welcome-title, body.home .welcome-sub{ display:none; }  /* 加载失败时无 home 类，报错文案仍可见 */
  body.home .hello-desktop{ display:block; margin:0; }
  .hello-l1{ font-size:22px; font-weight:600; letter-spacing:-.01em; color:var(--text); }
  .composer-slot{ margin-top:16px; }  /* 问候语贴近对话框 */
  body.home.input-focus .hello-desktop{ display:none; }  /* 聚焦输入时问候让位，建议保留（沿用旧机手感） */

  /* 首页建议：与桌面一致——灰标签 + 白胶囊卡左对齐（emoji 两端都隐藏）；新建态不再单独收起 */
  body.home .examples-label{ display:block; align-self:stretch; text-align:left; font-size:12px;
    color:var(--text-2); margin:24px 2px 0; }
  .examples{ gap:10px; padding:10px 2px 6px; align-items:flex-start; }
  .example-chip{ background:#fff; border-radius:12px;
    padding:11px 16px; font-size:14px; color:var(--text);
    box-shadow:0 2px 10px rgba(15,18,22,.08); }
  .example-chip:active{ background:var(--wash); }
  .example-chip .ex-emoji{ display:none; }

  /* 登录页：与桌面「白纸鹅卵石」一致——白底、圆标 logo、红下划线、红胶囊 CTA */
  #login-view{ padding:0 24px; box-sizing:border-box; background:#fff; }
  .login-card{ margin:auto 0; width:100%; background:transparent; border:none; border-radius:0;
    box-shadow:none; padding:0; }
  .login-logo{ background:url('logo-mark.png') center/contain no-repeat; color:transparent; font-size:0;
    border-radius:0; width:44px; height:44px; margin:0 auto 28px; }
  .login-title{ font-size:28px; font-weight:600; letter-spacing:-.02em; color:var(--text); }
  .login-title::after{ content:''; display:block; width:36px; height:3px; background:var(--red); margin:16px auto 0; }
  .login-sub{ margin:16px 0 0; font-size:14px; color:var(--text-2); }
  #login-view .login-btn{ height:48px; border-radius:24px; background:var(--red); margin-top:28px; }
  #login-view .login-btn:hover{ background:var(--red-hover); }
  #login-view .login-btn.wecom{ background:var(--red); margin-top:2px; }

  /* 输入框：首页/对话都吸底，大圆角浮起（首页不再居中悬浮） */
  .composer-wrap, body.home .composer-wrap{ position:fixed; left:0; right:0; bottom:0; z-index:45;
    width:auto; margin:0;
    padding:8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    background:linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--bg) 26%); }
  .composer{ border-radius:24px; background:#fff; border-color:var(--border-light);
    box-shadow:none; }
  .composer:focus-within{ border-color:#c9ced6; }
  .composer textarea{ font-size:16px; }  /* ≥16px 防 iOS 聚焦自动放大 */
  .composer-note{ font-size:10.5px; }

  /* 对话页：红 ↑ 发送 / 用户气泡 12px 圆角 / 来源行发丝线（与桌面一致） */
  .btn-send{ background:var(--red); }
  .btn-send:active{ background:var(--red-hover); }
  .msg-user .bubble{ border-radius:12px 12px 4px 12px; padding:12px 16px; font-size:14px; }
  .src-line{ border-top:1px solid var(--border-light); }

  /* 内容区避让固定输入框 */
  body.home .main-scroll{ padding-bottom:170px; }
  .chat-flow{ padding: 10px 14px calc(150px + env(safe-area-inset-bottom, 0px)); }
  .msg-user .msg-body{ max-width: calc(100% - 40px); }
}

/* ======== 管理后台页（admin.html，独立深色样式） ======== */
body{ background: var(--bg); }
.admin-topbar{ display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 22px; border-bottom:1px solid var(--border-light); background:var(--bg-side); }
.admin-title{ font-size:16px; font-weight:600; }
.admin-back{ color:var(--text-2); text-decoration:none; font-size:13px; padding:6px 10px; border-radius:8px; }
.admin-back:hover{ background:var(--bg-hover); color:var(--text); }
.admin-body{ display:flex; min-height:calc(100vh - 57px); }
.admin-tabs{ width:200px; flex:none; padding:14px 10px; display:flex; flex-direction:column; gap:4px; }
.admin-tab{ padding:9px 12px; border-radius:9px; color:var(--text-2); font-size:13.5px; cursor:pointer;
  border:none; background:none; text-align:left; }
.admin-tab:hover{ background:var(--bg-hover); color:var(--text); }
.admin-tab.active{ background:var(--bg-raise); color:var(--text); font-weight:600; }
.admin-main{ flex:1; padding:18px 24px; overflow:auto; }
.tab-panel[hidden]{ display:none; }
.panel-card{ background:var(--bg-side); border:1px solid var(--border-light); border-radius:12px; padding:14px 16px; margin-bottom:14px; }
.panel-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.subtabs{ display:flex; gap:4px; }
.subtab{ padding:5px 12px; border-radius:8px; border:none; background:none; color:var(--text-2);
  font-size:12.5px; cursor:pointer; }
.subtab:hover{ background:var(--bg-hover); }
.subtab.active{ background:var(--bg-raise); color:var(--text); }
.count{ font-size:11px; color:var(--text-3); background:var(--bg-raise); border-radius:8px; padding:1px 8px; }
.admin-table{ width:100%; border-collapse:collapse; font-size:13px; margin-top:10px; }
.admin-table th{ text-align:left; color:var(--text-3); font-weight:500; padding:8px 8px; border-bottom:1px solid var(--border); white-space:nowrap; }
.admin-table td{ padding:9px 8px; border-bottom:1px solid var(--border-light); vertical-align:top; }
.btn-mini{ border:1px solid var(--border); background:transparent; color:var(--text); border-radius:7px;
  padding:4px 10px; font-size:12px; cursor:pointer; margin-right:6px; }
.btn-mini:hover{ background:var(--bg-hover); }
.btn-mini.btn-approve{ background:#e5f6ec; color:#1e8e4e; border-color:#bfe6cf; }
.btn-mini.btn-danger{ color:var(--danger); border-color:#5c3333; }
.btn-primary{ background:var(--accent); color:#fff; border:none; border-radius:8px;
  padding:7px 14px; font-size:13px; font-weight:600; cursor:pointer; }
.btn-primary:hover{ background:#000; }
.empty-tip{ text-align:center; color:var(--text-3); padding:26px 0; font-size:13px; }
.muted{ color:var(--text-3); } .small{ font-size:12px; }
.qa-card{ border:1px solid var(--border-light); border-radius:11px; padding:12px 14px; margin:10px 0; background:var(--bg-side); }
.qa-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.qa-label{ font-size:11px; color:var(--text-3); }
.qa-q{ font-weight:600; margin-bottom:6px; }
.qa-a{ color:var(--text-2); font-size:13px; white-space:pre-wrap; }
.qa-actions{ margin-top:10px; display:flex; gap:8px; }
.token-gate{ max-width:420px; margin:12vh auto; text-align:center;
  background:var(--bg-side); border:1px solid var(--border-light); border-radius:14px; padding:30px 26px; }
.token-title{ font-size:17px; font-weight:600; margin-bottom:6px; }
.token-sub{ font-size:12.5px; color:var(--text-3); margin-bottom:16px; }
.token-gate input{ width:100%; padding:9px 12px; border-radius:9px; border:1px solid var(--border);
  background:var(--bg-raise); color:var(--text); font-size:13.5px; outline:none; margin-bottom:10px; }
.token-error{ color:var(--danger); font-size:12px; min-height:16px; margin-bottom:6px; }
.form-foot{ margin-top:12px; display:flex; gap:8px; }

/* ======== 侧栏底部：设置 / 登录 ======== */
.sidebar-footer{ position: relative; }
.footer-row{ display:flex; align-items:center; gap:6px; }
.user-btn{ display:flex; align-items:center; gap:8px; flex:1; min-width:0;
  border:none; background:transparent; border-radius:10px; padding:6px 8px;
  color:var(--text); font-size:13.5px; cursor:pointer; text-align:left; }
.user-btn:hover{ background:var(--bg-hover); }
.login-btn{ flex:1; border:none; border-radius:10px; padding:8px 12px;
  background:var(--brand); color:#fff; font-size:13.5px; font-weight:600; cursor:pointer; }
.login-btn:hover{ filter:brightness(1.08); }
.gear-btn{ width:34px; height:34px; flex:none; border:none; background:transparent;
  border-radius:9px; color:var(--text-3); font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; }
.gear-btn:hover{ background:var(--bg-hover); color:var(--text); }
.settings-text{ flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.settings-pop{ position:absolute; bottom:calc(100% + 8px); left:10px; width:232px;
  background:#fff; border:1px solid var(--border); border-radius:12px;
  box-shadow:0 8px 28px rgba(15,18,22,.14); padding:6px; z-index:90; }
.pop-user{ display:flex; align-items:center; gap:9px; padding:8px; border-bottom:1px solid var(--border-light); margin-bottom:4px; }
.pop-user-info{ min-width:0; display:flex; flex-direction:column; }
.pop-name{ display:flex; align-items:center; gap:6px; font-size:13.5px; }
.pop-sub{ font-size:11px; color:var(--text-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:150px; }
.pop-item{ display:flex; align-items:center; gap:8px; width:100%; border:none; background:none;
  padding:8px; border-radius:8px; font-size:13px; color:var(--text); cursor:pointer; text-align:left; }
.pop-item:hover{ background:var(--bg-hover); }

/* ======== 「最近」折叠 ======== */
.section-head{ cursor:pointer; user-select:none; border-radius:8px; }
.section-head:hover .section-title{ color:var(--text); }
.chev{ color:var(--text-3); font-size:15px; line-height:1; transform:translateY(1px); }
body.conv-collapsed .conv-list,
body.conv-collapsed .conv-empty{ display:none; }

/* ======== 卡片 / 徽章 / 键值对 / 思考动画（参照原型） ======== */
.md-card{ border:1px solid var(--border); border-radius:10px; padding:10px 12px; margin:8px 0; background:#fbfcfd; }
.md-card-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:6px; }
.md-card-title{ font-weight:600; font-size:13.5px; min-width:0; overflow-wrap:anywhere; }
.pill{ display:inline-block; font-size:11px; padding:0 8px; border-radius:999px; line-height:18px; white-space:nowrap; flex:none; }
.pill.ok{ background:#e5f6ec; color:#1e8e4e; }
.pill.block{ background:#fbe9e5; color:#c2412d; }
.pill.warn{ background:#fbf1dc; color:#a86a00; }
.pill.info{ background:#eceff3; color:#5b6b80; }
.md-kv{ display:grid; grid-template-columns:auto 1fr; gap:3px 14px; margin:0; font-size:13px; }
.md-kv dt{ color:var(--text-2); }
.md-kv dd{ margin:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.src-line{ font-size:12px; color:var(--text-3); border-top:1px dashed var(--border); padding-top:7px; margin-top:10px !important; }
.src-tag{ color:var(--red); font-weight:600; margin-right:8px; }  /* 印章红来源标签（两端共用） */
.typing{ display:inline-flex; gap:5px; align-items:center; margin-right:7px; }
.typing i{ width:7px; height:7px; border-radius:50%; background:var(--text-2); opacity:.45; animation:blink 1.05s infinite; }
.typing i:nth-child(2){ animation-delay:.15s; }
.typing i:nth-child(3){ animation-delay:.3s; }
@keyframes blink{ 50%{ opacity:1; } }
@media (prefers-reduced-motion: reduce){ .typing i{ animation:none; opacity:.8; } }
.tool-chip.running{ animation:none; }

/* —— 删除会话确认气泡（锚定在条目旁，不用原生 confirm） —— */
#conv-del-pop{ position: fixed; z-index: 260; width: 300px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(17,24,39,.14); padding: 14px 16px 12px; }
#conv-del-pop[hidden]{ display: none !important; }
.dp-head{ display: flex; align-items: center; justify-content: space-between; }
.dp-title{ font-size: 15px; font-weight: 700; color: var(--text); }
.dp-x{ border: none; background: none; color: var(--text-3); font-size: 14px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.dp-x:hover{ background: var(--bg-side); color: var(--text); }
.dp-desc{ margin: 8px 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.dp-actions{ display: flex; justify-content: flex-end; gap: 8px; }
.dp-cancel{ border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 13px; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.dp-cancel:hover{ background: var(--bg-side); }
.dp-ok{ border: none; background: none; color: #d5304f; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.dp-ok:hover{ background: #fdecef; }

/* 后台生成中的会话：琥珀色呼吸圆点 */
.conv-live .conv-dot{ background: #f59e0b; animation: convLive 1.2s ease-in-out infinite; }
@keyframes convLive{ 0%,100%{ opacity:.35; transform:scale(.8);} 50%{ opacity:1; transform:scale(1.15);} }

/* ======== 登录页（未登录全屏） ======== */
body.loginmode .layout{ display: none !important; }
#login-view{ position: fixed; inset: 0; z-index: 300; display: flex;
  align-items: center; justify-content: center; background: var(--bg-side); }
#login-view[hidden]{ display: none !important; }
.login-card{ width: min(360px, 92vw); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(17,24,39,.10); padding: 32px 28px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-logo{ width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: #fff;
  font-size: 24px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.login-title{ margin: 0 0 4px; font-size: 20px; color: var(--text); }
.login-sub{ margin: 0 0 20px; font-size: 13px; color: var(--text-3); }
.login-input{ width: 100%; box-sizing: border-box; height: 42px; border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; font-size: 14px; margin-bottom: 12px; outline: none; }
.login-input:focus{ border-color: var(--brand); box-shadow: 0 0 0 3px rgba(77,107,254,.12); }
.login-btn{ width: 100%; height: 42px; border: none; border-radius: 10px; background: var(--brand);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-btn:hover{ background: #3d5bee; }
.login-err{ min-height: 18px; margin-top: 10px; font-size: 12.5px; color: var(--danger); }
.login-btn.wecom{ background: #07c160; margin-top: 2px; }
.login-btn.wecom:hover{ background: #06ad56; }
.login-hint{ margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.login-divider{ display: flex; align-items: center; gap: 10px; margin: 14px 0 10px;
  color: var(--muted); font-size: 12px; }
.login-divider::before,.login-divider::after{ content: ''; flex: 1; height: 1px; background: var(--line); }
.login-foot{ margin: 6px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ============================================================
   桌面端改版「白纸鹅卵石 v5」(2026-10-22 定稿)：仅 >720px 生效
   设计档案：.design-critic/brief.md —— 左轴 72px / 鹅卵石输入卡 24px /
   印章红 #C52E1E 稀缺点缀 / 发丝线无阴影 / 手机断点(≤720px)零改动
   ============================================================ */
@media (min-width: 721px){
  :root{ --red:#C52E1E; --red-hover:#B52A1C; --red-tint:#FCF2F1; }

  /* 侧栏：灰纸面 + 圆标 + 墨黑新建按钮 + 激活项红左条 */
  .sidebar{ background:#F5F6F8; border-right:none; }
  .brand{ padding:16px 14px 20px; }
  .brand-logo{ background:url('logo-mark.png') center/contain no-repeat; color:transparent;
    font-size:0; border-radius:0; }
  .btn-new-chat{ height:42px; padding:0 16px; border:none; border-radius:8px; background:var(--text);
    color:#fff; font-weight:600; justify-content:center; }
  .btn-new-chat:hover{ background:#2A2E33; }
  .conv-dot{ display:none; }
  .conv-item.active{ background:#fff; border:1px solid var(--border-light); color:var(--text);
    font-weight:600; position:relative; overflow:hidden; }
  .conv-item.active::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--red); }
  .me-avatar{ background:var(--border-light); color:var(--text); }
  .role-badge{ background:var(--bg-raise); color:var(--text-2); }

  /* 首页：一条左轴（问候/输入卡/建议共 72px 网格线） */
  body.home .welcome{ align-items:center; text-align:center; padding:0 clamp(16px, 6vw, 72px); }
  body.home .welcome-title, body.home .welcome-sub{ display:none; }  /* 用户终审：问候语与小字先去掉，首页只留输入卡+建议 */
  .welcome-title{ font-size:40px; font-weight:600; letter-spacing:-.02em; margin:0; }
  .welcome-sub{ margin:12px 0 0; font-size:15px; }
  .composer-slot{ width:min(680px, 100%); margin-top:40px; }
  body.home .composer-wrap{ width:min(680px, 100%); margin:0 auto; padding:14px 0 4px; }
  .examples-label{ display:none; }
  body.home .hello-desktop{ display:block; margin:0; }
  .hello-l1{ font-size:28px; font-weight:600; letter-spacing:-.01em; color:var(--text); }
  .composer-slot{ margin-top:16px; }  /* 问候语贴近对话框 */
  body.home .examples-label{ display:block; width:min(680px, 100%); text-align:left; font-size:12px; color:var(--text-2); margin:32px auto 0; }
  .examples{ width:min(680px, 100%); margin:10px auto 0; gap:10px; align-items:flex-start; }
  .example-chip{ padding:11px 16px; font-size:14px; color:var(--text); background:#fff;
    border-radius:12px; box-shadow:0 2px 10px rgba(15,18,22,.08); display:flex; align-items:center; }
  .example-chip .ex-emoji{ display:none; }
  .example-chip:hover{ background:var(--wash); }

  /* 对话页：页眉 + 左轴 640 + 消息沉底 */
  .chat-head{ display:none; }
  body:not(.home) .chat-head{ display:flex; align-items:center; justify-content:center; height:56px; flex:none;
    padding:0 20px; border-bottom:1px solid var(--border-light);
    font-size:13px; font-weight:600; color:var(--text); }
  #chat-title{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:min(640px, 70vw); }
  .chat-flow{ width:min(640px, 100%); max-width:none; margin:0 auto; padding:24px 20px 8px; box-sizing:border-box; }
  .msg{ gap:0; }
  .msg-user .msg-body{ max-width:75%; }
  .msg-user .bubble{ background:var(--bg-raise); color:var(--text); border-radius:12px 12px 4px 12px;
    padding:12px 16px; font-size:14px; }
  .msg-assistant .bubble{ font-size:14px; line-height:1.8; padding:2px 0; }
  .md h4{ font-size:16px; }
  .md code{ color:var(--text); }  /* 修复内联代码浅灰不可读（仅桌面） */

  /* 来源行：印章红标签 + 发丝线 */
  .src-line{ border-top:1px solid var(--border-light); padding-top:10px; margin-top:14px !important;
    font-size:12px; color:var(--text-2); }
  .src-tag{ color:var(--red); font-weight:600; margin-right:8px; }

  /* 输入区：鹅卵石输入卡（全站唯一 24px 层级）+ 红色发送 */
  .composer-wrap{ padding:10px 20px 18px; }
  .composer{ max-width:640px; margin:0 auto; background:#fff; border:1px solid var(--border-light);
    border-radius:24px; }
  .composer:focus-within{ border-color:#c9ced6; }
  .attachments{ max-width:640px; margin:0 auto 8px; }
  .btn-send{ background:var(--red); }
  .btn-send:hover{ background:var(--red-hover); }
  .composer-note{ text-align:center; max-width:640px; margin:8px auto 0; }

  /* 登录页：左轴编辑式，鹅卵石 CTA */
  #login-view{ background:#fff; align-items:center; justify-content:center; }
  .login-card{ width:420px; margin:auto; padding:0; border:none; border-radius:0; box-shadow:none;
    background:transparent; align-items:center; text-align:center; }
  .login-logo{ background:url('logo-mark.png') center/contain no-repeat; color:transparent; font-size:0;
    border-radius:0; width:44px; height:44px; margin:0 auto 40px; }
  .login-title{ font-size:40px; font-weight:600; letter-spacing:-.02em; margin:0; color:var(--text); }
  .login-title::after{ content:''; display:block; width:40px; height:3px; background:var(--red); margin:24px auto 0; }
  .login-sub{ margin:24px 0 0; font-size:15px; color:var(--text-2); }
  .login-btn{ width:100%; height:52px; margin-top:36px; border-radius:24px; background:var(--red); font-size:15px; }
  .login-btn:hover{ background:var(--red-hover); }
  .login-btn.wecom{ background:var(--red); margin-top:36px; }
  .login-btn.wecom:hover{ background:var(--red-hover); }
  .login-hint{ text-align:center; margin:8px auto 0; }
  .login-hint + .login-btn{ margin-top:24px; }
}

/* 工单列表（管理页） */
.tickets-list{ display:flex; flex-direction:column; gap:10px; max-height:56vh; overflow-y:auto; }
.tk-card{ border:1px solid var(--border-light); border-radius:10px; padding:12px 14px; background:#fff; }
.tk-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.tk-user{ font-size:13px; font-weight:600; color:var(--text); }
.tk-time{ font-size:11.5px; color:var(--text-3); white-space:nowrap; }
.tk-q{ font-size:13px; color:var(--text); margin-bottom:6px; line-height:1.6; }
.tk-a{ font-size:12.5px; color:var(--text-2); line-height:1.6; }
.tk-ref{ font-size:11px; color:var(--text-3); background:var(--bg-raise); border-radius:6px; padding:1px 6px; margin-left:4px; }

/* 会话改名输入框 */
.conv-rename{
  flex: 1; min-width: 0; height: 24px; margin: 0 4px 0 2px; padding: 0 6px;
  border: 1px solid var(--red); border-radius: 6px; background: #fff;
  font-size: 13px; color: var(--text); outline: none;
}
