/* A2Econ 后台设计系统
 *
 * 视觉语言沿用 DeepSeek 参考稿：深色底、圆角胶囊按钮、蓝色主色 #4d6bfe。
 * 结构：左侧固定导航 + 右侧内容区。每个功能一个独立页面（一个 URL 一个 .html），
 * 共用本文件的令牌与组件。
 */

:root {
  /* 底色层次 */
  --bg: #1e1e1e;
  --bg-deep: #141414;
  --panel: #2b2b2b;
  --panel-2: #222222;
  --panel-3: #262626;
  --line: #333333;
  --line-soft: #2a2a2a;

  /* 文字 */
  --ink: #e0e0e0;
  --ink-strong: #ffffff;
  --muted: #888888;
  --muted-2: #666666;

  /* 主色 */
  --accent: #4d6bfe;
  --accent-dim: #3b4d99;
  --accent-soft: rgba(77, 107, 254, 0.12);
  --accent-line: rgba(77, 107, 254, 0.35);
  --accent-text: #8fa2ff;

  /* 语义色 */
  --ok: #2ea86b;
  --ok-soft: rgba(46, 168, 107, 0.14);
  --warn: #d99a2b;
  --warn-soft: rgba(217, 154, 43, 0.14);
  --danger: #e05a52;
  --danger-soft: rgba(224, 90, 82, 0.14);

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 20px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;

  --sidebar-w: 232px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ---------------- 布局 ---------------- */

.shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-deep);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  gap: 4px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 16px;
}
.brand .logo { width: 26px; height: 26px; flex-shrink: 0; }
.brand b { font-size: 15px; color: var(--ink-strong); font-weight: 600; letter-spacing: -0.2px; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }

.nav-group { margin-top: 12px; }
.nav-group > span {
  display: block;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-item:hover { background: #232323; color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-foot { margin-top: auto; padding: 10px 12px 0; border-top: 1px solid var(--line-soft); }
/* ⚠️ 容器是 `id="who"`（class 是 sidebar-foot）—— 用 `.who` 选择器匹配不到，
   结果用户名和角色黏在一行（"管理员Admin"）。 */
#who { font-size: 12px; color: var(--muted); }
#who b { color: var(--ink); display: block; font-size: 13px; }
/* 角色行与用户名行之间留点空隙 —— 否则中文名 + 英文角色会黏成一串。 */
#who span { display: block; margin-top: 1px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
  min-width: 0;
}
.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 副标题可以换行/截断 —— 窄屏时不能把顶栏撑爆。 */
.topbar .sub {
  font-size: 12.5px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .spacer { flex: 1; min-width: 8px; }
/* 顶栏操作区不换行，但可以横向滚动。 */
.topbar #page-actions { flex-shrink: 0; overflow-x: auto; max-width: 60%; }

.content { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }
.content-narrow { max-width: 1080px; }

/* ---------------- 卡片 ---------------- */

.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--panel-3);
}
.card > h2 .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* 指标块 */
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 24px; font-weight: 600; color: var(--ink-strong); margin-top: 4px; letter-spacing: -0.5px; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* ---------------- 表单 ---------------- */

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
label.field > .hint { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; line-height: 1.5; }

input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  padding: 8px 11px;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { resize: vertical; min-height: 80px; font-family: var(--sans); }
select { cursor: pointer; }

input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }

/* ---------------- 按钮 ---------------- */

