/* ==============================================================
   菜鸟自动化控制台 · UI 框架 v2
   --------------------------------------------------------------
   完全重写。设计令牌 + 双主题（浅色 / 深色 / 跟随系统）。
   组件：外壳 / 表单 / 按钮 / 卡片 / 统计 / 表格 / 标签 / 商品卡 /
         账号卡 / 抢购清单 / 模态 / 提示条 / 登录页
   ============================================================== */

/* ─────────────────────────────────────────────────────────────
   1. 设计令牌
   ───────────────────────────────────────────────────────────── */
:root {
  /* 版式 */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --sp-1: 4px;  --sp-2: 6px;  --sp-3: 8px;  --sp-4: 12px;
  --sp-5: 16px; --sp-6: 20px; --sp-7: 24px; --sp-8: 32px;

  --t-fast: 130ms cubic-bezier(.4, 0, .2, 1);
  --t-base: 190ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 320ms cubic-bezier(.22, 1, .36, 1);

  /* 尺寸 */
  --nav-w: 254px;
  --nav-rail-w: 78px;
  --topbar-h: 62px;
  --content-max: 1340px;

  /* ── 浅色主题 ── */
  --bg:            #f2f4f8;
  --bg-soft:       #f7f9fc;
  --bg-deep:       #e9edf4;
  --surface:       #ffffff;
  --surface-2:     #f6f8fc;
  --surface-3:     #eceff6;
  --surface-glass: rgba(255, 255, 255, .78);
  --side-bg:       #ffffff;

  --border:        #e3e8f1;
  --border-strong: #ccd5e3;
  --border-soft:   #eef1f7;

  --text:    #0d1626;
  --text-2:  #45536b;
  --muted:   #7b8aa3;
  --faint:   #a3b0c4;

  --accent:       #2f66f5;
  --accent-hover: #2354dd;
  --accent-ink:   #ffffff;
  --accent-soft:  rgba(47, 102, 245, .10);
  --accent-line:  rgba(47, 102, 245, .30);
  --accent-2:     #0ea5e9;

  --ok:         #12a150;
  --ok-soft:    rgba(18, 161, 80, .12);
  --ok-line:    rgba(18, 161, 80, .32);
  --warn:       #bd7210;
  --warn-soft:  rgba(189, 114, 16, .13);
  --warn-line:  rgba(189, 114, 16, .32);
  --danger:     #d93b3b;
  --danger-soft: rgba(217, 59, 59, .12);
  --danger-line: rgba(217, 59, 59, .32);
  --purple:     #7c5cf0;
  --purple-soft: rgba(124, 92, 240, .13);
  --purple-line: rgba(124, 92, 240, .32);

  --code-bg: #f1f4fa;
  --code-fg: #2b4a8b;

  --sh-1: 0 1px 2px rgba(16, 26, 48, .05);
  --sh-2: 0 2px 4px -1px rgba(16, 26, 48, .06), 0 8px 22px -10px rgba(16, 26, 48, .16);
  --sh-3: 0 4px 8px -2px rgba(16, 26, 48, .07), 0 22px 50px -18px rgba(16, 26, 48, .26);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, .6);

  --ring: 0 0 0 3px var(--accent-soft);
  --grad-brand: linear-gradient(135deg, #10b981 0%, #38bdf8 100%);
  --grad-accent: linear-gradient(135deg, #2f66f5 0%, #5b8cff 100%);
}

html[data-theme="dark"] {
  --bg:            #0a0e15;
  --bg-soft:       #0e131c;
  --bg-deep:       #070a10;
  --surface:       #111825;
  --surface-2:     #161e2c;
  --surface-3:     #1e2838;
  --surface-glass: rgba(12, 17, 25, .76);
  --side-bg:       #0d131d;

  --border:        #202a3a;
  --border-strong: #33425c;
  --border-soft:   #19222f;

  --text:    #e9eef8;
  --text-2:  #a4b2c8;
  --muted:   #7688a1;
  --faint:   #5c6c84;

  --accent:       #6b8cff;
  --accent-hover: #89a3ff;
  --accent-ink:   #071021;
  --accent-soft:  rgba(107, 140, 255, .16);
  --accent-line:  rgba(107, 140, 255, .38);
  --accent-2:     #38bdf8;

  --ok:         #3ddc84;
  --ok-soft:    rgba(61, 220, 132, .14);
  --ok-line:    rgba(61, 220, 132, .34);
  --warn:       #f5b642;
  --warn-soft:  rgba(245, 182, 66, .15);
  --warn-line:  rgba(245, 182, 66, .34);
  --danger:     #ff7070;
  --danger-soft: rgba(255, 112, 112, .15);
  --danger-line: rgba(255, 112, 112, .34);
  --purple:     #a78bfa;
  --purple-soft: rgba(167, 139, 250, .15);
  --purple-line: rgba(167, 139, 250, .34);

  --code-bg: #0b1119;
  --code-fg: #7fc4ff;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .45);
  --sh-2: 0 2px 6px -1px rgba(0, 0, 0, .5), 0 10px 26px -12px rgba(0, 0, 0, .75);
  --sh-3: 0 6px 14px -4px rgba(0, 0, 0, .55), 0 28px 60px -22px rgba(0, 0, 0, .85);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, .04);

  --grad-accent: linear-gradient(135deg, #4f6ef7 0%, #7ba0ff 100%);
}

/* ─────────────────────────────────────────────────────────────
   2. 基础
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t-base), color var(--t-base);
}

[hidden] { display: none !important; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-hover); }

b, strong { font-weight: 650; }
em, i { font-style: normal; }
code, kbd, samp { font-family: var(--mono); font-size: .92em; }
code {
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  word-break: break-all;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { display: block; flex: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

::selection { background: var(--accent-soft); color: var(--text); }

/* ─────────────────────────────────────────────────────────────
   3. 按钮
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  color: var(--text-2);
  background: var(--surface-2);
  border-color: var(--border);
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.btn:active { transform: translateY(.5px) scale(.995); }

.btn:disabled,
.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 2px rgba(47, 102, 245, .28), var(--sh-inset);
}
.btn-primary:hover {
  filter: brightness(1.07);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(47, 102, 245, .5), var(--sh-inset);
}

.btn-blue {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.btn-blue:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.btn-danger {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn-warn {
  background: var(--warn-soft);
  border-color: var(--warn-line);
  color: var(--warn);
}
.btn-warn:hover { background: var(--warn); border-color: var(--warn); color: #fff; }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

.btn-sm { height: 29px; padding: 0 10px; font-size: 12.2px; border-radius: var(--r-xs); gap: 5px; }
.btn-big { height: 44px; padding: 0 22px; font-size: 14px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* 主题按钮图标显隐 */
#btn-theme .ico-sun { display: none; }
#btn-theme .ico-moon { display: block; }
html[data-theme="dark"] #btn-theme .ico-sun { display: block; }
html[data-theme="dark"] #btn-theme .ico-moon { display: none; }

/* ─────────────────────────────────────────────────────────────
   4. 表单
   ───────────────────────────────────────────────────────────── */
.field { margin-bottom: 15px; }
.field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.field-wrap { position: relative; display: flex; align-items: center; }
.field-ico {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
  transition: color var(--t-fast);
}
.field-wrap:focus-within .field-ico { color: var(--accent); }
/* 注意：必须带 [type=...] 提高权重，否则会被下方
   input[type="text"] { padding: 0 12px } 覆盖，图标会和占位文字重叠 */
.field-wrap > input[type="text"],
.field-wrap > input[type="password"],
.field-wrap > input[type="number"],
.field-wrap > input[type="email"],
.field-wrap > input[type="search"],
.field-wrap > input { padding-left: 38px; }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="email"],
select,
textarea,
.inp {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
textarea, textarea.inp { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
select, select.inp {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8aa3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover, .inp:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus, .inp:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
  background: var(--surface);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

/* 兼容旧结构 */
.form-row { margin-bottom: 15px; }
.form-row > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex: none;
}

.hint { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 6px; }
.hint.error { color: var(--danger); }

/* ─────────────────────────────────────────────────────────────
   5. 登录 / 注册
   ───────────────────────────────────────────────────────────── */
.auth {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  overflow: auto;
}
.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 100vh;
}

.auth-aside {
  position: relative;
  display: flex;
  align-items: center;
  padding: 56px 60px;
  overflow: hidden;
  background: linear-gradient(150deg, #0b2a4a 0%, #0d3f63 42%, #0f6b6b 100%);
  color: #fff;
}
.auth-aside-inner { position: relative; z-index: 2; max-width: 460px; }

.auth-glow {
  position: absolute;
  inset: -30%;
  z-index: 1;
  background:
    radial-gradient(38% 42% at 18% 22%, rgba(16, 185, 129, .55), transparent 62%),
    radial-gradient(42% 46% at 82% 30%, rgba(56, 189, 248, .48), transparent 64%),
    radial-gradient(50% 55% at 62% 92%, rgba(99, 102, 241, .42), transparent 66%);
  filter: blur(12px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.auth-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4px;
}
.auth-mark svg { border-radius: 12px; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .6); }

.auth-headline {
  margin: 40px 0 16px;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: -.6px;
}
.auth-headline em {
  background: linear-gradient(100deg, #7ef2c8, #7fd7ff 60%, #b9a6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-lede {
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(255, 255, 255, .74);
  max-width: 400px;
}

.auth-feats { margin: 30px 0 0; display: grid; gap: 11px; }
.auth-feats li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .88);
}
.auth-feats .dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  position: relative;
}
.auth-feats .dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: var(--r-pill);
  background: #7ef2c8;
}

