/*
 * LinsGeek ERP —— TikTok「买家聊天」页面样式（配合 66-tk-chat.js）
 * 外观和 Mercado Livre「售后消息」（45-ml-messages.css）一致；所有样式名用 lg-tkc- 前缀，不依赖 44/45 的样式。
 * 电脑：左边会话列表、右边聊天；手机：先看列表，点进会话后整屏聊天，可返回。
 * 回滚：删除 66-tk-chat.css + 66-tk-chat.js。
 */
#lg-tkc {
  --k-brand: #0d7b6d; --k-bright: #13b8a6; --k-soft: #e7f2f0; --k-ink: #0f1a18; --k-muted: #6b7a77; --k-line: rgba(15, 35, 30, .08);
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--k-ink); padding: 4px 0 24px; max-width: 1280px; min-width: 0;
}
#lg-tkc *, #lg-tkc *::before, #lg-tkc *::after { box-sizing: border-box; }
#lg-tkc svg { width: 16px; height: 16px; flex: 0 0 auto; }
#lg-tkc .lg-tkc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
#lg-tkc .lg-tkc-title h1 { margin: 0; font-size: 24px; font-weight: 700; }
#lg-tkc .lg-tkc-title p { margin: 4px 0 0; color: var(--k-muted); font-size: 13.5px; max-width: 720px; }
#lg-tkc .lg-tkc-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 / 链接 / 小标签（页面里和弹窗里都用） ---------- */
.lg-tkc-btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 12px; font-size: 14px; font-weight: 600; white-space: nowrap; font-family: inherit; transition: background .12s;
}
.lg-tkc-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.lg-tkc-btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.lg-tkc-btn.primary { background: #0d7b6d; color: #fff; box-shadow: 0 8px 18px -12px rgba(13,123,109,.7); }
.lg-tkc-btn.primary:hover { background: #0a6257; }
.lg-tkc-btn.ghost { background: #e7f2f0; color: #0d7b6d; }
.lg-tkc-btn.ghost:hover { background: #d7ebe7; }
.lg-tkc-btn:focus-visible, .lg-tkc-link:focus-visible, .lg-tkc-chip:focus-visible { outline: 2px solid #13b8a6; outline-offset: 2px; }
.lg-tkc-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.lg-tkc-btn.spin svg { animation: lg-tkc-spin .8s linear infinite; }
@keyframes lg-tkc-spin { to { transform: rotate(360deg); } }
.lg-tkc-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #0d7b6d; font-family: inherit; }
.lg-tkc-link:hover { text-decoration: underline; }
.lg-tkc-link.danger { color: #d64545; }
.lg-tkc-chip { all: unset; cursor: pointer; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #0d7b6d; background: #e7f2f0; font-family: inherit; white-space: nowrap; }
.lg-tkc-chip:hover { background: #d7ebe7; }

/* ---------- 两栏 ---------- */
#lg-tkc .lg-tkc-app {
  display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  height: calc(100vh - 200px); min-height: 560px;
  background: #fff; border: 1px solid var(--k-line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 18px 40px -32px rgba(13,123,109,.45);
}
#lg-tkc .lg-tkc-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--k-line); background: #fbfcfc; }
#lg-tkc .lg-tkc-filters { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 8px; }
#lg-tkc .lg-tkc-field { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid #dfe6e4; border-radius: 12px; background: #fff; color: var(--k-muted); min-width: 0; }
#lg-tkc .lg-tkc-field:focus-within { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-tkc .lg-tkc-field input, #lg-tkc .lg-tkc-field select { all: unset; flex: 1; min-width: 0; height: 100%; font-size: 14px; color: var(--k-ink); font-family: inherit; }
#lg-tkc .lg-tkc-field select { cursor: pointer; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a77' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") right center / 16px no-repeat; padding-right: 20px; line-height: 36px; }
#lg-tkc .lg-tkc-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--k-line); overflow-x: auto; scrollbar-width: none; }
#lg-tkc .lg-tkc-tabs::-webkit-scrollbar { display: none; }
#lg-tkc .lg-tkc-tab { all: unset; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 10px 8px; font-size: 13.5px; color: #4b5a57; border-bottom: 2px solid transparent; white-space: nowrap; font-family: inherit; }
#lg-tkc .lg-tkc-tab b { font-size: 11.5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #eef2f1; display: inline-flex; align-items: center; justify-content: center; }
#lg-tkc .lg-tkc-tab.hot b { background: #fdecec; color: #d64545; }
#lg-tkc .lg-tkc-tab.on { color: #0d7b6d; font-weight: 700; border-bottom-color: #0d7b6d; }
#lg-tkc .lg-tkc-tab.on b { background: #0d7b6d; color: #fff; }
#lg-tkc .lg-tkc-tab:focus-visible, #lg-tkc .lg-tkc-conv:focus-visible { outline: 2px solid #13b8a6; outline-offset: -2px; }

/* 会话列表 */
#lg-tkc .lg-tkc-convs { flex: 1; overflow-y: auto; padding: 6px; }
#lg-tkc .lg-tkc-conv {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; width: 100%; padding: 10px; border-radius: 14px;
  position: relative; font-family: inherit; transition: background .12s;
}
#lg-tkc .lg-tkc-conv:hover { background: #f1f6f5; }
#lg-tkc .lg-tkc-conv.on { background: #e7f2f0; }
#lg-tkc .lg-tkc-av { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #0d7b6d; background: #e7f2f0; }
#lg-tkc .lg-tkc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
#lg-tkc .lg-tkc-conv.on .lg-tkc-av { background: #fff; }
#lg-tkc .lg-tkc-av.sm { width: 28px; height: 28px; font-size: 11px; }
#lg-tkc .lg-tkc-conv-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#lg-tkc .lg-tkc-conv-top { display: flex; align-items: baseline; gap: 8px; }
#lg-tkc .lg-tkc-conv-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
#lg-tkc .lg-tkc-conv-top time { font-size: 11.5px; color: var(--k-muted); white-space: nowrap; }
#lg-tkc .lg-tkc-conv-shop, #lg-tkc .lg-tkc-conv-last { font-size: 12.5px; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-tkc .lg-tkc-conv-last { color: #3d4a47; min-height: 1.2em; }
#lg-tkc .lg-tkc-conv.unread .lg-tkc-conv-top b, #lg-tkc .lg-tkc-conv.unread .lg-tkc-conv-last { font-weight: 700; color: var(--k-ink); }
#lg-tkc .lg-tkc-conv-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
#lg-tkc .lg-tkc-conv.unread .lg-tkc-conv-main { padding-right: 26px; }
#lg-tkc .lg-tkc-dot { position: absolute; right: 10px; top: 32px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #d64545; color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#lg-tkc .lg-tkc-pill { font-style: normal; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 8px; border-radius: 999px; background: #eef2f1; color: #4b5a57; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
#lg-tkc .lg-tkc-pill svg { width: 12px; height: 12px; }
#lg-tkc .lg-tkc-pill.warn { background: #fff7ea; color: #b7791f; }
#lg-tkc .lg-tkc-pill.dark { background: #2b3533; color: #fff; }
#lg-tkc .lg-tkc-pill.big { height: 28px; padding: 0 12px; font-size: 12.5px; }
#lg-tkc .lg-tkc-list-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 6px; font-size: 12.5px; color: var(--k-muted); }

/* ---------- 聊天区 ---------- */
#lg-tkc .lg-tkc-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; }
#lg-tkc .lg-tkc-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--k-line); }
#lg-tkc .lg-tkc-back { all: unset; cursor: pointer; display: none; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; color: #0d7b6d; }
#lg-tkc .lg-tkc-back:hover { background: #e7f2f0; }
#lg-tkc .lg-tkc-back svg { width: 20px; height: 20px; }
#lg-tkc .lg-tkc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#lg-tkc .lg-tkc-who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-tkc .lg-tkc-who small { font-size: 12.5px; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 接口返回的提示（warning） */
#lg-tkc .lg-tkc-note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 18px; background: #fff8e6; border-bottom: 1px solid #f2d48a; color: #7a5a00; font-size: 12.5px; line-height: 1.45; }
#lg-tkc .lg-tkc-note svg { width: 14px; height: 14px; margin-top: 2px; }
#lg-tkc .lg-tkc-note span { min-width: 0; overflow-wrap: anywhere; }

#lg-tkc .lg-tkc-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #fbfdfc, #fff); }
#lg-tkc .lg-tkc-day { text-align: center; margin: 4px 0; }
#lg-tkc .lg-tkc-day span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #eef2f1; color: var(--k-muted); font-size: 12px; }
#lg-tkc .lg-tkc-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
#lg-tkc .lg-tkc-msg.me { align-self: flex-end; flex-direction: row-reverse; }
#lg-tkc .lg-tkc-bubble { padding: 9px 13px 7px; border-radius: 16px 16px 16px 4px; background: #f1f4f3; min-width: 0; }
#lg-tkc .lg-tkc-msg.me .lg-tkc-bubble { border-radius: 16px 16px 4px 16px; background: #0d7b6d; color: #fff; }
#lg-tkc .lg-tkc-bubble p { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
#lg-tkc .lg-tkc-bubble p.dim { opacity: .7; font-style: italic; }
#lg-tkc .lg-tkc-meta { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; font-size: 11px; opacity: .75; }
/* 图片 / 视频 / 卡片：气泡用浅色底，内容更清楚 */
#lg-tkc .lg-tkc-msg.rich .lg-tkc-bubble { padding: 6px 6px 5px; background: #f1f4f3; color: var(--k-ink); }
#lg-tkc .lg-tkc-msg.me.rich .lg-tkc-bubble { background: #e7f2f0; }
#lg-tkc .lg-tkc-msg.rich .lg-tkc-bubble p { padding: 4px 7px 0; }
#lg-tkc .lg-tkc-msg.rich .lg-tkc-meta { padding: 0 6px; }
#lg-tkc .lg-tkc-img { position: relative; display: block; border-radius: 12px; overflow: hidden; line-height: 0; background: #e3e9e7; max-width: 240px; }
#lg-tkc .lg-tkc-img img { display: block; max-width: 240px; max-height: 240px; width: auto; height: auto; min-width: 72px; min-height: 72px; object-fit: cover; }
#lg-tkc .lg-tkc-img .ph { display: block; width: 200px; height: 120px; }
#lg-tkc .lg-tkc-img:focus-visible { outline: 2px solid #13b8a6; outline-offset: 2px; }
#lg-tkc .lg-tkc-img.video i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(15,26,24,.6); color: #fff; display: flex; align-items: center; justify-content: center; }
#lg-tkc .lg-tkc-img.video i svg { width: 22px; height: 22px; }
#lg-tkc .lg-tkc-card { display: flex; align-items: flex-start; gap: 10px; min-width: 200px; max-width: 320px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--k-line); color: var(--k-ink); text-align: left; }
#lg-tkc .lg-tkc-card > svg { width: 20px; height: 20px; color: #0d7b6d; margin-top: 1px; }
#lg-tkc .lg-tkc-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#lg-tkc .lg-tkc-card b { font-size: 13px; }
#lg-tkc .lg-tkc-card span { font-size: 12.5px; color: var(--k-muted); overflow-wrap: anywhere; }
#lg-tkc .lg-tkc-card em { font-style: normal; font-weight: 600; color: var(--k-ink); font-variant-numeric: tabular-nums; user-select: all; }
#lg-tkc .lg-tkc-card small { font-size: 12px; color: #4b5a57; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
/* 系统消息：居中、灰色 */
#lg-tkc .lg-tkc-sys { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 86%; text-align: center; color: var(--k-muted); font-size: 12px; }
#lg-tkc .lg-tkc-sys > span { padding: 4px 12px; border-radius: 12px; background: #f1f4f3; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
#lg-tkc .lg-tkc-sys time { font-size: 11px; opacity: .75; }

/* 输入区 */
#lg-tkc .lg-tkc-compose { border-top: 1px solid var(--k-line); padding: 10px 14px 10px; background: #fff; }
#lg-tkc .lg-tkc-tpls { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; font-size: 12.5px; color: var(--k-muted); }
#lg-tkc .lg-tkc-tpls::-webkit-scrollbar { display: none; }
#lg-tkc .lg-tkc-tpls > * { flex: 0 0 auto; }
#lg-tkc .lg-tkc-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
#lg-tkc .lg-tkc-att { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 4px 10px 4px 4px; border-radius: 10px; background: #f7faf9; color: #0f1a18; border: 1px solid var(--k-line); font-size: 12.5px; }
#lg-tkc .lg-tkc-att img, #lg-tkc .lg-tkc-att > svg { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: 0 0 auto; }
#lg-tkc .lg-tkc-att > svg { padding: 6px; color: #0d7b6d; background: #e7f2f0; }
#lg-tkc .lg-tkc-att span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#lg-tkc .lg-tkc-att small { color: var(--k-muted); white-space: nowrap; }
#lg-tkc .lg-tkc-att button { all: unset; cursor: pointer; font-size: 16px; line-height: 1; color: var(--k-muted); padding: 0 2px; }
#lg-tkc .lg-tkc-att.busy { opacity: .6; }
#lg-tkc .lg-tkc-input { display: flex; align-items: flex-end; gap: 8px; border: 1px solid #cfe5e2; border-radius: 16px; padding: 6px 6px 6px 12px; }
#lg-tkc .lg-tkc-input:focus-within { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-tkc .lg-tkc-input textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; font: inherit; font-size: 14px; line-height: 1.5; padding: 6px 0; max-height: 160px; color: var(--k-ink); background: transparent; box-shadow: none; }
#lg-tkc .lg-tkc-icon-btn, #lg-tkc .lg-tkc-send { all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
#lg-tkc .lg-tkc-icon-btn { color: #0d7b6d; }
#lg-tkc .lg-tkc-icon-btn:hover { background: #e7f2f0; }
#lg-tkc .lg-tkc-send { background: #0d7b6d; color: #fff; }
#lg-tkc .lg-tkc-send:hover { background: #0a6257; }
#lg-tkc .lg-tkc-send[disabled] { opacity: .4; cursor: not-allowed; }
#lg-tkc .lg-tkc-icon-btn svg, #lg-tkc .lg-tkc-send svg { width: 18px; height: 18px; }
#lg-tkc .lg-tkc-icon-btn:focus-within, #lg-tkc .lg-tkc-send:focus-visible { outline: 2px solid #13b8a6; outline-offset: 2px; }
#lg-tkc .lg-tkc-compose-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 18px; }
#lg-tkc .lg-tkc-count { margin-left: auto; font-size: 12px; color: var(--k-muted); font-variant-numeric: tabular-nums; }
#lg-tkc .lg-tkc-count.near { color: #d64545; font-weight: 700; }

/* 不能发消息（canSend = false） */
#lg-tkc .lg-tkc-blocked { display: flex; gap: 12px; align-items: flex-start; margin: 10px 14px 14px; padding: 12px 14px; border-radius: 14px; background: #f3f4f4; color: #3d4a47; }
#lg-tkc .lg-tkc-blocked svg { width: 20px; height: 20px; color: #6b7a77; margin-top: 1px; }
#lg-tkc .lg-tkc-blocked div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
#lg-tkc .lg-tkc-blocked b { font-size: 13.5px; font-weight: 600; color: var(--k-ink); line-height: 1.5; }

/* 空状态（弹窗里也用，所以不限定在 #lg-tkc 里） */
.lg-tkc-empty { all: unset; box-sizing: border-box; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 16px; text-align: center; color: #6b7a77; font-size: 14px; font-family: inherit; width: 100%; }
.lg-tkc-empty svg { width: 44px !important; height: 44px !important; color: #13b8a6; }
.lg-tkc-empty b { color: #0f1a18; font-size: 15px; }
.lg-tkc-empty.small { flex: none; padding: 24px 12px; font-size: 13px; }
.lg-tkc-empty.small svg { width: 30px !important; height: 30px !important; }
.lg-tkc-empty.err { cursor: pointer; color: #d64545; }
.lg-tkc-empty small { display: block; margin-top: 2px; font-size: 12px; color: #8a9895; max-width: 260px; text-align: center; }

/* ---------- 弹窗（快捷回复）与提示 ---------- */
.lg-tkc-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 30, 26, .45); font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.lg-tkc-modal *, .lg-tkc-modal *::before, .lg-tkc-modal *::after { box-sizing: border-box; }
.lg-tkc-dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); color: #0f1a18; }
.lg-tkc-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lg-tkc-dialog-head h2 { margin: 0; font-size: 18px; }
.lg-tkc-x { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #6b7a77; }
.lg-tkc-x:hover { background: #eef2f1; }
.lg-tkc-x:focus-visible { outline: 2px solid #13b8a6; outline-offset: 2px; }
.lg-tkc-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.lg-tkc-tpl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.lg-tkc-tpl-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #f7faf9; border: 1px solid rgba(15,35,30,.06); }
.lg-tkc-tpl-item > div:first-child { flex: 1; min-width: 0; }
.lg-tkc-tpl-item b { font-size: 14px; }
.lg-tkc-tpl-item p { margin: 4px 0 0; font-size: 13px; color: #4b5a57; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.lg-tkc-tpl-ops { display: flex; gap: 12px; flex: 0 0 auto; }
.lg-tkc-tpl-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed #cfe5e2; padding-top: 14px; }
.lg-tkc-tpl-form input, .lg-tkc-tpl-form textarea { font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid #dfe6e4; outline: none; resize: vertical; color: #0f1a18; }
.lg-tkc-tpl-form input:focus, .lg-tkc-tpl-form textarea:focus { border-color: #13b8a6; box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
.lg-tkc-toast { position: fixed; left: 50%; top: 72px; z-index: 3100; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #0d7b6d; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); max-width: calc(100vw - 32px); font-family: 'Noto Sans SC', sans-serif; transition: opacity .3s, transform .3s; }
.lg-tkc-toast.bad { background: #d64545; }
.lg-tkc-toast.out { opacity: 0; transform: translate(-50%, -8px); }

/* ---------- 菜单 ---------- */
aside [data-lg-tkc-menu] a, .el-popper [data-lg-tkc-head], .el-popper [data-lg-tkc-head] a { cursor: pointer; }
aside [data-lg-tkc-menu] .lg-tkc-active { background: #e8f8f6 !important; color: #0d7b6d !important; }
/* 复制菜单项时可能带过来原菜单的高亮：不在本页时去掉；在本页时别的菜单项不高亮 */
aside [data-lg-tkc-menu] .\!bg-\[\#E8F8F6\]:not(.lg-tkc-active) { background: transparent !important; }
body.lg-tkc-on aside li:not([data-lg-tkc-menu]) .\!bg-\[\#E8F8F6\] { background: transparent !important; }
.lg-tkc-badge { font-style: normal; margin-left: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #d64545; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.lg-tkc-badge[hidden] { display: none; }

/* ---------- 平板 / 手机 ---------- */
@media (max-width: 1023px) {
  #lg-tkc .lg-tkc-app { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
  #lg-tkc .lg-tkc-msg { max-width: 88%; }
}
@media (max-width: 767px) {
  #lg-tkc { padding: 0 0 12px; }
  #lg-tkc .lg-tkc-title h1 { font-size: 20px; }
  #lg-tkc .lg-tkc-head-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  #lg-tkc .lg-tkc-app { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); min-height: 480px; border-radius: 16px; }
  #lg-tkc .lg-tkc-side { border-right: 0; }
  #lg-tkc .lg-tkc-chat { display: none; }
  #lg-tkc.is-chat .lg-tkc-side { display: none; }
  #lg-tkc.is-chat .lg-tkc-chat { display: flex; }
  #lg-tkc.is-chat .lg-tkc-head { display: none; }
  #lg-tkc.is-chat .lg-tkc-app { height: calc(100vh - 70px); }
  #lg-tkc .lg-tkc-back { display: inline-flex; }
  #lg-tkc .lg-tkc-chat-head { padding: 8px 10px; gap: 8px; }
  #lg-tkc .lg-tkc-note { padding: 8px 12px; }
  #lg-tkc .lg-tkc-msgs { padding: 12px; }
  #lg-tkc .lg-tkc-msg { max-width: 92%; }
  #lg-tkc .lg-tkc-img, #lg-tkc .lg-tkc-img img { max-width: 200px; }
  #lg-tkc .lg-tkc-card { min-width: 0; }
  #lg-tkc .lg-tkc-compose { padding: 8px 10px; }
  .lg-tkc-tpl-item { flex-direction: column; }
}