button, .btn {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  white-space: nowrap;
}
button:hover, .btn:hover { background: #333; border-color: #444; text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
button svg, .btn svg { width: 15px; height: 15px; flex-shrink: 0; }

button.primary { background: var(--accent-dim); border-color: var(--accent-dim); color: #fff; }
button.primary:hover { background: var(--accent); border-color: var(--accent); }
button.ghost { background: transparent; }
button.danger { color: var(--danger); border-color: rgba(224, 90, 82, .4); }
button.danger:hover { background: var(--danger-soft); }
button.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
button.icon { padding: 6px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 胶囊切换按钮（沿用参考稿的 action-btn） */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #444;
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  font-size: 13px;
}
.pill:hover { background: #333; border-color: #555; color: var(--ink); }
.pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-line) inset; }
.pill svg { width: 15px; height: 15px; }

/* ---------------- 表格 ---------------- */

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  padding: 9px 14px;
  font-size: 11.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-3);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  white-space: nowrap;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:hover { background: #262626; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }

/* 表格里的姓名/标题单元格不要被挤到换行。
 * 「管理员」被折成「管理 / 员」两行就是缺这条 ——
 * 单元格被列宽压到只剩两个字的宽度。 */
td .cell-strong { white-space: nowrap; }

/* ---------------- 标签 ---------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 2.5px 9px;
  border-radius: 20px;
  background: #333;
  color: var(--muted);
  white-space: nowrap;
}
.tag.ok { background: var(--ok-soft); color: #6fd3a3; }
.tag.warn { background: var(--warn-soft); color: #e5b567; }
.tag.danger { background: var(--danger-soft); color: #f08a84; }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }
.tag.admin { background: rgba(77,107,254,.16); color: var(--accent-text); }
.tag.user { background: #333; color: #bbb; }

/* ---------------- 进度条 ---------------- */

.bar { height: 6px; border-radius: 4px; background: #333; overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.bar > i.warn { background: var(--warn); }
.bar > i.danger { background: var(--danger); }
.bar > i.ok { background: var(--ok); }

.meter { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.meter .top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

/* ---------------- 空状态 / 提示 ---------------- */

.empty { padding: 40px 20px; text-align: center; color: var(--muted-2); font-size: 13px; }
.notice {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.notice.info { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.notice.warn { border-color: rgba(217,154,43,.35); background: var(--warn-soft); color: #e5b567; }
.notice.danger { border-color: rgba(224,90,82,.35); background: var(--danger-soft); color: #f08a84; }

/* ---------------- 提示条 ---------------- */

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  padding: 10px 15px;
  font-size: 13px;
  color: var(--ink);
  box-shadow: var(--shadow);
  animation: slidein .2s ease;
  max-width: 380px;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------------- 对话页 ---------------- */

.chat-wrap { display: flex; height: 100%; overflow: hidden; }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px 190px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.chat-inner { width: 100%; max-width: 860px; margin: 0 auto; }

.msg-user { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; max-width: 82%; }
.msg-user .bubble {
  background: var(--panel);
  padding: 13px 20px;
  border-radius: 22px 22px 5px 22px;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-ai { align-self: flex-start; width: 100%; }

.thought {
  border-left: 2px solid var(--line);
  padding-left: 18px;
  margin: 0 0 18px 8px;
}
.thought-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin-bottom: 12px;
}
.thought-head svg { width: 17px; height: 17px; color: var(--accent); }
.thought-head .chev { width: 14px; height: 14px; color: var(--muted-2); transition: transform .2s; }
.thought.open .thought-head .chev { transform: rotate(0deg); }
.thought:not(.open) .thought-head .chev { transform: rotate(-90deg); }
.thought-body { display: none; flex-direction: column; gap: 12px; }
.thought.open .thought-body { display: flex; }
.thought-item { font-size: 14px; line-height: 1.65; color: #cccccc; padding-left: 18px; position: relative; }
.thought-item::before { content: '•'; position: absolute; left: 0; color: var(--muted); font-size: 17px; }
.thought-act { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin: 4px 0; }
.thought-act svg { width: 14px; height: 14px; }

/* 思考区：元信息（检索到 N 条 / 模型回退）与思考正文分层。
   ⚠️ 两者必须分开 —— 共用一个容器时，思考正文会覆盖元信息（或反之）。 */
.thought-meta { display: flex; flex-direction: column; gap: 6px; }
.thought-meta:empty { display: none; }
.thought-text { font-size: 13.5px; line-height: 1.7; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.thought-text:empty { display: none; }

.answer { font-size: 15px; line-height: 1.7; color: var(--ink); }
.answer p { margin-bottom: 14px; }
.answer h2 { font-size: 19px; margin: 22px 0 12px; color: var(--ink-strong); font-weight: 600; }
.answer h3 { font-size: 16.5px; margin: 18px 0 10px; color: var(--ink-strong); font-weight: 600; }
.answer ul { margin: 0 0 16px; padding-left: 22px; }
.answer li { margin-bottom: 9px; }
.answer li::marker { color: var(--muted); }
.answer code { background: #333; padding: 1.5px 6px; border-radius: 4px; font-family: var(--mono); font-size: 13px; }
.answer pre { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px; overflow-x: auto; margin-bottom: 16px; }
.answer pre code { background: none; padding: 0; }
.answer blockquote { border-left: 3px solid var(--line); padding-left: 15px; color: var(--muted); margin-bottom: 14px; }
.answer table { margin-bottom: 16px; }
.cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 4px;
  background: #333;
  color: #aaa;
  font-size: 10px;
  vertical-align: super;
  cursor: pointer;
}
.cite:hover { background: var(--accent); color: #fff; }

.refs-panel {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-deep);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 16px;
}
.refs-panel h3 { font-size: 13px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.ref-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 11px;
}
.ref-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; gap: 8px; }
.ref-id { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.ref-num { background: #333; color: #aaa; min-width: 19px; height: 19px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.ref-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.45; }
.ref-snip { font-size: 12px; color: var(--muted); line-height: 1.55; max-height: 76px; overflow: hidden; }

.composer-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent, var(--bg) 42%);
  padding: 18px 24px 14px;
  pointer-events: none;
}
.composer {
  max-width: 860px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  pointer-events: auto;
}
.composer:focus-within { border-color: #555; }
.composer textarea {
  background: transparent;
  border: none;
  padding: 0;
  min-height: 24px;
  font-size: 15px;
  resize: none;
  outline: none;
}
.composer textarea:focus { border: none; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* 模型为空时的说明（后台配了但没启用 / 没有任何可用模型）。 */
.model-hint {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 176, 32, .10);
  border: 1px solid rgba(255, 176, 32, .28);
  color: #e8b96a;
  font-size: 12.5px;
  line-height: 1.5;
}
.composer-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.model-select { max-width: 230px; font-size: 12.5px; padding: 5px 10px; border-radius: 16px; }
.disclaimer { text-align: center; font-size: 11.5px; color: var(--muted-2); margin-top: 10px; pointer-events: auto; }

.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.3s 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; } }

/* ---------------- 登录页 ---------------- */

.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}
.login-box { width: 100%; max-width: 380px; }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; justify-content: center; }
.login-brand .logo { width: 32px; height: 32px; }
.login-brand h1 { font-size: 20px; font-weight: 600; color: var(--ink-strong); letter-spacing: -0.4px; }
.login-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.login-card .field { margin-bottom: 16px; }
.login-card input { background: var(--panel); }
.login-card button.primary { width: 100%; justify-content: center; padding: 10px; }
.login-err { display: none; margin-bottom: 14px; }
.login-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted-2); }

/* ---------------- 弹窗 ---------------- */

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
}
.modal-back.show { display: flex; }
.modal {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal > h3 { padding: 16px 20px; font-size: 15px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------- 工具类 ---------------- */

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.scroll-x { overflow-x: auto; }
.pointer { cursor: pointer; }
.hide-sm { display: initial; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    z-index: 800;
    transform: translateX(-100%);
    transition: transform .2s;
    box-shadow: 8px 0 32px rgba(0, 0, 0, .45);
  }
  .sidebar.open { transform: none; }
  .refs-panel { display: none; }
  .hide-sm { display: none; }
  /* 侧边栏收起后必须有个按钮能把它叫出来 —— 否则窄屏完全无法导航。 */
  .nav-toggle { display: flex !important; }
  .content { padding: 18px 14px 32px; }
  .topbar { padding: 12px 14px; gap: 10px; }
  .topbar #page-actions { max-width: 50%; }
}

/* 遮罩：窄屏点侧边栏外侧关闭 */
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 799;
  display: none;
}
.nav-scrim.show { display: block; }

/* 汉堡按钮：默认隐藏，只在窄屏出现（见上面的 @media） */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}
.nav-toggle svg { width: 17px; height: 17px; }

/* ---------------- 语言切换器 ---------------- */

.lang-switch { flex-shrink: 0; }
.lang-select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  max-width: 130px;
}
.lang-select:hover { border-color: #444; }
.lang-select:focus { outline: none; border-color: var(--accent); }
.lang-switch.compact .lang-select { padding: 3px 6px; font-size: 12px; }

/* 登录页的语言切换器 */
.login-lang {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.login-lang .lang-select { background: transparent; }