.auth-note {
  margin-top: 34px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  max-width: 430px;
}
.auth-note summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  color: rgba(255, 255, 255, .92);
  list-style: none;
}
.auth-note summary::-webkit-details-marker { display: none; }
.auth-note summary::before { content: "▸ "; color: #7ef2c8; }
.auth-note[open] summary::before { content: "▾ "; }
.auth-note p {
  margin-top: 9px;
  font-size: 12.2px;
  line-height: 1.66;
  color: rgba(255, 255, 255, .68);
}
.auth-note-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: #7fd7ff;
}
.auth-note-link:hover { color: #a9e6ff; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg);
}
.auth-card { width: 100%; max-width: 388px; }
.auth-card-head { margin-bottom: 26px; }
.auth-card-head h2 { font-size: 25px; font-weight: 730; letter-spacing: -.4px; }
.auth-card-head p { margin-top: 5px; font-size: 13.5px; color: var(--muted); }

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.auth-tabs button {
  position: relative;
  z-index: 2;
  height: 34px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--t-base);
}
.auth-tabs button.active { color: var(--text); }
.auth-tabs-thumb {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 4px;
  width: calc(50% - 6px);
  height: calc(100% - 8px);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: transform var(--t-slow);
}
.auth-tabs:has(#tab-reg.active) .auth-tabs-thumb { transform: translateX(calc(100% + 4px)); }

#auth-submit { margin-top: 6px; }

/* ─────────────────────────────────────────────────────────────
   6. 应用外壳
   ───────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── 侧栏 ── */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex: none;
  display: flex;
  flex-direction: column;
  width: var(--nav-w);
  height: 100vh;
  background: var(--side-bg);
  border-right: 1px solid var(--border);
  transition: width var(--t-slow), transform var(--t-slow);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-h);
  padding: 0 16px;
  flex: none;
  border-bottom: 1px solid var(--border-soft);
}
.brand-mark { flex: none; display: flex; }
.brand-mark svg { border-radius: 10px; box-shadow: 0 6px 16px -8px rgba(16, 185, 129, .9); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text b { font-size: 14px; font-weight: 700; letter-spacing: -.1px; white-space: nowrap; }
.brand-text i { font-size: 11px; color: var(--muted); white-space: nowrap; }

.rail-btn {
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast),
              transform var(--t-slow), width var(--t-fast);
}
.rail-btn:hover { background: var(--surface-2); color: var(--text); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group-title {
  padding: 14px 10px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.nav-group-title:first-child { padding-top: 4px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-item svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: color var(--t-fast); }
.nav-item > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item:hover svg { color: var(--text-2); }

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}
.nav-item.active svg { color: var(--accent); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-item .badge {
  margin-left: auto;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-footer {
  flex: none;
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.user-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 10px -4px rgba(16, 185, 129, .9);
}
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-name {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-meta i { font-size: 11px; color: var(--muted); }

/* ── 主区 ── */
/* 必须限定为 .app 的直接子元素：内容区里 .list-row 也用 .main 做子元素，
   裸 .main 选择器会把 flex-direction:column 泄漏进去（历史踩坑） */
.app > .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 22px;
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.menu-toggle { display: none; }

.topbar-heading { min-width: 0; display: flex; flex-direction: column; line-height: 1.22; }
.topbar-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-crumb { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.topbar-crumb b { color: var(--muted); font-weight: 600; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px 0 9px;
  border-radius: var(--r-pill);
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(18, 161, 80, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(18, 161, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 161, 80, 0); }
}

.content {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 22px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.content > * { animation: rise var(--t-slow) both; }
.content > *:nth-child(2) { animation-delay: 40ms; }
.content > *:nth-child(3) { animation-delay: 80ms; }
.content > *:nth-child(4) { animation-delay: 110ms; }
.content > *:nth-child(n+5) { animation-delay: 140ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.side-mask {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(8, 12, 20, .5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.side-mask.show { opacity: 1; visibility: visible; }

/* ─────────────────────────────────────────────────────────────
   7. 卡片 / 标题
   ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--sh-1);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--sh-2); }

.card-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14.5px;
  font-weight: 680;
  letter-spacing: -.15px;
}
.card-title .sub {
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
}

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-sub { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 8px; }

/* ─────────────────────────────────────────────────────────────
   8. 统计卡
   ───────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--border-strong); }
.stat-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2.5px;
  background: var(--border-strong);
  opacity: .55;
}
.stat-card .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}
.stat-card .value {
  margin-top: 7px;
  font-size: 27px;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -.7px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.stat-card .value .unit { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }

.stat-card.blue  .value { color: var(--accent); }
.stat-card.blue::after  { background: var(--accent); opacity: 1; }
.stat-card.green .value { color: var(--ok); }
.stat-card.green::after { background: var(--ok); opacity: 1; }
.stat-card.red   .value { color: var(--danger); }
.stat-card.red::after   { background: var(--danger); opacity: 1; }
.stat-card.warn  .value { color: var(--warn); }
.stat-card.warn::after  { background: var(--warn); opacity: 1; }

/* ─────────────────────────────────────────────────────────────
   9. 服务器指标
   ───────────────────────────────────────────────────────────── */
.srv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 11px;
}
.srv-card {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.srv-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.srv-label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .03em;
  color: var(--muted);
}
.srv-value {
  margin-top: 3px;
  font-size: 29px;
  font-weight: 720;
  line-height: 1.22;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.srv-value.is-sm { font-size: 19px; letter-spacing: -.3px; }
.srv-value .pct { font-size: 15px; font-weight: 700; margin-left: 1px; }
.srv-sub { margin-top: 3px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }

.srv-bar {
  height: 7px;
  margin-top: 8px;
  border-radius: var(--r-pill);
  background: var(--bg-deep);
  overflow: hidden;
}
.srv-bar > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--accent);
  transition: width var(--t-slow);
}

/* ─────────────────────────────────────────────────────────────
   10. 工具条
   ───────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}
.toolbar label { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.toolbar select,
.toolbar input { width: auto; min-width: 132px; height: 36px; font-size: 13px; }
.toolbar .spacer { flex: 1; min-width: 8px; }

/* ─────────────────────────────────────────────────────────────
   11. 表格
   ───────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table.tbl, .tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 680;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  vertical-align: middle;
}
.tbl td b, .tbl td strong { color: var(--text); font-weight: 620; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* 操作列不允许折行：折了会让整列被压扁、按钮堆成两排 */
.tbl td:last-child .actions { flex-wrap: nowrap; }
.tbl td .actions .btn { white-space: nowrap; }

/* ─────────────────────────────────────────────────────────────
   12. 列表 / 进度
   ───────────────────────────────────────────────────────────── */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.list-row:last-child { border-bottom: 0; }
.list-row .main { display: flex; flex-direction: row; align-items: center; gap: 9px; min-width: 0; }

.progress {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--bg-deep);
  overflow: hidden;
}
.progress > div {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--grad-accent);
  transition: width var(--t-slow);
}

/* ─────────────────────────────────────────────────────────────
   13. 标签
   ───────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
.tag-green  { background: var(--ok-soft);     border-color: var(--ok-line);     color: var(--ok); }
.tag-red    { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.tag-warn   { background: var(--warn-soft);   border-color: var(--warn-line);   color: var(--warn); }
.tag-blue   { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.tag-gray   { background: var(--surface-2);   border-color: var(--border);      color: var(--muted); }

/* ─────────────────────────────────────────────────────────────
   14. 商品商城
   ───────────────────────────────────────────────────────────── */
.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 14px;
}

.award-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.award-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--sh-3);
}

.award-card .thumb {
  position: relative;
  display: grid;
  place-items: center;
  height: 152px;
  padding: 14px;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--surface-2), var(--surface-3));
  border-bottom: 1px solid var(--border-soft);
}
.award-card .thumb img {
  max-width: 100%;
  max-height: 124px;
  object-fit: contain;
  border-radius: var(--r-sm);
  mix-blend-mode: multiply;
  transition: transform var(--t-slow);
}
html[data-theme="dark"] .award-card .thumb img {
  mix-blend-mode: normal;
  background: #fff;
  padding: 5px;
}
.award-card:hover .thumb img { transform: scale(1.06); }

