/* ==========================================================================
   AI云播 · 共享设计系统
   管理页与播放页共用：颜色令牌、基础元素、按钮、表单、卡片、弹窗、提示
   ========================================================================== */

:root {
  /* 底色与层次：冷灰蓝的浅色主题。深色版偏黑，长时间盯着眼睛累 */
  --bg: #eef1f6;
  --bg-elev: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eaeef5;
  --line: #dfe4ed;
  --line-soft: #eaeef4;

  /* 文字 */
  --text: #1b2233;
  --text-2: #4a5568;
  --muted: #67728a;
  --faint: #98a2b5;

  /* 半透明层次：交给 color-mix 按当前文字色推导，换主题不用再改一堆 rgba */
  --hl-1: rgba(15, 23, 42, 0.012);
  --hl-2: rgba(0, 0, 0, 0.022);
  --hl-3: rgba(0, 0, 0, 0.04);
  --hl-4: rgba(0, 0, 0, 0.06);

  /* 强调与语义色 */
  /* 强调色压深一档，浅底上才够对比度；语义色同理 */
  --accent: #4c6ef5;
  --accent-2: #7c5cff;
  --accent-soft: rgba(76, 110, 245, 0.1);
  --accent-line: rgba(76, 110, 245, 0.3);
  --accent-text: #3b57d6;
  --ok: #17945f;
  --ok-soft: rgba(23, 148, 95, 0.1);
  --warn: #b07510;
  --warn-soft: rgba(176, 117, 16, 0.12);
  --err: #d33a3a;
  --err-soft: rgba(211, 58, 58, 0.09);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --shadow: 0 20px 44px -28px rgba(17, 24, 39, 0.28), 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-sm: 0 6px 18px -12px rgba(17, 24, 39, 0.3);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* [hidden] 必须压过 .btn / .health / .settings-nav button 这些自带的 display。
   浏览器默认的 [hidden] 规则只是 UA 样式，优先级低于任何作者样式，
   所以 applyRole() 里设 hidden 后按钮照样显示。!important 是这里唯一的办法 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 560px at 78% -12%, rgba(76, 110, 245, 0.09), transparent 62%),
    radial-gradient(900px 480px at -8% 108%, rgba(124, 92, 255, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(76, 110, 245, 0.22); }

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

h1, h2, h3, h4, p { margin: 0; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #c3cad8 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #c3cad8;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background-color: #a8b2c4; background-clip: content-box; }

/* ---------- 表单控件 ---------- */

input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

input:hover, select:hover, textarea:hover { border-color: #c2cad8; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.14);
  background: #fff;
}

textarea { resize: vertical; min-height: 84px; line-height: 1.65; }

select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2367728a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

input[type="number"] { font-variant-numeric: tabular-nums; }

input:disabled, select:disabled, textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s;
  user-select: none;
}

.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #cbd3e0; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.22); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }

.btn.primary {
  background: linear-gradient(180deg, #5b7bff, #3f5dea);
  border-color: #3a57e0;
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(63, 93, 234, 0.7), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #6a88ff, #4c6ef5);
  border-color: #4c6ef5;
}

.btn.danger {
  background: rgba(211, 58, 58, 0.07);
  border-color: rgba(211, 58, 58, 0.28);
  color: var(--err);
}
.btn.danger:hover:not(:disabled) { background: rgba(211, 58, 58, 0.12); border-color: rgba(211, 58, 58, 0.45); }

.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--hl-3); border-color: transparent; color: var(--text); }

