:root {
  --bg: #f5f6fa;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --line: #e5e8f0;
  --line-2: #eff1f6;
  --text: #171a26;
  --text-2: #565c70;
  --text-3: #868ca0;
  --brand: #2f5bf6;
  --brand-2: #5a7dff;
  --brand-soft: #eef2ff;
  --gold: #c9a75a;
  --gold-2: #e0c584;
  --ink: #191d31;
  --ink-2: #131726;
  --ink-line: rgba(255, 255, 255, .09);
  --ok: #12a150;
  --ok-soft: #e7f7ee;
  --warn: #d97706;
  --warn-soft: #fff4e5;
  --err: #dc2626;
  --err-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 8px 24px rgba(20, 24, 40, .06);
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, .05);
  --shadow-lg: 0 6px 18px rgba(20, 24, 40, .08), 0 2px 6px rgba(20, 24, 40, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 13.5px/1.6 "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.hidden { display: none !important; }

/* 细滚动条：全界面统一 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3d7e2; border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #bcc2d1; background-clip: padding-box; }

/* ---------- 自定义标题栏（无边框窗口） ---------- */
.titlebar {
  position: fixed; top: 0; left: 0; right: 0; height: 36px; z-index: 1100;
  display: flex; align-items: center; justify-content: flex-end;
  background: transparent;
  -webkit-app-region: drag;
  user-select: none;
}
html:not(.frameless) .titlebar { display: none; }
.tb-btns { display: flex; height: 100%; -webkit-app-region: no-drag; }
.tb-btn {
  width: 44px; height: 100%; border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #6b7280;
}
.tb-btn:hover { background: rgba(0, 0, 0, .07); color: #374151; }
.tb-btn.tb-close:hover { background: #e81123; color: #fff; }
/* 无边框模式下的布局适配 */
html.frameless .app { height: calc(100vh - 36px); margin-top: 36px; }
html.frameless .update-banner { top: 36px; }
/* 登录窗：卡片顶满整个窗口，不留灰色背景边；左侧品牌区整块可拖动窗口 */
html.frameless .gate { padding: 0; }
html.frameless .gate-card {
  max-width: none; width: 100%; min-height: 100vh;
  border-radius: 0; box-shadow: none;
}
html.frameless .gate-side { -webkit-app-region: drag; }
/* 登录小窗不可最大化：隐藏最大化按钮 */
body:not(.in-app) #tbMax { display: none; }

/* ---------- 通用控件 ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: #c9cddb; background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(47, 91, 246, .25);
}
.btn.primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(47, 91, 246, .32);
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.block { width: 100%; display: block; }
.btn.danger { color: var(--err); border-color: #f3c9c9; }
.btn.danger:hover { background: var(--err-soft); }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13px; }
.field small { display: block; color: var(--text-3); font-size: 12px; margin-top: 5px; }

input[type=text], input[type=email], input[type=password], input:not([type]), textarea, select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 91, 253, .12);
}
textarea { resize: vertical; }

.error-text { color: var(--err); font-size: 13px; margin: 8px 0; min-height: 18px; }
.status-text { font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.status-text.ok { color: var(--ok); }
.status-text.err { color: var(--err); }

.icon-btn {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-3); font-size: 15px; padding: 4px 8px; border-radius: 6px;
}
.icon-btn:hover { background: var(--line-2); color: var(--text); }

.sec-title {
  font-size: 13px; margin: 20px 0 9px; color: var(--text-2); font-weight: 600;
  letter-spacing: .3px;
}

/* ---------- 新版本提醒横幅 ---------- */
.update-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(90deg, #322a12, #42371a);
  border-bottom: 1px solid #6b5a26;
  color: #f3d98b; font-size: 13.5px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.update-banner.hidden { display: none; }
.ub-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: #c9a75a; color: #2b2413;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex: none;
}
.ub-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-text strong { color: #ffe9ad; }
.ub-btn {
  flex: none; border: none; cursor: pointer;
  background: #c9a75a; color: #2b2413;
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 7px;
}
.ub-btn:hover { background: #dcbc73; }
.ub-btn:disabled { opacity: .6; cursor: default; }
.ub-close {
  flex: none; border: none; background: transparent; cursor: pointer;
  color: #b3a06a; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.ub-close:hover { color: #ffe9ad; }

/* ---------- 登录页（左品牌 / 右表单 · 浅色分栏） ---------- */
.gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f4f8f9 0%, #e9f1f4 55%, #dfecef 100%);
  padding: 12px; overflow: auto;
}
.gate-glow { display: none; }
.gate-card {
  position: relative;
  width: 100%; max-width: 900px; min-height: 540px;
  display: flex; align-items: stretch; overflow: hidden;
  background: #fff;
  border: none;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(52, 44, 18, .16), 0 4px 16px rgba(52, 44, 18, .06);
}

/* 左侧品牌区：浅金渐变 + 深色文字 */
.gate-side {
  flex: 0 0 320px; max-width: 320px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 46px 32px 22px;
  background: linear-gradient(168deg, #faf6ea 0%, #f3ead2 100%);
  border-right: 1px solid #f0e9d6;
}
.gate-side .brand-logo {
  width: 88px; height: 88px; border-radius: 22px; object-fit: cover;
  box-shadow: 0 10px 28px rgba(160, 128, 56, .3);
  margin-bottom: 18px;
}
.gate-side h1 {
  font-size: 26px; font-weight: 700; letter-spacing: 4px;
  color: #3f3418;
}
.gate-side .gate-sub { font-size: 12px; color: #8f7f55; letter-spacing: 2px; margin-top: 6px; }
.gate-side .gate-tagline {
  font-size: 12.5px; color: #a4905f; line-height: 1.8; margin-top: 18px;
  padding: 0 2px;
}
.gate-feats {
  list-style: none; margin: 20px 0 0; padding: 14px 4px 0 0;
  border-top: 1px solid rgba(160, 128, 56, .22); width: 100%;
  display: flex; flex-direction: column; gap: 11px; text-align: left;
}
.gate-feats li { position: relative; padding-left: 24px; }
.gate-feats li::before {
  content: '✓'; position: absolute; left: 0; top: 2px;
  width: 15px; height: 15px; line-height: 15px; text-align: center;
  font-size: 10px; font-weight: 700; color: #8f6d2c;
  background: rgba(176, 138, 62, .16); border-radius: 50%;
}
.gate-feats li b { display: block; font-size: 12.5px; font-weight: 600; color: #5a4c26; line-height: 1.4; }
.gate-feats li span { display: block; font-size: 11px; color: #a4905f; line-height: 1.5; }
.gate-side-foot { margin-top: auto; padding-top: 16px; font-size: 11px; color: #ab9c72; }

/* 右侧表单区：白底 */
.gate-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 30px 52px 16px;
}
.gate-hello {
  font-size: 25px; font-weight: 700; color: #2c2a24;
  text-align: center; margin: 0 0 22px; letter-spacing: 1px;
}

@media (max-width: 700px) {
  .gate-side { display: none; }
  .gate-card { max-width: 380px; min-height: 0; }
  .gate-main { padding: 26px 26px 14px; }
}

/* 登录页内控件：浅色填充输入框 */
.gate-card .field { margin-bottom: 12px; }
.gate-card .field label { color: #8a8574; font-size: 12px; margin-bottom: 4px; }
.gate-card input[type=text], .gate-card input[type=email], .gate-card input[type=password], .gate-card input:not([type]) {
  width: 100%;
  background: #f4f5f7;
  border: 1px solid #e7e9ee;
  color: #2a2d34;
  border-radius: 10px;
  padding: 11px 13px; font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.gate-card input:focus { border-color: rgba(176, 138, 62, .65); box-shadow: 0 0 0 3px rgba(201, 167, 90, .14); background: #fff; }
.gate-card input::placeholder { color: #a7acb5; }
.gate-card .field small { color: #8a8574; }

/* 邮箱验证码：输入框 + 获取按钮并排 */
.code-field { display: flex; gap: 8px; align-items: stretch; }
.code-field input { flex: 1; min-width: 0; }
.code-field .code-btn {
  flex: 0 0 auto; white-space: nowrap;
  border: 1px solid rgba(176, 138, 62, .45);
  background: rgba(201, 167, 90, .12);
  color: #977830; font-size: 12.5px; font-weight: 600;
  padding: 0 14px; border-radius: 10px; cursor: pointer;
  transition: all .15s;
}
.code-field .code-btn:hover:not(:disabled) { background: rgba(201, 167, 90, .22); border-color: rgba(176, 138, 62, .7); }
.code-field .code-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 密码框小眼睛 */
.pwd-field { position: relative; }
.pwd-field .pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer;
  color: #a7acb5; padding: 6px 8px; border-radius: 8px; line-height: 0;
}
.pwd-field .pwd-eye:hover { color: #6f7480; background: #eceef1; }
.pwd-field .pwd-eye.on { color: #b08a3e; }

.tabs[hidden] { display: none; }
.tabs { display: flex; gap: 3px; background: #f4f5f7; padding: 3px; border-radius: 9px; margin-bottom: 14px; }
.tab { flex: 1; border: none; background: transparent; padding: 7px; border-radius: 7px; cursor: pointer; color: #8a8f98; font-weight: 500; font-size: 13px; transition: all .15s; }
.tab.active { background: linear-gradient(135deg, #dfc07a, #c9a75a); color: #17140a; font-weight: 600; box-shadow: 0 2px 10px rgba(201, 167, 90, .3); }

.gate-submit {
  width: 100%; display: block;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #e3c67f 0%, #c9a75a 45%, #a8873f 100%);
  color: #17140a; font-size: 14px; font-weight: 700; letter-spacing: 6px;
  padding: 11px; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(201, 167, 90, .32);
  transition: all .15s;
}
.gate-submit:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 10px 28px rgba(201, 167, 90, .42); }
.gate-submit:disabled { opacity: .55; cursor: not-allowed; }

/* 登录/注册切换链接（欢迎回来下方底部） */
.gate-switch {
  text-align: center; margin-top: 14px;
  font-size: 12.5px; color: #8a8f98;
}
.gate-switch .agree-link { font-size: 12.5px; font-weight: 600; color: #b08a3e; }
.gate-switch .agree-link:hover { color: #8f6d2c; text-decoration: underline; }

.gate-card .error-text { font-size: 12px; margin: 4px 0; min-height: 15px; color: #c9564a; text-align: center; }
.agree-row { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 2px 0 8px; font-size: 12px; color: #8a8f98; }
.remember-row {
  display: flex; align-items: center; gap: 16px; margin: 2px 0 12px;
  font-size: 12.5px; color: #6f7480;
}
.remember-row .agree-check { font-size: 12.5px; color: #6f7480; }
.remember-row #lnkForgot { margin-left: auto; font-size: 12.5px; color: #b08a3e; }
.remember-row #lnkForgot:hover { color: #8f6d2c; text-decoration: underline; }
.admin-toolbar { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.badge-warn {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 10px;
  background: #f59e0b; color: #1a1305; font-size: 11.5px; font-weight: 600;
}
.agree-check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.agree-check input { width: auto; accent-color: #c9a75a; margin: 0; }
.agree-link {
  border: none; background: transparent; cursor: pointer; padding: 2px 1px;
  color: #b08a3e; font-size: 11.5px;
}
.agree-link:hover { color: #8f6d2c; text-decoration: underline; }

.gate-card .btn.ghost { border-color: #e3e6ea; color: #6f7480; background: #fff; }
.gate-card .btn.ghost:hover { border-color: rgba(176, 138, 62, .55); color: #8f6d2c; }
.gate-card .status-text.ok { color: #3e8e5a; }
.gate-card .status-text.err { color: #c9564a; }

/* 网页版专属：Windows 客户端下载入口 */
.gate-download {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 9px 12px;
  border: 1px solid #ece5d2; border-radius: 11px;
  background: #fbf8f0;
  color: #6b5c34; text-decoration: none;
  transition: all .15s;
}
.gate-download:hover { background: #f6efdd; border-color: rgba(176, 138, 62, .5); }
.gate-download .gd-ico {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 167, 90, .18); color: #8f6d2c; font-size: 13px;
}
.gate-download .gd-text { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.gate-download .gd-text strong { font-size: 12.5px; font-weight: 600; }
.gate-download .gd-text small { font-size: 10.5px; color: #a4905f; }
.gate-download .gd-arrow { flex: none; color: #b09a5e; font-size: 15px; }

/* 底部版权 */
.gate-copyright {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 10px; border-top: 1px solid #f0f1f3;
  font-size: 10.5px; color: #b3b8c0;
}
.foot-links { display: flex; gap: 8px; }
.foot-links .agree-link { font-size: 10.5px; color: #b09a5e; }
.foot-links .agree-link:hover { color: #8f6d2c; }

.logo {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .5px;
}
.logo.sm { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; font-size: 13px; }

/* ---------- 布局 ---------- */
.app { display: flex; height: 100vh; }

.sidebar {
  width: 200px; flex: 0 0 200px;
  background: linear-gradient(180deg, #1c2138 0%, #141828 100%);
  display: flex; flex-direction: column;
  padding: 14px 10px 12px;
  color: #dfe3f2;
}
.side-head {
  display: flex; gap: 9px; align-items: center;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: 12px;
}
.side-avatar {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #241c07; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(201, 167, 90, .3);
}
.side-title strong { display: block; font-size: 12.5px; color: #fff; font-weight: 600; }
.side-title small {
  display: block; color: #7f88a6; font-size: 10.5px;
  max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.side-group {
  font-size: 10px; letter-spacing: 1.2px; color: #616a8a;
  padding: 0 6px 6px; text-transform: uppercase;
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav-sub { margin-bottom: 10px; }
.side-spacer { flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  border: none; background: transparent;
  padding: 8px 10px; border-radius: 8px;
  cursor: pointer; color: #a3abc6; text-align: left;
  font-weight: 500; font-size: 13px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(224, 197, 132, .18), rgba(224, 197, 132, .05));
  color: #f2dfb2;
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-item span { font-size: 13px; }

.side-foot { border-top: 1px solid var(--ink-line); padding-top: 11px; margin-top: auto; }
.side-foot .btn.block + .btn.block { margin-top: 6px; }
.sidebar .btn.ghost {
  color: #bcc3da; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04);
}
.sidebar .btn.ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); color: #fff; }

.balance-card {
  background: linear-gradient(140deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 10px 11px;
  margin-bottom: 9px;
}
.balance-card small { display: block; color: #9aa3c0; font-size: 11px; }
.balance-card strong { display: block; font-size: 18px; font-weight: 650; color: #fff; margin: 1px 0 2px; }
.balance-card span { font-size: 10.5px; color: #8b94b2; }
.side-brand { color: #6b7392; font-size: 10.5px; margin: 8px 0 2px; text-align: center; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.view { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.view.active { display: flex; }

.view-head {
  padding: 15px 22px 13px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: var(--panel);
}
.view-head h2 { font-size: 15.5px; font-weight: 650; letter-spacing: .2px; }
.view-head p { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.head-tools { display: flex; gap: 8px; align-items: center; }
.mini-select { width: auto; padding: 5px 9px; font-size: 12.5px; }

/* ---------- 聊天 ---------- */
.chat-log {
  flex: 1; overflow-y: auto;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}

/* 对话区：保留左右区分与头像，方便一眼分清「我的指令」和「AI 结果」 */
.msg { display: flex; gap: 9px; max-width: 84%; align-items: flex-start; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.avatar {
  width: 26px; height: 26px; flex: 0 0 26px; margin-top: 2px;
  border-radius: 8px; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.msg.ai .avatar {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 2px 8px rgba(47, 91, 246, .28);
}
.msg.me .avatar { background: #eceef4; color: var(--text-2); }

.bubble {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 13px;
  box-shadow: var(--shadow-sm);
  max-width: 100%; word-break: break-word;
  line-height: 1.68;
}
.msg.me .bubble { background: #f7f8ff; border-color: #dfe4ff; }
.msg.ai .bubble { background: var(--panel); border-color: var(--line); }
.bubble p + p { margin-top: 7px; }
.bubble .meta { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* 素材预览：图片缩略图 + 文件卡片 */
.att-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.att-thumb {
  display: flex; flex-direction: column; gap: 4px;
  width: 96px; padding: 5px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2);
}
.att-thumb img {
  width: 100%; height: 68px; object-fit: cover; border-radius: 6px; display: block;
  background: #eef0f5;
}
.att-thumb em, .att-chip em {
  font-style: normal; font-size: 10.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); font-size: 11.5px; color: var(--text-2);
}
.att-chip i {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 10px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand);
}
.att-chip.table i { background: var(--ok-soft); color: var(--ok); }
.att-chip.warn i { background: var(--warn-soft); color: var(--warn); }
.att-chip s { text-decoration: none; color: var(--text-3); font-size: 10.5px; }

/* 常用指令条（替代欢迎语） */
.quick-bar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 9px 22px; background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.qb-label { font-size: 11px; color: var(--text-3); letter-spacing: .5px; }
.qb-chip {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 20px; padding: 3px 11px; font-size: 12px;
  color: var(--text-2); cursor: pointer; transition: all .15s;
}
.qb-chip:hover { border-color: var(--gold); color: #8f6d2c; background: #fdfaf3; }

.plan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  margin-top: 4px;
}
.plan-head {
  padding: 11px 14px; background: var(--panel-2);
  border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.plan-head strong { font-size: 13.5px; }
.plan-cost { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.plan-items { max-height: 320px; overflow-y: auto; }

.plan-item { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.plan-item:last-child { border-bottom: none; }
.pi-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; flex-wrap: wrap; }
.pi-title { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 160px; }

.tag {
  font-size: 11px; padding: 2px 7px; border-radius: 5px;
  background: var(--line-2); color: var(--text-2); white-space: nowrap;
}
.tag.type-product { background: #e8f0ff; color: #2b5fd9; }
.tag.type-news { background: #fff0e6; color: #c2571a; }
.tag.type-qa { background: #e7f7ee; color: #128a48; }
.tag.type-article { background: #f0eaff; color: #6b46c1; }
.tag.status { background: var(--warn-soft); color: var(--warn); }
.tag.site { background: #e9f3ff; color: #1e6bb8; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.err { background: var(--err-soft); color: var(--err); }

.pi-excerpt { font-size: 12.5px; color: var(--text-2); margin: 4px 0 6px; }
.pi-fields { font-size: 12px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.pi-link { font-size: 12px; margin-top: 6px; }
.pi-link a { color: var(--brand); text-decoration: none; }
.pi-link a:hover { text-decoration: underline; }

.plan-foot {
  padding: 11px 14px; background: var(--panel-2);
  border-top: 1px solid var(--line-2);
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
}
.plan-note { font-size: 12px; color: var(--text-3); margin-right: auto; }

.typing { display: flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1.4s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ---------- 输入区 ---------- */
.composer { border-top: 1px solid var(--line); background: var(--panel); padding: 11px 22px 12px; }
.attach-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.attach-chip {
  font-size: 12px; background: var(--brand-soft); color: var(--brand);
  padding: 3px 8px; border-radius: 6px; display: flex; align-items: center; gap: 5px;
}
.attach-chip button { border: none; background: transparent; color: inherit; cursor: pointer; padding: 0; opacity: .6; }

.composer-box {
  border: 1px solid var(--line); border-radius: 13px;
  padding: 10px 12px; background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.composer-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,91,246,.12); }
.composer-box textarea { border: none; padding: 0; resize: none; max-height: 180px; box-shadow: none !important; }
.composer-box textarea:focus { box-shadow: none; }
.composer-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

/* ---------- 大模型切换（AI 玖琪输入框内，选项由后台动态下发） ---------- */
.model-switch { position: relative; }
.ms-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 9px 0 6px;
  border: 1px solid var(--line); border-radius: 9px;
  background: linear-gradient(180deg, #ffffff, #f7f9ff);
  color: var(--text); font-size: 12.5px; cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
  max-width: 240px;
}
.ms-btn:hover:not(.disabled) { border-color: var(--gold); background: #fffdf6; }
.ms-btn.open { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 91, 246, .12); }
.ms-btn.disabled { opacity: .62; cursor: default; }
.ms-ico {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; color: #fff; letter-spacing: .2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.ms-name { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-tag {
  font-size: 10.5px; color: #8a6a25; background: #fbf3df;
  border: 1px solid #ecd9a8; padding: 1px 6px; border-radius: 20px; white-space: nowrap;
}
.ms-caret { color: var(--text-3); transition: transform .18s; flex: 0 0 auto; }
.ms-btn.open .ms-caret { transform: rotate(180deg); }

.ms-menu {
  position: fixed; z-index: 320; min-width: 236px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.ms-menu.show { display: block; animation: msIn .14s ease-out; }
@keyframes msIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ms-menu-head { font-size: 11px; color: var(--text-3); padding: 4px 9px 6px; }
.ms-item {
  display: flex; gap: 9px; align-items: center; width: 100%;
  padding: 7px 9px; border: none; background: none; border-radius: 9px;
  cursor: pointer; text-align: left; font-size: 12.5px; color: var(--text);
}
.ms-item:hover { background: var(--panel-2); }
.ms-item .ms-ico { flex: 0 0 18px; }
.ms-item.tier-pro .ms-ico { background: linear-gradient(135deg, #b88746, #e0c584); }
.ms-item.tier-flash .ms-ico { background: linear-gradient(135deg, #2f5bf6, #5b86ff); }
.ms-item .ms-i-main { flex: 1; min-width: 0; }
.ms-i-name { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-i-sub { font-size: 11px; color: var(--text-3); display: block; margin-top: 2px; }
.ms-check { color: var(--gold); opacity: 0; flex: 0 0 auto; }
.ms-item.active { background: #fffaf0; }
.ms-item.active .ms-i-name { color: #8a6a25; }
.ms-item.active .ms-check { opacity: 1; }

/* 常用指令条图标 */
.qb-chip { display: inline-flex; align-items: center; gap: 5px; }
.qb-ico { width: 14px; height: 14px; flex: 0 0 14px; }
.qb-chip:hover .qb-ico { color: #b08a3c; }

/* ---------- AI 玖琪欢迎页（仿 WorkBuddy 空状态） ---------- */
/* ---------- AI 玖琪欢迎页（高端空状态） ---------- */
.chat-welcome {
  margin: auto 0;                       /* 在滚动容器内垂直居中 */
  align-self: center;
  text-align: center;
  max-width: 600px;
  width: 100%;
  padding: 16px 10px;
}
.chat-welcome .cw-logo {
  width: 58px; height: 58px; margin: 0 auto 12px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 55%, #a9822f 100%);
  color: #241c07; font-size: 25px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(201, 167, 90, .34), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.chat-welcome h3 { font-size: 19px; font-weight: 650; letter-spacing: .3px; }
.chat-welcome > p { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.chat-welcome .cw-sugs {
  margin-top: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
}
.chat-welcome .sug {
  text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
  padding: 11px 13px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.chat-welcome .sug:hover {
  border-color: rgba(201, 167, 90, .7);
  box-shadow: 0 6px 18px rgba(20, 24, 40, .09);
  transform: translateY(-1px);
}
.chat-welcome .sug b { display: block; font-size: 13px; font-weight: 600; }
.chat-welcome .sug span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.composer-foot {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3); margin-top: 8px;
}

/* ---------- 通用内容区 ---------- */
#view-sites, #view-billing, #view-settings, #view-admin { overflow-y: auto; }
#view-sites > *, #view-billing > *, #view-settings > *, #view-admin > * { margin-left: 22px; margin-right: 22px; }
#view-sites .view-head, #view-billing .view-head, #view-settings .view-head, #view-admin .view-head { margin-left: 0; margin-right: 0; }
.site-list, .plan-list, .panel, .stat-row, .table-wrap { margin-top: 18px; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 13px; padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.panel h3 {
  font-size: 13.5px; margin-bottom: 12px; font-weight: 600;
  padding-left: 9px; position: relative;
}
.panel h3::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.panel-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* 旧深色登录页样式已由上方「浅色分栏」块取代 */
/* 服务器连接块已从登录页移除（改动见「AI 设置 → 服务器」） */

.side-brand { font-size: 10.5px; color: #6b7392; text-align: center; margin: 8px 0 9px; line-height: 1.5; }

.about-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px;
}
.about-row:last-of-type { border-bottom: none; }
.about-row span { color: var(--text-3); }
.about-row strong { font-weight: 600; text-align: right; }

/* 在线更新进度条 */
.progress-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 4px; background: var(--brand); transition: width .3s ease; }
.about-row:last-of-type { border-bottom: none; }
.about-row span { color: var(--text-3); }
.about-note { margin-top: 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* 站点卡片 */
.site-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 16px;
}
.site-main { flex: 1; min-width: 0; }
.site-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.site-url { color: var(--text-3); font-size: 12.5px; margin-top: 3px; word-break: break-all; }
.site-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.site-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--err); }

/* 套餐 */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 14px; text-align: center;
  transition: border-color .15s, transform .15s;
}
.plan-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.plan-card h4 { font-size: 13.5px; margin-bottom: 5px; }
.plan-price { font-size: 20px; font-weight: 650; margin: 6px 0 2px; }
.plan-price small { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.plan-bonus { color: var(--ok); font-size: 12px; min-height: 18px; }
.plan-desc { color: var(--text-3); font-size: 11.5px; margin: 6px 0 12px; }

.plan-card { position: relative; }
.plan-tag {
  position: absolute; top: 10px; right: 10px;
  background: linear-gradient(135deg, #dfc07a, #c9a75a);
  color: #2a2107; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 8px;
}
.plan-points { font-size: 15px; font-weight: 650; color: var(--brand); margin: 4px 0 2px; }

/* 运营后台里的小输入框（档位编辑） */
.mini-input input[type=text], .mini-input input[type=number] {
  padding: 5px 7px; font-size: 12.5px; border-radius: 6px;
}
.mini-input td { padding: 6px 8px; }

/* 更新包保存位置提示 */
.update-path-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 8px 10px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
}
.update-path-row code {
  font-size: 11.5px; color: var(--text-2); word-break: break-all;
}

/* 表格 */
.table-wrap {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  text-align: left; padding: 9px 13px; background: var(--panel-2);
  font-weight: 600; color: var(--text-2); font-size: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 9px 13px; border-bottom: 1px solid var(--line-2); }
tbody tr:hover td { background: #fcfcff; }
tr:last-child td { border-bottom: none; }
.empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 12.5px; }

/* 运营后台：用户操作按钮组（按钮较多，允许换行、不做等宽拉伸） */
.admin-ops { display: flex; flex-wrap: wrap; gap: 6px; min-width: 300px; }
.admin-ops .btn { white-space: nowrap; }
.about-note.err { color: var(--err); }

.money-in { color: var(--ok); font-weight: 600; }
.money-out { color: var(--text-2); }

/* 统计卡 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.stat small { color: var(--text-3); font-size: 11.5px; }
.stat strong { display: block; font-size: 17px; font-weight: 650; margin-top: 2px; }
/* 长文本统计项（如结算规则）用小字，避免撑爆卡片 */
.stat strong.stat-rule { font-size: 12.5px; font-weight: 500; color: var(--text-2); line-height: 1.55; margin-top: 4px; }

/* 单选卡 */
.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.radio-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px;
  cursor: pointer; display: flex; gap: 10px; align-items: flex-start;
  transition: border-color .15s, background .15s;
}
.radio-card:hover { border-color: #c9cddb; }
.radio-card input { margin-top: 3px; accent-color: var(--brand); }
.radio-card strong { display: block; font-size: 13.5px; }
.radio-card small { color: var(--text-3); font-size: 12px; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 24, 40, .42);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  background: var(--panel); border-radius: 16px;
  width: 100%; max-width: 520px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.22);
}
.modal-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 15.5px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 9px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #1b1e28; color: #fff;
  padding: 11px 20px; border-radius: 10px;
  font-size: 13.5px; z-index: 200; box-shadow: 0 8px 28px rgba(0,0,0,.24);
  animation: rise .22s ease;
  max-width: 80vw;
}
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- 退出确认框（小而美，跟随软件窗口） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(20, 24, 40, .32);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .12s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal.small {
  position: static; /* 覆盖 .modal 的 fixed/inset，让它作为 mask 内部的卡片 */
  display: block;   /* 覆盖 .modal 的 flex，让子元素正常竖排 */
  width: auto; min-width: 268px; max-width: 320px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 22px 18px;
  box-shadow: 0 18px 48px rgba(18, 22, 40, .26);
  text-align: center;
  animation: popIn .16s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.modal.small .modal-ico {
  width: 42px; height: 42px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(47, 91, 246, .28);
}
.modal.small h3 { font-size: 15.5px; font-weight: 650; }
.modal.small .modal-text { font-size: 12.5px; color: var(--text-2); margin: 7px 0 0; line-height: 1.6; }
.modal.small .exit-remember {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px; font-size: 12px; color: var(--text-3); cursor: pointer;
}
.modal.small .modal-actions { display: flex; gap: 9px; margin-top: 16px; }
.modal.small .modal-actions .btn { flex: 1; justify-content: center; }

/* ---------- 后台列表筛选栏 ---------- */
.admin-filter {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.admin-filter input, .admin-filter select {
  height: 32px; padding: 0 10px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text);
}
.admin-filter input { min-width: 200px; }
.admin-filter .muted { font-size: 12px; color: var(--text-3); }

/* 统计卡可点击（点一下跳到对应管理区块） */
.stat.clickable { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.stat.clickable:hover { box-shadow: 0 6px 16px rgba(18, 22, 40, .12); transform: translateY(-1px); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d8dbe6; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #c2c6d4; }
::-webkit-scrollbar-track { background: transparent; }
/* ========== 更新弹窗 ========== */
.upd-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
}
.upd-card {
  width: 360px; max-width: calc(100vw - 48px);
  background: #fff; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  padding: 22px 24px 20px; text-align: center;
}
.upd-title { font-size: 15.5px; font-weight: 600; color: #1f2937; margin-bottom: 16px; }
.upd-bar-row { display: flex; align-items: center; gap: 8px; }
.upd-bar-track {
  flex: 1; height: 8px; border-radius: 6px;
  background: #e8ebf2; overflow: hidden;
}
.upd-bar {
  height: 100%; border-radius: 6px;
  background: var(--ok);
  transition: width 0.15s ease;
}
.upd-done {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ok); color: #fff;
  font-size: 12px; line-height: 20px; flex: none;
}
.upd-size { margin-top: 10px; font-size: 12.5px; color: #6b7280; font-variant-numeric: tabular-nums; }
.upd-status { margin-top: 6px; font-size: 13.5px; color: var(--ok); min-height: 20px; }
.upd-status.err { color: #dc2626; }
.upd-card .btn { margin-top: 12px; min-width: 120px; }

/* ========== 拖拽上传与内容类型预设 ========== */
.composer-box { position: relative; }
.composer-box.dragover { outline: 2px dashed var(--primary); outline-offset: -2px; border-radius: 12px; }
.drop-mask {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79, 124, 246, 0.08);
  border: 2px dashed var(--primary); border-radius: 12px;
  color: var(--primary); font-size: 14px; font-weight: 600; pointer-events: none;
}
.attach-chip .sz { color: var(--text-3); font-size: 11px; margin-left: 4px; }
.attach-chip.warn { border-color: #f59e0b; color: #b45309; }
.hint-note { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ---------- 执行步骤时间线（AI 玖琪 · 自主执行） ---------- */
.bubble .tl { margin-top: 9px; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 10px; overflow: hidden; }
.tl-head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; cursor: pointer; font-size: 12.5px; color: var(--text-2); user-select: none; }
.tl-head b { color: var(--brand); font-weight: 600; }
.tl-caret { margin-left: auto; color: var(--text-3); font-size: 10px; transition: transform .15s; }
.tl.collapsed .tl-caret { transform: rotate(-90deg); }
.tl.collapsed .tl-list { display: none; }
.tl-spin { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: tlspin .7s linear infinite; }
@keyframes tlspin { to { transform: rotate(360deg); } }
.tl-list { padding: 0 11px 9px; display: flex; flex-direction: column; gap: 4px; }
.tl-item { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; animation: tlIn .18s ease-out; }
.tl-dot { width: 15px; height: 15px; flex: none; margin-top: 1px; border-radius: 50%; font-style: normal; font-size: 10px; display: flex; align-items: center; justify-content: center; background: var(--ok-soft); color: var(--ok); }
.tl-item.err .tl-dot { background: var(--err-soft); color: var(--err); }
.tl-ico { flex: none; opacity: .85; }
.tl-text { min-width: 0; }
.tl.failed .tl-head { color: var(--err); }
@keyframes tlIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------- 附件：表格/图片状态与产品图开关 ---------- */
.attach-toggle {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
}
.attach-toggle input { margin: 0; cursor: pointer; }
.attach-chip .sz.ok { color: var(--ok); font-weight: 600; }
.attach-chip .sz.warn { color: #b45309; }
.attach-chip .sz.doing { color: var(--brand); }
.attach-chip .sz.doing::after {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 5px; vertical-align: -1px;
  border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand);
  animation: tlspin .7s linear infinite;
}

/* ---------- 付款指引（用户端） ---------- */
.pay-box { display: flex; flex-direction: column; gap: 8px; }
.pay-head { display: flex; gap: 8px; }
.pay-head > div { flex: 1; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 9px; min-width: 0; }
.pay-head small { display: block; color: var(--text-3); font-size: 11px; margin-bottom: 2px; }
.pay-head strong { font-size: 13.5px; word-break: break-all; }
.pay-tabs { display: flex; gap: 6px; }
.pay-tabs button {
  flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--text-2); font-size: 12px; cursor: pointer;
}
.pay-tabs button.on { border-color: var(--brand); color: var(--brand); font-weight: 600; background: var(--brand-soft, var(--panel-2)); }
.pay-qr { display: flex; align-items: center; justify-content: center; min-height: 170px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; }
.pay-qr-img { max-width: 150px; max-height: 150px; object-fit: contain; }
.pay-qr-empty { color: #6b7280; font-size: 13px; text-align: center; padding: 26px 10px; }
.pay-tip { font-size: 12px; color: var(--text-2); text-align: center; margin: 0; }
.pay-note { font-size: 12px; color: var(--text-3); margin: 0; line-height: 1.55; }
.pay-foot { display: flex; justify-content: flex-end; padding-top: 4px; }

/* 小屏/笔记本：付款弹窗再紧凑一点 */
@media (max-height: 760px) {
  .modal-card { max-height: 96vh; }
  .pay-qr { min-height: 150px; padding: 6px; }
  .pay-qr-img { max-width: 130px; max-height: 130px; }
  .pay-head > div { padding: 6px 8px; }
  .pay-head strong { font-size: 13px; }
}

/* ---------- 收款方式（后台） ---------- */
.pay-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
/* 邮件服务配置：两列排布，窄屏自动折成一列 */
.mail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.pay-admin-card { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; background: var(--panel-2); }
.pay-admin-card > strong { font-size: 13px; }
.pay-admin-qr { min-height: 132px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 8px; margin: 8px 0; overflow: hidden; }
.pay-admin-qr img { max-width: 100%; max-height: 168px; object-fit: contain; }
.pay-admin-qr .muted { color: #9ca3af; font-size: 12.5px; }
.pay-admin-card .panel-foot { padding-top: 0; border: none; gap: 6px; flex-wrap: wrap; }