.award-card .thumb .no-img {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  color: var(--faint);
  font-size: 24px;
  font-weight: 700;
}

.award-card .thumb .status-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  backdrop-filter: blur(6px);
  border: 1px solid transparent;
}
.award-card .thumb .status-flag.tag-green {
  background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok);
}
.award-card .thumb .status-flag.tag-red {
  background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger);
}
.award-card .thumb .status-flag.tag-warn {
  background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn);
}

.award-card .body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 15px 15px;
}
.award-card .name {
  font-size: 13.5px;
  font-weight: 640;
  line-height: 1.42;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.84em;
}
.award-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.award-card .meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.award-card .meta b { font-weight: 700; font-variant-numeric: tabular-nums; }
.award-card .meta .inv-ok { color: var(--ok); }
.award-card .meta .inv-no { color: var(--faint); font-weight: 600; }

.award-card .award-source { font-size: 11px; color: var(--faint); line-height: 1.45; }

.award-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.award-card .pts {
  font-size: 19px;
  font-weight: 730;
  letter-spacing: -.5px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.award-card .pts .u { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.award-card .origin {
  font-size: 12px;
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.award-card .reason {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--warn);
  padding: 5px 9px;
  border-radius: var(--r-xs);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
}

.award-card .foot { margin-top: auto; padding-top: 11px; }

.award-card.is-unverified { border-style: dashed; opacity: .82; }
.award-card.is-unverified .thumb { background: var(--surface-3); }

/* ─────────────────────────────────────────────────────────────
   15. 账号卡（任务中心）
   ───────────────────────────────────────────────────────────── */
.acct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.acct-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.acct-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--sh-2); }