.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 5px; }
.btn.lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.danger-text { color: var(--err); }
.btn.danger-text:hover:not(:disabled) { color: #b02c2c; background: rgba(211, 58, 58, 0.07); }

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

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.card-head h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .spacer { margin-left: auto; }

.card-body { padding: 18px; }

/* ---------- 标签 / 状态点 ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}

.pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.live i { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.5); animation: pulse 2s infinite; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.idle { background: var(--surface-3); color: var(--muted); }
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--hl-3);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(23, 148, 95, 0.14); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(176, 117, 16, 0.14); }
.dot.err { background: var(--err); }

/* ---------- 表单布局 ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field .hint { font-size: 11px; line-height: 1.5; color: var(--muted); }
.req { color: var(--err); }

/* 标签行右侧带操作按钮（如商品描述的「AI 优化」）。
   按钮不能塞进 <label> 里：label 的第一个可标注元素会变成按钮，
   点「商品描述」几个字就触发了优化。 */
.field-head { display: flex; align-items: center; gap: 8px; }
.field-head > label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-head > .btn { margin-left: auto; flex-shrink: 0; }

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

/* 我的账号：用户名 / 角色 / 积分余额挤一行，新密码 / 原密码挤一行。
   角色只有「管理员」三个字，给窄列；余额后面跟一长串收费说明，给宽列，
   窄了那句说明会折成两行，余额块就比输入框高出一截 */
.acct-grid { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1.9fr); }
/* 余额块自带内边距，行内要压到和输入框差不多高，标签才不会错位 */
.acct-grid .credit-balance { padding: 5px 12px; }

/* 一行放多个字段（如名称 / 平台 / 播放模式）。
   align-content: start 让各列顶部对齐：播放模式那一列比输入框矮，
   默认的 stretch 会把它的标签行往下推，三个标签就不在同一水平线上了 */
.field-row { display: grid; align-items: start; align-content: start; gap: 6px 14px; }
.field-row-3 { grid-template-columns: minmax(0, 1.15fr) 128px 168px; }

.form-section {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 16px 18px;
  background: var(--hl-1);
}
.form-section + .form-section { margin-top: 14px; }
.form-section > h4 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(27, 34, 51, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal.show { display: grid; animation: fade-in 0.16s ease-out; }

.modal-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  max-height: min(90vh, 940px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 48px 90px -36px #000;
  animation: pop-in 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal-panel.narrow { max-width: 680px; }

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head .sub { font-size: 12px; color: var(--muted); }
.modal-head .spacer { margin-left: auto; }

.modal-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--hl-3); color: var(--text); }