.acct-card .head { display: flex; align-items: center; gap: 11px; }
.acct-card .avatar {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--grad-brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 16px -8px rgba(16, 185, 129, .95);
}
.acct-card .nick {
  font-size: 14px;
  font-weight: 660;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-card .unb { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

.acct-card .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}
.acct-card .metric {
  padding: 10px 8px;
  text-align: center;
  background: var(--surface-2);
}
.acct-card .metric .v {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.acct-card .metric .k { margin-top: 1px; font-size: 11px; color: var(--muted); }

.acct-card .ops { display: flex; flex-wrap: wrap; gap: 6px; }
.acct-card .err {
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-all;
}

/* 运行状态点 */
.run-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px !important;
}
.run-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--faint);
  flex: none;
}
.run-dot.run-ok::before   { background: var(--ok);     box-shadow: 0 0 0 3px var(--ok-soft); }
.run-dot.run-bad::before  { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.run-dot.run-warn::before { background: var(--warn);   box-shadow: 0 0 0 3px var(--warn-soft); }
.run-dot.run-now::before  { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s ease-out infinite; }

/* 最近执行记录 */
.recent-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  max-height: 152px;
  overflow-y: auto;
}
.recent-log.empty {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  padding: 14px;
}
.rl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 2px 0;
}
.rl-ico {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  font-size: 9.5px;
  font-weight: 800;
}
.rl-ico.ok   { background: var(--ok-soft);     color: var(--ok); }
.rl-ico.fail { background: var(--danger-soft); color: var(--danger); }
.rl-name {
  flex: 1;
  min-width: 0;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl-time { flex: none; color: var(--faint); font-family: var(--mono); font-size: 11px; }

/* ─────────────────────────────────────────────────────────────
   16. 抢购申请（账号 / 商品勾选）
   ───────────────────────────────────────────────────────────── */
.check-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 3px;
}

.acc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.acc-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.acc-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-line);
}
.acc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.acc-line {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-line .st-err { color: var(--danger); font-size: 11.5px; font-weight: 650; }
.acc-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.frag-badge {
  padding: 1.5px 7px;
  border-radius: var(--r-pill);
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  font-size: 11px;
  font-weight: 650;
}
.frag-badge.err {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}

.item-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.item-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.item-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-line);
}

.item-pic, .item-pic2 {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.item-pic img, .item-pic2 img {
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] .item-pic img,
html[data-theme="dark"] .item-pic2 img { mix-blend-mode: normal; background: #fff; padding: 2px; }
.item-noimg { font-size: 16px; font-weight: 700; color: var(--faint); }

.item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.item-name {
  font-size: 12.8px;
  font-weight: 620;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-pts, .item-pts2 { font-size: 11.5px; color: var(--muted); }
.item-pts b, .item-pts2 b {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.item-pts i, .item-pts2 i { color: var(--muted); }
.item-sent, .item-sent2 { font-size: 11px; color: var(--faint); }
.item-info { font-size: 12px; color: var(--muted); }
.item-info b { color: var(--accent); }
.item-check { margin-left: auto; }

/* ─────────────────────────────────────────────────────────────
   17. 定时任务 / 环境变量
   ───────────────────────────────────────────────────────────── */
.cron-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.cron-item:hover { border-color: var(--border-strong); background: var(--surface-3); }
.cron-item .name { font-size: 13px; font-weight: 640; color: var(--text); min-width: 0; }
.cron-item .cmd {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--code-fg);
  background: var(--code-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xs);
  padding: 1px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.cron-item .time { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
/* info 必须占满剩余宽度并左对齐，否则整行会被挤到右侧、左边留一大片空白 */
.cron-item .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
}
.cron-item .info .name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cron-item .info .cmd { align-self: flex-start; }
.cron-item > .btn { flex: none; }

/* ─────────────────────────────────────────────────────────────
   18. 弹窗
   ───────────────────────────────────────────────────────────── */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 12, 20, .55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade var(--t-base) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-3);
  overflow: hidden;
  animation: pop var(--t-slow) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.modal-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head .title { flex: 1; font-size: 15px; font-weight: 680; letter-spacing: -.15px; }
.modal-close {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  transition: background var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  font-size: 13.5px;
  color: var(--text-2);
}
.modal-body p { line-height: 1.68; }

.modal-foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
}

/* ─────────────────────────────────────────────────────────────
   19. 提示条
   ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  z-index: 400;
  max-width: min(88vw, 480px);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-3);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -14px);
  transition: opacity var(--t-base), transform var(--t-slow), visibility var(--t-base);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.success { border-color: var(--ok-line);     color: var(--ok);     background: var(--surface); }
.toast.error   { border-color: var(--danger-line); color: var(--danger); background: var(--surface); }

/* ─────────────────────────────────────────────────────────────
   20. 加载 / 空态 / 预览
   ───────────────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 52px 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.spinner {
  width: 17px;
  height: 17px;
  flex: none;
  border-radius: var(--r-pill);
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 13.5px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
}

.add-preview {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.add-preview table { width: 100%; font-size: 12px; border-collapse: collapse; }
.add-preview th {
  text-align: left;
  padding: 4px 6px;
  color: var(--muted);
  font-weight: 650;
  border-bottom: 1px solid var(--border);
}
.add-preview td { padding: 4px 6px; }

/* ─────────────────────────────────────────────────────────────
   21. 响应式
   ───────────────────────────────────────────────────────────── */
/* 侧栏收起（桌面） */
@media (min-width: 1001px) {
  html[data-nav="rail"] .sidebar { width: var(--nav-rail-w); }
  html[data-nav="rail"] .brand-text,
  html[data-nav="rail"] .nav-item > span,
  html[data-nav="rail"] .nav-item .badge,
  html[data-nav="rail"] .nav-group-title,
  html[data-nav="rail"] .user-meta,
  html[data-nav="rail"] .sidebar-footer .btn span { display: none; }
  html[data-nav="rail"] .sidebar-brand { justify-content: center; padding: 0 8px; }
  /* 2026-09-17 修：这里原来是 display:none —— 收起后按钮整个消失，
     桌面端再没有任何入口能展开（状态还存在 localStorage，刷新也回不来）。
     改成贴在侧栏右缘的把手：absolute 定位不占布局，brand 高度不变。 */
  /* 2026-09-28 修：原来是 18×44、surface-2 底 + faint 图标，白底白边贴在白色
     侧栏右缘 → 几乎不可见，用户反馈「侧边栏不能展开 / 没有按钮」。改成强调色
     实心手把，加宽加高 + 外投影，hover 再向外扩一点给出可点反馈。 */
  html[data-nav="rail"] .rail-btn {
    display: grid;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 24px;
    height: 60px;
    margin: 0;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-right: 0;
    color: var(--accent-ink);
    box-shadow: -2px 0 10px rgba(15, 30, 60, .16);
    z-index: 41;
  }
  html[data-nav="rail"] .rail-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-ink);
    width: 28px;
  }
  html[data-nav="rail"] .nav-item { justify-content: center; padding: 0; }
  html[data-nav="rail"] .nav-item .badge {
    display: grid;
    position: absolute;
    top: 5px;
    right: 8px;
    margin: 0;
    min-width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
  }
  html[data-nav="rail"] .sidebar-nav { padding: 12px 10px 18px; gap: 4px; }
  html[data-nav="rail"] .nav-item.active::before { left: -10px; }
  html[data-nav="rail"] .sidebar-user { justify-content: center; padding: 8px 0; }
  html[data-nav="rail"] .rail-btn svg { transform: rotate(180deg); }
}

@media (max-width: 1180px) {
  .auth-aside { padding: 44px 40px; }
  .auth-headline { font-size: 30px; }
}