.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  flex-shrink: 0;
}
.modal-foot .left { margin-right: auto; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- 生成中遮罩 ----------
   大模型一次要跑十几秒，只在按钮上把字改成「生成中…」，
   用户看不出还在跑、会以为页面卡死。这里给一个带计时的居中提示，
   并且允许中途取消。z-index 压在弹窗（60）之上、Toast（90）之下。 */

.busy {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(27, 34, 51, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.busy.show { display: grid; animation: fade-in 0.16s ease-out; }

.busy-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: min(390px, 100%);
  padding: 18px 20px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -32px #000;
  animation: pop-in 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.busy-spin {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(76, 110, 245, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.busy-body { flex: 1; min-width: 0; }
.busy-body .t { font-size: 14px; font-weight: 600; }
.busy-body .d { margin-top: 3px; font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.busy-body .h { margin-top: 7px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }

.busy-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.busy-time {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.busy-foot .spacer { margin-left: auto; }

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

.msg {
  display: none;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid transparent;
}
.msg.show { display: block; animation: fade-in 0.15s; }
.msg.ok { background: var(--ok-soft); border-color: rgba(23, 148, 95, 0.24); color: var(--ok); }
.msg.err { background: var(--err-soft); border-color: rgba(211, 58, 58, 0.24); color: var(--err); }
.msg.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.empty svg { opacity: 0.5; }
.empty strong { color: var(--text-2); font-weight: 500; }

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  max-width: 380px;
  padding: 11px 15px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px -16px rgba(17, 24, 39, 0.28);
  color: var(--text);
  font-size: 13px;
  animation: toast-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.toast.ok::before { background: var(--ok); }
.toast.err::before { background: var(--err); }
.toast.leaving { animation: toast-out 0.18s ease-in forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 登录（暗色科技风，只作用于这一层，不污染浅色主界面） ---------- */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: #0a0e1a;
  color: #e8ecf6;
}
.auth-gate[hidden] { display: none; }

/* 背景装饰层：网格线 + 双光晕 + 底部声波 */
.auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.auth-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(122, 150, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 150, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000 30%, transparent 75%);
}
.auth-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.auth-glow.glow-a { top: -180px; left: -120px; background: radial-gradient(circle, #2b4bd8 0%, transparent 70%); }
.auth-glow.glow-b { bottom: -200px; right: -140px; background: radial-gradient(circle, #7a3bd8 0%, transparent 70%); }

/* 声波条：高低起伏循环，呼应「用声音直播」 */
.auth-wave {
  position: absolute;
  left: 0; right: 0; bottom: 42px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 7px;
  height: 60px;
  opacity: 0.6;
}
.auth-wave i {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6d8bff, #3b53d8);
  animation: wave 1.5s ease-in-out infinite;
}
.auth-wave i:nth-child(5n+1) { height: 18px; animation-delay: 0s; }
.auth-wave i:nth-child(5n+2) { height: 34px; animation-delay: 0.18s; }
.auth-wave i:nth-child(5n+3) { height: 52px; animation-delay: 0.36s; }
.auth-wave i:nth-child(5n+4) { height: 26px; animation-delay: 0.54s; }
.auth-wave i:nth-child(5n)   { height: 42px; animation-delay: 0.72s; }
@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.35); }
}

/* 分屏：左边讲产品，右边放登录卡。窄屏退回单栏（只剩登录卡）。 */
.auth-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: 980px;
}
.auth-intro { flex: 1 1 0; min-width: 0; }
.auth-stage .auth-card { flex: 0 0 380px; }
@media (max-width: 860px) {
  .auth-intro { display: none; }
  .auth-stage { max-width: 380px; }
}

.auth-intro-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.auth-intro-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #5b7bff, #3f5dea);
  box-shadow: 0 0 24px rgba(91, 123, 255, 0.45);
}
.auth-intro-brand .brand-name { font-size: 17px; font-weight: 650; color: #fff; }
.auth-intro-brand .brand-tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #6f7fa8;
  margin-top: 3px;
}

.auth-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8fa3ff;
  padding: 5px 12px;
  border: 1px solid rgba(108, 132, 255, 0.35);
  border-radius: 999px;
  background: rgba(64, 86, 200, 0.18);
  margin-bottom: 18px;
}
.auth-live-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.auth-headline {
  margin: 0 0 16px;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #fff;
}
.auth-headline em {
  font-style: normal;
  background: linear-gradient(90deg, #6d8bff, #a06dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-tagline {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.75;
  color: #93a0c4;
  max-width: 460px;
}

.auth-points {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 15px;
}
.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.auth-points .pt-ico {
  flex: 0 0 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 9px;
  background: rgba(91, 123, 255, 0.12);
  border: 1px solid rgba(91, 123, 255, 0.28);
  box-shadow: inset 0 0 12px rgba(91, 123, 255, 0.15);
}
.auth-points b { display: block; font-size: 13px; color: #e8ecf6; }
.auth-points li div span {
  display: block;
  font-size: 12px;
  color: #7e8bad;
  margin-top: 3px;
}

.auth-stats {
  display: flex;
  gap: 36px;
  margin-bottom: 22px;
}
.auth-stats b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(90deg, #6d8bff, #a06dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-stats span { font-size: 11px; color: #6f7fa8; }
.auth-footnote {
  font-size: 12px;
  color: #6f7fa8;
  padding-top: 16px;
  border-top: 1px dashed rgba(122, 150, 255, 0.22);
}

/* 登录卡：磨砂玻璃悬浮在暗背景上 */
.auth-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px 22px;
  background: rgba(20, 26, 46, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(122, 150, 255, 0.22);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #5b7bff, #3f5dea);
  box-shadow: 0 0 18px rgba(91, 123, 255, 0.4);
}
.auth-brand .brand-name { font-size: 16px; font-weight: 650; color: #fff; }
.auth-brand .brand-sub { font-size: 12px; color: #7e8bad; }

/* 卡内表单元素按暗色覆写：只选卡片内部的，浅色主界面不受影响 */
.auth-card .field label { color: #93a0c4; }
.auth-card .field input {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(122, 150, 255, 0.25);
  color: #e8ecf6;
}
.auth-card .field input::placeholder { color: #56618a; }
.auth-card .field input:focus {
  border-color: rgba(108, 139, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(91, 123, 255, 0.18);
  outline: none;
}
.auth-card .hint { color: #6f7fa8; }
.auth-card input { width: 100%; }
/* 勾选行：和卡内其它文字同一套暗色，别用主界面的浅色底 */
.auth-card .auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  font-size: 12px;
  color: #93a0c4;
  cursor: pointer;
  user-select: none;
}
.auth-card .auth-remember input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #5b7bff;
  cursor: pointer;
}
.auth-err { min-height: 18px; font-size: 12px; color: #ff7d8a; }
.auth-submit {
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, #5b7bff, #3f5dea);
  border: none;
  box-shadow: 0 6px 20px rgba(63, 93, 234, 0.45);
}
.auth-card-foot {
  text-align: center;
  font-size: 11px;
  color: #56618a;
  letter-spacing: 0.05em;
}
.auth-card-foot::before { content: "● "; color: #4ade80; font-size: 8px; vertical-align: 2px; }

/* 账号弹窗里的用户行 */
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--hl-1);
}
.user-row + .user-row { margin-top: 8px; }
.user-row .who { min-width: 0; }
.user-row .who b { font-size: 13px; }
.user-row .who span { display: block; font-size: 11px; color: var(--muted); }
.user-row .spacer { margin-left: auto; }
.user-row.disabled .who b { color: var(--muted); text-decoration: line-through; }

/* ---------- 用户管理窗口 ---------- */

.modal-panel.wide { max-width: 1242px; } /* 1080 × 1.15：积分/操作列不至于挤成人名 */
.users-body { display: flex; flex-direction: column; gap: 12px; }

.users-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap; /* 搜索 + 角色 + 状态同一行，放不下就各自压缩，不换行 */
}
.users-toolbar .spacer { margin-left: auto; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 240px;
  flex: 0 1 320px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  height: 100%;
}
.search-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
}
.search-clear:hover { background: var(--hl-3); color: var(--text); }

.filter-select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}

/* 表格：外层负责横滚，窄屏下操作列吸在右边 */
.table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: auto;
  max-height: min(56vh, 560px);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 820px;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  padding: 0 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]:hover { color: var(--text); }
.data-table th[data-sort]::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  opacity: 0.35;
}
.data-table th[data-sort][data-dir='asc']::after { border-bottom: 5px solid currentColor; opacity: 1; }
.data-table th[data-sort][data-dir='desc']::after { border-top: 5px solid currentColor; opacity: 1; }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table th.ops, .data-table td.ops {
  text-align: right;
  position: sticky;
  right: 0;
  background: var(--surface);
  box-shadow: -8px 0 10px -10px rgba(27, 34, 51, 0.25);
}
.data-table th.ops { background: var(--surface-2); z-index: 3; }
.data-table td {
  height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--hl-1); }
.data-table tbody tr:hover td.ops { background: var(--hl-1); }
.data-table tbody tr.row-off td { color: var(--muted); }
.data-table td.muted { color: var(--muted); }
.data-table td.ellipsis {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table td.ops .btn + .btn { margin-left: 4px; }

.cell-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-user b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.cell-user .avatar {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 650;
}
.tr-off .cell-user .avatar,
.row-off .cell-user .avatar { background: var(--surface-3); color: var(--muted); }

.table-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* 表格里的按钮比工具栏矮一档：48px 行高里塞下 4 个标准按钮会挤 */
.btn.xs {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 7px;
}

/* 窄屏上的用户管理：弹窗贴边、表格照常横滚（.table-wrap 已处理），
   工具栏的搜索框允许压到整行 */
@media (max-width: 720px) {
  .modal-panel.wide { max-width: 100%; max-height: 94vh; }
  .users-toolbar { gap: 6px; }
  .search-box { min-width: 0; flex: 1 1 auto; }
  .filter-select { padding: 0 4px; font-size: 12px; }
  .data-table td.ops { padding: 0 8px; }
  .data-table td.ops .btn + .btn { margin-left: 2px; }
}

/* --- 积分 --- */
/* 我的账号里的余额一行：数字大一点、后面跟收费口径 */
.credit-balance {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: var(--hl-2);
  border-radius: 8px;
}
.credit-balance b { font-size: 20px; }

/* 积分明细里的正负数：绿加红减，和运营后台的习惯一致 */
.credit-in { color: var(--ok); }
.credit-out { color: var(--err); }