@media (max-width: 1000px) {
  .auth-stage { grid-template-columns: 1fr; min-height: 100%; align-content: start; }

  /* 窄屏：左侧介绍区收成顶部品牌条，而不是整块消失 */
  .auth-aside {
    align-items: flex-start;
    padding: 26px 22px 24px;
    border-radius: 0 0 24px 24px;
  }
  .auth-aside-inner { max-width: 520px; margin: 0 auto; width: 100%; }
  .auth-headline { margin: 20px 0 10px; font-size: 25px; }
  .auth-lede { font-size: 13px; line-height: 1.6; max-width: none; }
  .auth-feats, .auth-note { display: none; }
  .auth-glow { inset: -60% -20%; }

  .auth-panel { padding: 26px 22px 44px; min-height: 0; }
  .auth-card { max-width: 520px; margin: 0 auto; width: 100%; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 45;
    width: min(84vw, 286px);
    transform: translateX(-102%);
    box-shadow: var(--sh-3);
  }
  .sidebar.open { transform: none; }
  .rail-btn { display: none; }

  .menu-toggle { display: inline-flex; }
  .content { padding: 18px 14px 56px; gap: 14px; }
  .topbar { padding: 0 14px; }
  .topbar-crumb { display: none; }
  .live-pill { display: none; }
  .card { padding: 15px 16px; border-radius: var(--r-md); }
  .award-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; }
  .award-card .thumb { height: 126px; }
  .acct-grid { grid-template-columns: 1fr; }
  .check-list { grid-template-columns: 1fr; max-height: 260px; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: var(--r-lg); }
  .modal-mask { padding: 12px; }
  .table-wrap { border-radius: var(--r-sm); }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .srv-grid { grid-template-columns: repeat(2, 1fr); }
  .award-grid { grid-template-columns: repeat(2, 1fr); }
  .award-card .thumb { height: 112px; }
  .award-card .pts { font-size: 17px; }
  .toolbar { gap: 7px; }
  .toolbar select, .toolbar input { min-width: 0; flex: 1; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────
   22. 运行时动态创建的元素
   app.js 通过 el(tag, cls) 现场生成，类名不写在 index.html 里，
   但必须存在样式，否则勾选框会退回浏览器默认外观。
   ───────────────────────────────────────────────────────────── */
.acc-check,
.item-check {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 6px;
  border: 1.6px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.acc-check:hover,
.item-check:hover { border-color: var(--accent); }
.acc-check::after,
.item-check::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 5px;
  height: 9.5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(.4);
  opacity: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.acc-check:checked,
.item-check:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.acc-check:checked::after,
.item-check:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }
.acc-check:focus-visible,
.item-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.item-check { margin-left: auto; }

/* 历史 DOM 结构兜底（旧版 index.html 曾用 .check-item，勿删） */
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.check-item:hover { border-color: var(--border-strong); background: var(--surface-3); }
.check-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-line);
}

/* 运行状态：.run-dot.run-ok / .run-bad / .run-warn / .run-now
   的复合变体已在第 15 节定义（app.js 用 class="v run-dot <cls>"），此处不再重复。 */

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ============================================================
   抢购申请选账号 + 账号详情地址簿（2026-09-17 ui3）
   ============================================================ */
.acc-pick-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 2px 8px; font-size: 12.5px; color: var(--muted);
}
.acc-pick-all { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); }
.acc-pick-count { margin-left: auto; }
.acc-pick-list {
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-soft);
}
.acc-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
}
.acc-pick:last-child { border-bottom: 0; }
.acc-pick:hover { background: var(--accent-soft); }
.acc-pick input { width: 15px; height: 15px; accent-color: var(--accent); flex: none; }
.acc-pick-name { font-weight: 600; color: var(--text); }
.acc-pick-meta { margin-left: auto; font-size: 11.5px; color: var(--muted); }

.dtabs {
  display: flex; gap: 4px; margin: -4px 0 14px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.dtab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: inherit; transition: color var(--t-fast), border-color var(--t-fast);
}
.dtab:hover { color: var(--text-2); }
.dtab.active { color: var(--accent); border-bottom-color: var(--accent); }

.addr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.addr-head .spacer { flex: 1; }
.addr-list { display: flex; flex-direction: column; gap: 8px; }
.addr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-soft);
}
.addr-item.is-def { border-color: var(--accent-line); background: var(--accent-soft); }
.addr-main { flex: 1; min-width: 0; }
.addr-line1 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.addr-phone { color: var(--muted); font-size: 12.5px; }
.addr-def-tag { font-size: 10px; }
.addr-line2 {
  margin-top: 3px; font-size: 12.5px; color: var(--text-2);
  word-break: break-all; line-height: 1.5;
}
.addr-form {
  margin-top: 14px; padding: 14px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  background: var(--surface-2);
}
.addr-form-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.addr-region { display: flex; gap: 8px; }
.addr-region .inp { flex: 1; min-width: 0; }
.addr-def { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.addr-form-foot { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }


/* 地址 Tab 顶部说明条（2026-09-17 ui5）：讲清「抢购地址不在这里选」 */
.addr-note {
  padding: 11px 13px; margin-bottom: 12px;
  border: 1px solid var(--warn-line, rgba(245, 158, 11, .35));
  border-radius: var(--r-md);
  background: var(--warn-soft, rgba(245, 158, 11, .10));
  font-size: 12.5px; line-height: 1.65; color: var(--text-2);
}
.addr-note b { color: var(--text); }
.addr-note-id {
  margin-top: 7px; padding-top: 7px;
  border-top: 1px dashed var(--warn-line, rgba(245, 158, 11, .35));
  font-size: 12px; color: var(--muted);
}
.addr-note-act { margin-top: 9px; }
.addr-note-act .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ── 多活动聚合工作台 ── */
.agg-hero,
.gold-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 190px;
  padding: 28px 32px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(125deg, var(--surface), var(--surface-2));
  box-shadow: var(--sh-1);
}
.agg-hero::after,
.gold-hero::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: 7%;
  top: -125px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  pointer-events: none;
}
.agg-hero-copy,
.gold-hero > div:first-child { position: relative; z-index: 1; max-width: 700px; }
.agg-eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
.agg-hero h1,
.gold-hero h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -.04em; }
.agg-hero p,
.gold-hero p { max-width: 620px; margin-top: 10px; color: var(--text-2); font-size: 13px; line-height: 1.7; }
.agg-hero-meta { display: flex; align-items: center; gap: 8px; margin-top: 19px; color: var(--muted); font-size: 12px; }
.agg-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--accent-soft); }
.agg-hero-mark { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 150px; height: 150px; border: 1px solid var(--accent-line); border-radius: 36px; background: var(--accent-soft); transform: rotate(-8deg); }
.agg-hero-mark span { color: var(--accent); font-size: 48px; font-weight: 850; letter-spacing: -.08em; }
.agg-hero-mark i,
.agg-hero-mark b { position: absolute; display: block; border: 1px solid var(--accent-line); border-radius: 50%; }
.agg-hero-mark i { inset: 13px; }
.agg-hero-mark b { inset: 29px; }
.agg-section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 22px 2px 13px; }
.agg-section-head h2 { font-size: 17px; letter-spacing: -.02em; }
.agg-section-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.agg-count { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.agg-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 13px; }
.agg-module-card {
  display: flex;
  flex-direction: column;
  min-height: 205px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.agg-module-card:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: var(--sh-2); }
.agg-module-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.agg-module-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 800; }
.agg-module-card h3 { margin-top: 15px; font-size: 15px; }
.agg-module-card p { flex: 1; margin: 6px 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.agg-module-action { width: 100%; justify-content: space-between; text-decoration: none; }
.agg-module-action span { font-size: 17px; }
.agg-stage { display: inline-flex; align-items: center; flex: none; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--muted); background: var(--surface-2); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.agg-stage.ready { color: var(--ok); border-color: var(--accent-line); background: var(--accent-soft); }
.agg-stage.live { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.agg-stage.discover { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.agg-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 17px; padding: 13px 15px; border: 1px solid var(--warn-line); border-radius: var(--r-md); background: var(--warn-soft); color: var(--text-2); font-size: 12px; line-height: 1.65; }
.agg-note b { flex: none; color: var(--text); }

.gold-hero { min-height: 160px; margin-bottom: 15px; border-color: var(--warn-line); }
.gold-hero::after { background: radial-gradient(circle, var(--warn-soft), transparent 68%); }
.gold-hero h1 span { color: var(--warn); }
.gold-hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.gold-hero-actions a { text-decoration: none; }
.gold-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.gold-toolbar label { color: var(--text-2); font-size: 12px; font-weight: 700; }
.gold-toolbar select { min-width: 220px; max-width: 100%; }
.gold-toolbar .sub { margin-left: auto; }
.gold-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 12px; }
.gold-metric { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-1); }
.gold-metric > span { display: block; color: var(--muted); font-size: 11.5px; }
.gold-metric strong { display: block; margin-top: 9px; color: var(--warn); font-size: 23px; line-height: 1.2; overflow-wrap: anywhere; }
.gold-metric strong i { margin-left: 4px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 500; }
.gold-metric strong.is-good { color: var(--ok); font-size: 18px; }
.gold-metric strong.is-pending { color: var(--text-2); font-size: 18px; }
.gold-metric small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.gold-account-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px 13px; border: 1px solid var(--border-soft); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: 12px; }
.gold-account-line code { padding: 2px 5px; border-radius: 5px; background: var(--surface-3); color: var(--muted); }
.gold-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.gold-entry { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.gold-entry-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--warn-soft); color: var(--warn); font-weight: 800; }
.gold-entry > div { min-width: 0; flex: 1; }
.gold-entry h3 { font-size: 13px; }
.gold-entry p { margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.gold-entry > a { flex: none; color: var(--accent); font-size: 12px; font-weight: 700; }
.gold-error { display: flex; flex-direction: column; gap: 4px; padding: 17px; border: 1px solid var(--danger-line); border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger); }
.gold-error span { color: var(--text-2); font-size: 12px; }
.gold-error small { color: var(--muted); font-size: 11px; }

@media (max-width: 1000px) {
  .agg-hero, .gold-hero { padding: 23px; }
  .gold-hero { align-items: flex-start; flex-direction: column; }
  .gold-hero-actions { justify-content: flex-start; }
  .gold-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .agg-hero { min-height: 0; padding: 20px; }
  .agg-hero-mark { width: 72px; height: 72px; border-radius: 20px; }
  .agg-hero-mark span { font-size: 25px; }
  .agg-hero-mark i { inset: 7px; }
  .agg-hero-mark b { inset: 16px; }
  .agg-module-grid { grid-template-columns: 1fr; }
  .agg-module-card { min-height: 176px; }
  .gold-hero { padding: 20px; }
  .gold-toolbar { align-items: stretch; flex-wrap: wrap; }
  .gold-toolbar label { width: 100%; }
  .gold-toolbar select { min-width: 0; flex: 1; }
  .gold-toolbar .sub { width: 100%; margin-left: 0; }
  .gold-metric-grid { gap: 8px; }
  .gold-metric { padding: 12px; }
  .gold-metric strong { font-size: 20px; }
  .gold-entry-grid { grid-template-columns: 1fr; }
  .agg-note { flex-direction: column; gap: 4px; }
}
.overview-activity-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.overview-activity-strip > div { display: flex; flex-direction: column; margin-right: auto; }
.overview-activity-strip > div b { font-size: 12.5px; }
.overview-activity-strip > div span { color: var(--muted); font-size: 11px; }
.overview-activity-strip .btn { min-height: 34px; }
@media (max-width: 560px) {
  .overview-activity-strip { align-items: stretch; }
  .overview-activity-strip > div { width: 100%; margin-bottom: 3px; }
  .overview-activity-strip .btn { flex: 1; padding-inline: 9px; font-size: 11px; }
}

/* =========================================================
   活动中心 v2（2026-10-19）：KPI / 活动线 / 账号卡 / 明细弹窗
   ========================================================= */
.agg-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; margin-top: 16px; }
.agg-kpi { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.agg-kpi > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.agg-kpi > b { color: var(--text); font-size: 23px; font-weight: 850; letter-spacing: -.03em; line-height: 1.1; }
.agg-kpi > b em { margin-left: 2px; color: var(--muted); font-size: 13px; font-style: normal; font-weight: 700; }
.agg-kpi > i { color: var(--muted); font-size: 11px; font-style: normal; }

.agg-lines { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.agg-line { display: grid; grid-template-columns: 2.4fr .9fr 1fr 1.5fr .8fr; align-items: center; gap: 10px; padding: 11px 15px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.agg-line:first-child { border-top: 0; }
.agg-line-name { display: flex; flex-direction: column; gap: 3px; color: var(--text); font-weight: 700; }
.agg-line-name i { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; line-height: 1.5; }
.agg-line-head { background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.agg-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text-2); word-break: break-all; }

.agg-acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 11px; }
.agg-acct { display: flex; flex-direction: column; gap: 8px; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.agg-acct-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agg-acct-top b { font-size: 13px; }
.agg-acct-num { display: flex; align-items: baseline; gap: 7px; }
.agg-acct-num span { color: var(--muted); font-size: 11px; }
.agg-acct-num b { color: var(--accent); font-size: 21px; font-weight: 850; letter-spacing: -.02em; }
.agg-acct-meta { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.agg-acct-err { color: var(--warn); font-size: 11px; line-height: 1.5; word-break: break-all; }

.agg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 13px; }
.agg-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); font-size: 11px; color: var(--text-2); }
.agg-chip i { color: var(--muted); font-style: normal; }
.agg-chip b { color: var(--text); font-weight: 750; }

.agg-modal-lead { margin: 0 0 13px; color: var(--text-2); font-size: 12.5px; line-height: 1.7; }
.agg-modal-lead code, .agg-kv code { padding: 1px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; }
.agg-modal-foot { display: flex; gap: 8px; justify-content: flex-end; }

.agg-table { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.agg-tr { display: grid; grid-template-columns: 1.5fr .8fr .8fr .8fr .9fr 1.3fr; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.agg-tr:first-child { border-top: 0; }
.agg-th { background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 750; letter-spacing: .08em; }
.agg-table .is-good { color: var(--ok); font-weight: 750; }
.agg-table .is-pending { color: var(--warn); font-weight: 750; word-break: break-all; }
.agg-dim { color: var(--muted); font-size: 11.5px; }

.agg-prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 9px; max-height: 330px; overflow: auto; padding-right: 4px; }
.agg-prize { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface); }
.agg-prize-body { min-width: 0; }
.agg-prize-name { color: var(--text); font-size: 12.5px; font-weight: 700; }
.agg-prize-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.agg-prize-meta b { color: var(--accent); font-weight: 800; }

.agg-records { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 8px; font-size: 12.5px; }
.agg-pre { max-height: 210px; overflow: auto; margin: 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface-2); color: var(--text-2); font-size: 11px; line-height: 1.6; }

.agg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.agg-split h4 { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .02em; }
.agg-ul { margin: 0 0 12px; padding-left: 17px; color: var(--text-2); font-size: 12px; line-height: 1.85; }
.agg-kv { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-2); }
.agg-kv:first-of-type { border-top: 0; }
.agg-kv > span { flex: none; width: 74px; color: var(--muted); }
.agg-kv > b { font-weight: 600; word-break: break-all; }

@media (max-width: 900px) {
  .agg-line { grid-template-columns: 1.6fr .8fr .8fr; }
  .agg-line > :nth-child(4), .agg-line > :nth-child(5) { display: none; }
  .agg-split { grid-template-columns: 1fr; }
  .agg-tr { grid-template-columns: 1.2fr .7fr .7fr .7fr; }
  .agg-tr > :nth-child(5), .agg-tr > :nth-child(6) { display: none; }
}

/* 挑战口令门 */
.agg-gate { display: flex; gap: 9px; align-items: center; }
.agg-input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface); color: var(--text); font-size: 13px; outline: none; }
.agg-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.agg-gate-msg { min-height: 18px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.agg-gate-msg.is-err { color: var(--danger); }
