/* ==========================================================================
   小白数据 · 用户中心模板（default）
   --------------------------------------------------------------------------
   设计口径（参考同行的三套用户中心：深色侧栏 + 亮蓝主色 + 白色卡片）：
   · 侧栏深灰蓝、内容区浅灰蓝、卡片纯白；主色是明快的亮蓝
   · 语义色只表达状态；金额/计数/编号一律等宽数字
   · 组内紧凑、组间宽松；标题上方留白多于下方
   · 深浅色只覆盖令牌，组件规则不重复写一遍
   ========================================================================== */

/* ---------------------------------------------------------------- 设计令牌 */
:root {
  /* 面与背景 */
  --bg: #f0f4f8;
  --bg-soft: #e9eef5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;

  /* 导航壳：浅色主题下与页面同色系（白底 + 深字），不再是一块深色板 */
  --rail: #ffffff;
  --rail-2: #f1f5f9;
  --rail-ink: #0b1220;
  --rail-ink-dim: #44506a;
  --rail-line: #d8e1ec;
  --rail-hover: #e6edf7;
  --rail-active: #dbe7ff;
  --rail-active-ink: #1743c4;
  --rail-mark: #dbe7ff;
  --rail-mark-ink: #1743c4;
  --rail-count-bg: #fbdbe0;
  --rail-count-ink: #d61f3e;
  --rail-avatar-bg: #dbe7ff;
  --rail-avatar-ink: #1743c4;

  /* 文字 */
  --ink-1: #111827;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --ink-4: #9ca3af;

  /* 分隔线 */
  --line: #e5eaf1;
  --line-strong: #d9e0ea;

  /* 品牌与动作（亮蓝） */
  --brand: #2962ff;
  --brand-hover: #1e50d6;
  --brand-ink: #ffffff;
  --brand-soft: #eef3ff;
  --brand-line: #d3e0ff;

  /* 语义色（只表达状态） */
  --ok: #10b981;
  --ok-soft: #e8faf3;
  --warn: #f59e0b;
  --warn-soft: #fef5e7;
  --danger: #f43f5e;
  --danger-soft: #fdeef0;
  --info: #0ea5e9;
  --info-soft: #e8f6fe;

  /* 圆角与投影 */
  --radius-lg: 12px;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05), 0 4px 12px -8px rgba(17, 24, 39, .18);
  --shadow-md: 0 2px 6px rgba(17, 24, 39, .06), 0 16px 32px -20px rgba(17, 24, 39, .28);
  --shadow-lg: 0 24px 56px -24px rgba(17, 24, 39, .4);

  /* 尺寸 */
  --rail-w: 262px;
  --content-w: 2200px;
  --ctl-h: 36px;

  --ease: cubic-bezier(.22, .61, .36, 1);

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

html[data-theme="dark"] {
  --bg: #0f1419;
  --bg-soft: #131a21;
  --surface: #171e26;
  --surface-2: #131a21;
  --surface-3: #1d252e;

  --rail: #0d1116;
  --rail-2: #080b0f;
  --rail-ink: #f1f5fa;
  --rail-ink-dim: rgba(241, 245, 250, .66);
  --rail-line: rgba(255, 255, 255, .1);
  --rail-hover: rgba(255, 255, 255, .1);
  --rail-active: rgba(84, 129, 255, .42);
  --rail-active-ink: #a7c0ff;
  --rail-mark: #1b2c4d;
  --rail-mark-ink: #a7c0ff;
  --rail-count-bg: rgba(251, 113, 133, .26);
  --rail-count-ink: #ff8fa0;
  --rail-avatar-bg: #1b2c4d;
  --rail-avatar-ink: #a7c0ff;

  --ink-1: #e9eef4;
  --ink-2: #aab6c4;
  --ink-3: #8593a3;
  --ink-4: #6b7889;

  --line: #232c37;
  --line-strong: #2d3846;

  --brand: #6b93ff;
  --brand-hover: #8aa9ff;
  --brand-ink: #0d1116;
  --brand-soft: #1a2334;
  --brand-line: #2a3a5c;

  --ok: #34d399;
  --ok-soft: #10261f;
  --warn: #fbbf24;
  --warn-soft: #2a2113;
  --danger: #fb7185;
  --danger-soft: #2c161c;
  --info: #38bdf8;
  --info-soft: #0e2431;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 18px -14px rgba(0, 0, 0, .8);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 20px 36px -22px rgba(0, 0, 0, .9);
  --shadow-lg: 0 28px 60px -26px rgba(0, 0, 0, .95);
}

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

/* 让原生滚动条、表单控件、系统弹层跟随主题（不依赖 JS 也能生效） */
:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* 没有写尺寸的内联图标不要撑满容器 */
svg:not([width]):not([height]) { width: 16px; height: 16px; flex: 0 0 auto; }

::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--ink-1); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 滚动条也属于设计面：默认灰条会打断冷色调 */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: content-box; }

.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;
}

/* hidden 属性必须真的隐藏：组件的 display 不能盖过它 */
[hidden] { display: none !important; }

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- 启动态 */
.splash {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--ink-3);
}

.splash__mark,
.spinner {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  animation: spin .75s linear infinite;
}

.spinner--sm { width: 15px; height: 15px; border-width: 1.8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.splash__text { font-size: 12.5px; letter-spacing: .02em; }

/* ---------------------------------------------------------------- 骨架布局 */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---- 左侧导航（深色壳） ---- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  background: var(--rail);
  color: var(--rail-ink);
  z-index: 40;
  border-right: 1px solid var(--rail-line);
}

/* 侧栏与主区之间始终有一条发丝线：浅色下才看得出层次 */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rail-line);
}

.brand__mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--rail-mark-ink);
  background: var(--rail-mark);
  flex: 0 0 auto;
}
.brand__mark svg { width: 19px; height: 19px; }

.brand__text { min-width: 0; }

.brand__name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--rail-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__sub {
  font-size: 11.5px;
  color: var(--rail-ink-dim);
  letter-spacing: .04em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 10px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--rail-ink-dim);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}

.nav__item svg { width: 18px; height: 18px; opacity: .78; }
.nav__item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 底色统一交给「菜单动效」段的 ::after */
.nav__item:hover { color: var(--rail-ink); }
.nav__item:hover svg { opacity: .95; }

.nav__item.is-active {
  color: var(--rail-active-ink);
  font-weight: 600;
}
.nav__item.is-active svg { opacity: 1; }

.nav__count {
  margin-left: auto;
  min-width: 21px;
  height: 21px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--rail-count-bg);
  color: var(--rail-count-ink);
  font-size: 11.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* ---- 可折叠分组 ---- */
.navgroup { display: flex; flex-direction: column; }

.navgroup__head {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--rail-ink-dim);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}

.navgroup__head svg { width: 18px; height: 18px; opacity: .78; flex: 0 0 auto; }
.navgroup__head span.navgroup__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 底色统一交给「菜单动效」段的 ::after */
.navgroup__head:hover { color: var(--rail-ink); }

.navgroup__head.is-active {
  color: var(--rail-active-ink);
  font-weight: 600;
}

.navgroup__head.is-active svg { opacity: 1; }

.navgroup__caret {
  margin-left: auto;
  width: 13px !important;
  height: 13px !important;
  opacity: .5 !important;
  transition: transform .18s var(--ease);
  flex: 0 0 auto;
}

.navgroup.is-open .navgroup__caret { transform: rotate(90deg); }
/* 展开中的分组头给一点底色，表示"这块是我打开的" */
.navgroup.is-open .navgroup__head.is-active::after { opacity: 1; transform: none; }

/* 分组体：展开/收起由下方「菜单动效」段用 max-height 过渡接管 */

.navsub {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px 0 44px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--rail-ink-dim);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
  position: relative;
}

/* 二级项左侧竖向引导线：层级关系靠形状，不靠缩进猜 */
.navsub::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rail-line);
}

.navsub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 底色统一交给「菜单动效」段的 ::after，这里只改文字色 */
.navsub:hover { color: var(--rail-ink); }

.navsub.is-active {
  color: var(--rail-active-ink);
  font-weight: 500;
}

.navsub.is-active::before { background: var(--rail-active-ink); width: 1.5px; }

.side__foot { padding-top: 12px; border-top: 1px solid var(--rail-line); }

.usercard {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--rail-ink);
  text-align: left;
  cursor: pointer;
  transition: background .14s var(--ease);
}
.usercard:hover { background: var(--rail-hover); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rail-avatar-ink);
  background: var(--rail-avatar-bg);
  flex: 0 0 auto;
}

.usercard__meta { min-width: 0; display: block; }

.usercard__name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usercard__sub {
  display: block;
  font-size: 11.5px;
  color: var(--rail-ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================ 菜单动效
 *
 * 原则：动效只用来表达三件事 —— 当前在哪、可以点、层级在展开。
 * 不做无意义的漂浮和发光；全部 240ms 内收住，重复操作不累。
 * prefers-reduced-motion 下整体关闭。
 */

/* ---- 一级项：背景扫入 + 激活竖条 + 图标微动 ---- */
.nav__item,
.navgroup__head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* 悬停/激活底色用伪元素从左侧扫入，比 background 突变更像"被选中" */
.nav__item::after,
.navgroup__head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rail-hover);
  opacity: 0;
  transform: scaleX(.86);
  transform-origin: left center;
  transition: opacity .16s var(--ease), transform .22s var(--ease);
  pointer-events: none;
}

.nav__item:hover::after,
.navgroup__head:hover::after {
  opacity: 1;
  transform: none;
}

.nav__item.is-active::after {
  opacity: 1;
  transform: none;
  background: var(--rail-active);
}

/* 激活项左侧竖条：颜色 + 高度都从中间长出来 */
.nav__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  margin-top: -9px;
  border-radius: 0 3px 3px 0;
  background: var(--rail-active-ink);
  opacity: 0;
  transform: scaleY(.3);
  transition: opacity .18s var(--ease), transform .26s var(--ease), height .26s var(--ease);
  pointer-events: none;
}

.nav__item.is-active::before {
  opacity: 1;
  transform: none;
  height: 24px;
  margin-top: -12px;
}

/* 图标：悬停轻轻右移，激活时抬起一点 */
.nav__item svg,
.navgroup__head svg {
  transition: transform .2s var(--ease), opacity .16s var(--ease), color .16s var(--ease);
}

.nav__item:hover svg,
.navgroup__head:hover svg {
  transform: translateX(1.5px) scale(1.06);
}

.nav__item.is-active svg {
  transform: none;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--rail-active-ink) 45%, transparent));
}

/* 文字也跟着挪一点，手的动作和眼睛看到的一致 */
.nav__item > span,
.navgroup__head > span {
  transition: transform .2s var(--ease);
}

.nav__item:hover > span,
.navgroup__head:hover > span {
  transform: translateX(1.5px);
}

/* ---- 分组展开/收起：高度过渡，不再"啪"一下出现 ---- */
.navgroup__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .26s var(--ease), opacity .18s var(--ease), padding .26s var(--ease);
}

.navgroup.is-open .navgroup__body {
  max-height: 480px;
  padding: 3px 0 6px;
  opacity: 1;
}

/* 二级项：左侧引导线从上往下"长"出来，展开过程能看出层级 */
.navsub::before {
  transform-origin: top center;
  transform: scaleY(0);
  transition: background .2s var(--ease), width .2s var(--ease), transform .3s var(--ease);
}

.navgroup.is-open .navsub::before { transform: scaleY(1); }

.navsub {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.navsub::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rail-hover);
  opacity: 0;
  transform: scaleX(.86);
  transform-origin: left center;
  transition: opacity .16s var(--ease), transform .22s var(--ease);
  pointer-events: none;
}

.navsub:hover::after {
  opacity: 1;
  transform: none;
}

.navsub.is-active::after {
  opacity: 1;
  transform: none;
  background: var(--rail-active);
}

.navsub > span {
  transition: transform .2s var(--ease);
}

.navsub:hover > span { transform: translateX(1.5px); }

/* 二级项激活：引导线加粗 + 文字色，不加竖条（避免和一级抢视觉） */
.navsub.is-active::before {
  background: var(--rail-active-ink);
  width: 2px;
}

/* ---- 首次进入：菜单项依次浮入，交代层级而不是"闪一下" ---- */
@keyframes navIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}

/* 只在首次挂载时播（JS 挂 .is-entering），路由切换重渲染不再淡入 */
.nav.is-entering > * {
  animation: navIn .3s var(--ease) both;
}

.nav.is-entering > *:nth-child(1) { animation-delay: .01s; }
.nav.is-entering > *:nth-child(2) { animation-delay: .04s; }
.nav.is-entering > *:nth-child(3) { animation-delay: .07s; }
.nav.is-entering > *:nth-child(4) { animation-delay: .10s; }
.nav.is-entering > *:nth-child(5) { animation-delay: .13s; }
.nav.is-entering > *:nth-child(6) { animation-delay: .16s; }
.nav.is-entering > *:nth-child(7) { animation-delay: .19s; }
.nav.is-entering > *:nth-child(8) { animation-delay: .22s; }

/* ---- 点击涟漪：只在按下的位置起一圈，交代"点到了" ---- */
.nav__item,
.navsub,
.navgroup__head {
  -webkit-tap-highlight-color: transparent;
}

.nav-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: .18;
  transform: scale(0);
  animation: navRipple .5s var(--ease) forwards;
  z-index: 0;
}

@keyframes navRipple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ---- 计数徽标：有新待办时轻微呼吸，安静时静止 ---- */
@keyframes countPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rail-count-ink) 40%, transparent); }
  50%      { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rail-count-ink) 0%, transparent); }
}

.nav__count.is-live {
  animation: countPulse 2.4s ease-in-out infinite;
}

/* ---- 减少动态效果：全部停掉，只保留即时状态 ---- */
@media (prefers-reduced-motion: reduce) {
  .nav.is-entering > * { animation: none; }

  .nav__item::after,
  .navgroup__head::after,
  .navsub::after,
  .nav__item::before,
  .navsub::before,
  .nav__item svg,
  .navgroup__head svg,
  .nav__item > span,
  .navgroup__head > span,
  .navsub > span,
  .navgroup__body {
    transition: none !important;
  }

  .nav-ripple { display: none; }
  .nav__count.is-live { animation: none; }
}


/* ---- 主区 ---- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.35;
}

.topbar__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.topbar__spacer { flex: 1 1 auto; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.content {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 24px 28px 56px;
  flex: 1 1 auto;
  animation: pageIn .28s var(--ease) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  min-width: 0;
}

.card--pad { padding: 18px 20px; }

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

.card__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink-1);
}

.card__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.card__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card__body { padding: 16px 18px; }
.card__body--flush { padding: 0; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col-12 { grid-column: span 12; }
.col-9 { grid-column: span 9; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

/* 同列多卡纵向堆叠。
   用 flex 而不是 grid：右列（信息侧栏）通常比左列短，
   让它的最后一张卡吃掉剩余高度，页面底部才是一条齐的线，
   不会在右下角留一块方形空洞。 */
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* 只有侧栏列（4/5 列宽）才拉伸最后一张卡；
   主列（7/8 列宽）保持内容自然高度，避免表格下面拖一片空白。 */
.col-4.stack > *:last-child,
.col-3.stack > *:last-child,
.col-5.stack > *:last-child {
  flex: 1 1 auto;
}

/* ---------------------------------------------------------------- 指标组 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.stat {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.stat__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

.stat__label svg { width: 14px; height: 14px; opacity: .8; }

.stat__value {
  margin-top: 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink-1);
  line-height: 1.25;
}

.stat__unit { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.stat__hint { margin-top: 4px; font-size: 12px; color: var(--ink-3); }

/* 主指标：靠底色区分，不用渐变 */
.stat--accent { background: var(--brand-soft); border-color: var(--brand-line); }
.stat--accent .stat__label { color: var(--brand); }
.stat--accent .stat__value { color: var(--brand); }
.stat--accent .stat__unit,
.stat--accent .stat__hint { color: color-mix(in srgb, var(--brand) 78%, var(--ink-2)); }
.stat__spark { display: none; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink-1);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctl-h);
  padding: 0 14px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .14s var(--ease), border-color .14s var(--ease),
              color .14s var(--ease), box-shadow .14s var(--ease);
}

.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-3); }
.btn:active { background: var(--bg-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--btn-bg); }

.btn--primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--brand-ink);
  --btn-bd: var(--brand);
}
.btn--primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
.btn--primary:active { background: var(--brand-hover); }

.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); --btn-fg: var(--ink-1); }

.btn--danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }

.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn--lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }

.iconbtn {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.iconbtn:hover { background: var(--surface-3); color: var(--ink-1); }
.iconbtn svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid--1 { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--span2 { grid-column: span 2; }

.label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.label__req { color: var(--danger); margin-left: 2px; }

.input,
.select,
.textarea {
  width: 100%;
  min-height: var(--ctl-h);
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-1);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}

.input::placeholder,
.textarea::placeholder { color: var(--ink-4); }

.input:hover,
.select:hover,
.textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 70%, var(--ink-3)); }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] { border-color: var(--danger); }

.textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
.select { appearance: none; padding-right: 30px; cursor: pointer; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.hint { font-size: 12px; color: var(--ink-3); }
.hint--error { color: var(--danger); }

.checkline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.checkline input { accent-color: var(--brand); }

/* ---------------------------------------------------------------- 分段控件 */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.seg__btn {
  height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}

.seg__btn:hover { color: var(--ink-1); }
.seg__btn.is-active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

/* ---------------------------------------------------------------- 表格 */
.table-wrap { width: 100%; overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }

.table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}

.table tbody tr { transition: background .12s var(--ease); }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }

.table .is-right { text-align: right; }
.table .is-strong { color: var(--ink-1); font-weight: 600; }
.table__empty td { text-align: center; color: var(--ink-3); padding: 30px 16px; }

/* ---------------------------------------------------------------- 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--ink-2);
}

.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--brand { background: var(--brand-soft); color: var(--brand); }

.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- 空态与骨架 */
.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
}

.empty__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink-3);
  margin-bottom: 2px;
}
.empty__icon svg { width: 19px; height: 19px; }

.empty__title { font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.empty__text { font-size: 12.5px; color: var(--ink-3); max-width: 340px; line-height: 1.7; }

/* 卡片内的空态比整页空态更紧凑，避免一张空卡占掉半屏 */
.card__body .empty { padding: 28px 20px; }

.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.sk-row { height: 13px; margin-bottom: 10px; }
.sk-row:last-child { margin-bottom: 0; width: 58%; }

/* ---------------------------------------------------------------- 提示条 */
.tip {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius);
  background: var(--info-soft);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.tip svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: var(--info); }
.tip strong { color: var(--ink-1); }

.tip--warn { background: var(--warn-soft); }
.tip--warn svg { color: var(--warn); }
.tip--danger { background: var(--danger-soft); }
.tip--danger svg { color: var(--danger); }

/* ---------------------------------------------------------------- Toast */
.toast-stack {
  position: fixed;
  z-index: 200;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 200px;
  max-width: min(88vw, 440px);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  color: var(--ink-1);
  font-size: 13px;
  pointer-events: auto;
  animation: toastIn .2s var(--ease);
}

.toast svg { width: 16px; height: 16px; flex: 0 0 auto; }
.toast--ok svg { color: var(--ok); }
.toast--error svg { color: var(--danger); }
.toast--warn svg { color: var(--warn); }
.toast--info svg { color: var(--info); }
.toast.is-out { animation: toastOut .16s var(--ease) forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-4px); }
}

/* ---------------------------------------------------------------- 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 22, 38, .44);
  animation: fadeIn .16s var(--ease);
}

.overlay--drawer { place-items: stretch; justify-items: end; padding: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(20px); opacity: .7; } to { transform: none; opacity: 1; } }

.modal {
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .18s var(--ease);
}

.modal--sm { width: min(420px, 100%); }
.modal--lg { width: min(760px, 100%); }

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

.modal__title { font-size: 14.5px; font-weight: 600; }
.modal__close { margin-left: auto; }
.modal__body { padding: 16px 18px; overflow-y: auto; flex: 1 1 auto; }

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.drawer {
  width: min(520px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: slideIn .18s var(--ease);
}

/* ---------------------------------------------------------------- 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

.pager__btns { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- 键值行 */
.kv { display: grid; }

.kv__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.kv__row:last-child { border-bottom: 0; }
.kv__k { color: var(--ink-3); min-width: 92px; flex: 0 0 auto; }
.kv__v { color: var(--ink-1); font-weight: 500; }

/* ---------------------------------------------------------------- 页内 Tab */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
  overflow-x: auto;
}

.tabs__btn {
  position: relative;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .14s var(--ease);
}

.tabs__btn::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background .14s var(--ease);
}

.tabs__btn:hover { color: var(--ink-1); }

.tabs__btn.is-active { color: var(--brand); font-weight: 600; }
.tabs__btn.is-active::after { background: var(--brand); }

.tabs__count {
  margin-left: 5px;
  font-size: 11px;
  color: inherit;
  opacity: .7;
}

/* 流水页顶部的收支合计条 */
.totals {
  display: flex;
  gap: 28px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.totals:empty { display: none; }
.totals__item { display: flex; align-items: baseline; gap: 8px; }
.totals__k { font-size: 12px; color: var(--ink-3); }
.totals__v { font-size: 14px; font-weight: 600; color: var(--ink-1); }

/* ---------------------------------------------------------------- 金额选项 */
.amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 12px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}

.amount:hover { border-color: var(--ink-4); }

.amount.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.amount__value { font-size: 16px; font-weight: 600; letter-spacing: -.02em; color: var(--ink-1); }
.amount.is-active .amount__value { color: var(--brand); }
.amount__unit { font-size: 11px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 品类卡 */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }

.cat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease), transform .14s var(--ease);
}

.cat:hover { border-color: var(--brand-line); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.cat__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 2px;
}
.cat__icon svg { width: 17px; height: 17px; }

.cat__name { font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.cat__desc { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.cat__meta { margin-top: 2px; font-size: 11.5px; color: var(--ink-4); }

/* ---------------------------------------------------------------- 密钥行 */
.keyrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.keyrow:last-child { border-bottom: 0; }

.keyrow__name { font-size: 13px; font-weight: 600; color: var(--ink-1); }
.keyrow__sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.keyrow__secret {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface-3);
  padding: 4px 8px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- 推介 */
.refbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.refbox__url {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refcode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px dashed var(--brand-line);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: .04em;
}

/* ---------------------------------------------------------------- 富文本正文 */
.doc { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.doc > *:first-child { margin-top: 0; }
.doc h1, .doc h2, .doc h3, .doc h4 {
  color: var(--ink-1);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.45;
  margin: 22px 0 8px;
}
.doc h1 { font-size: 19px; }
.doc h2 { font-size: 16.5px; }
.doc h3 { font-size: 14.5px; }
.doc h4 { font-size: 13.5px; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; list-style: revert; }
.doc li { margin-bottom: 5px; }
.doc strong { color: var(--ink-1); font-weight: 600; }
.doc a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.doc code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--ink-1);
}
.doc pre {
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.doc pre code { background: none; padding: 0; }
.doc blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 2px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
}
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.doc th { background: var(--surface-2); font-weight: 600; color: var(--ink-1); }
.doc img { border-radius: 8px; margin: 0 0 12px; }

/* ---------------------------------------------------------------- 帮助分类 */
.catlist { display: flex; flex-direction: column; gap: 2px; }

.catlist__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease);
}

.catlist__item:hover { background: var(--surface-3); color: var(--ink-1); }

.catlist__item.is-active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
  font-weight: 600;
}

.catlist__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catlist__count { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.catlist__item.is-active .catlist__count { color: var(--brand); }

/* 可点击的文档行 */
tr[data-article] { cursor: pointer; }

/* ---------------------------------------------------------------- 步骤引导 */
.steps { display: grid; gap: 10px; margin-top: 16px; }

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.step__no {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  flex: 0 0 auto;
  margin-top: 1px;
}

.step__title { font-size: 12.5px; font-weight: 600; color: var(--ink-1); }
.step__text { font-size: 12px; color: var(--ink-3); line-height: 1.6; }

/* ---------------------------------------------------------------- 快捷入口 */
.quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.quick__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  transition: background .14s var(--ease), border-color .14s var(--ease), color .14s var(--ease);
}

.quick__item svg { width: 15px; height: 15px; color: var(--ink-3); }
.quick__item:hover {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}
.quick__item:hover svg { color: var(--brand); }

/* ---------------------------------------------------------------- 商品与购买 */
.prodlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 12px;
}

.prod {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}

.prod:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.prod.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent);
}

.prod[disabled] { opacity: .6; cursor: not-allowed; }

.prod__top { display: flex; align-items: flex-start; gap: 10px; }

.prod__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex: 0 0 auto;
}
.prod__icon svg { width: 17px; height: 17px; }

.prod__name { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.prod__code { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.prod__desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; min-height: 33px; }
.prod__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.prod__stock { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }

.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }

.plan {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}

.plan:hover { border-color: var(--ink-4); }

.plan.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.plan__label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.plan__price { margin-top: 2px; font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; color: var(--ink-1); }
.plan.is-active .plan__label { color: var(--brand); }
.plan.is-active .plan__price { color: var(--brand); }
.plan__setup { margin-top: 1px; font-size: 11px; color: var(--warn); }

.quote {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.quote__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}

.quote__row:last-child { border-bottom: 0; }
.quote__row span:last-child { margin-left: auto; }

.quote__row--total {
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
}

.quote__row--total span:last-child {
  font-size: 17px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: -.02em;
}

/* ---------------------------------------------------------------- 工单对话 */
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; }
.msg--staff { flex-direction: row-reverse; }

.msg__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink-2);
  flex: 0 0 auto;
}

.msg--staff .msg__avatar { background: var(--brand-soft); color: var(--brand); }
.msg__body { max-width: min(76%, 620px); }
.msg--staff .msg__body { text-align: right; }
.msg__meta { font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; }

.msg__bubble {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--ink-1);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.msg--staff .msg__bubble { background: var(--brand-soft); }

.deptlist { display: grid; gap: 8px; }

.dept {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}

.dept:hover { border-color: var(--line-strong); }
.dept.is-active { border-color: var(--brand); background: var(--brand-soft); }
.dept.is-disabled { opacity: .62; cursor: not-allowed; background: var(--surface-2); }

.dept__radio {
  width: 14px; height: 14px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex: 0 0 auto;
}

.dept.is-active .dept__radio { border: 4px solid var(--brand); }
.dept__name { display: block; font-size: 13px; font-weight: 500; color: var(--ink-1); }
.dept__desc { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.dept__req { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 安心态 */
/* 没有待处理事项时给一句话结论，而不是一张占半屏的空态卡 */
.calm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--ok) 22%, transparent);
  border-radius: var(--radius-sm);
  background: var(--ok-soft);
}

.calm__icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--ok);
  flex: 0 0 auto;
}

.calm__icon svg { width: 17px; height: 17px; }
.calm__title { font-size: 13px; font-weight: 600; color: var(--ok); }
.calm__text { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }

/* ---------------------------------------------------------------- 到期提醒 */
.expiry { display: grid; gap: 8px; }

.expiry__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
}

.expiry__row.is-warn { background: var(--warn-soft); border-color: transparent; }
.expiry__row.is-urgent { background: var(--danger-soft); border-color: transparent; }

.expiry__name { font-weight: 500; color: var(--ink-1); }
.expiry__days { margin-left: auto; font-weight: 600; }
.expiry__row.is-warn .expiry__days { color: var(--warn); }
.expiry__row.is-urgent .expiry__days { color: var(--danger); }

/* ---------------------------------------------------------------- 登录 / 注册 */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; }

.auth__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 48px 52px;
  color: #fff;
  background: linear-gradient(150deg, #111a2e 0%, #16233f 52%, #1b2f52 100%);
  overflow: hidden;
}

/* 细网格：建筑感而非装饰光晕 */
.auth__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 20% 10%, #000 20%, transparent 78%);
  pointer-events: none;
}

.auth__brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.auth__brand .brand__mark { background: rgba(255, 255, 255, .14); box-shadow: none; }
.auth__brandname { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }

/* 主文案与卖点整体居中，避免上半屏出现大片空洞 */
.auth__lead {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 24px 0;
}

.auth__headline {
  position: relative;
  z-index: 1;
  max-width: 13em;
  font-size: 30px;
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: -.025em;
  color: #fff;
}

.auth__headline em { font-style: normal; color: #9dc0e8; }

.auth__points { position: relative; z-index: 1; margin-top: 26px; display: grid; gap: 12px; }
.auth__point { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .78); }
.auth__point svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; color: #9dc0e8; }
.auth__point strong { display: block; color: #fff; font-weight: 600; margin-bottom: 1px; }

.auth__foot { position: relative; z-index: 1; margin-top: 38px; font-size: 11.5px; color: rgba(255, 255, 255, .5); }

.auth__formwrap { display: grid; place-items: center; padding: 40px 28px; background: var(--surface); }
.auth__form { width: min(384px, 100%); }

.auth__tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  margin-bottom: 22px;
}

.auth__tab {
  height: 28px;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.auth__tab.is-active { background: var(--surface); color: var(--ink-1); box-shadow: var(--shadow-xs); }

.auth__title { font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.auth__sub { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.auth__fields { margin-top: 22px; display: grid; gap: 14px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth__switch { margin-top: 20px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth__switch a { font-weight: 500; }
.auth__legal { margin-top: 24px; font-size: 11.5px; color: var(--ink-4); line-height: 1.75; }

/* ---------------------------------------------------------------- 顶栏搜索 */
.topbar__search {
  position: relative;
  flex: 0 1 380px;
  margin-left: 8px;
}

.topbar__search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-1);
  font-size: 13px;
  transition: border-color .14s var(--ease), background .14s var(--ease), box-shadow .14s var(--ease);
}

.topbar__search input::placeholder { color: var(--ink-4); }

.topbar__search input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.topbar__search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-4);
  pointer-events: none;
}

.topbar__search kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-4);
  font-family: var(--font);
  font-size: 10.5px;
  line-height: 1.6;
}

/* 搜索结果下拉 */
.searchpop {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.searchpop__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.searchpop__item:hover,
.searchpop__item.is-active { background: var(--surface-3); color: var(--ink-1); }
.searchpop__item svg { width: 15px; height: 15px; color: var(--ink-4); }
.searchpop__group { padding: 8px 10px 4px; font-size: 11px; color: var(--ink-4); letter-spacing: .04em; }
.searchpop__empty { padding: 16px 10px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* ---------------------------------------------------------------- 欢迎区 */
.welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.welcome__title { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.welcome__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------------------------------------------------------------- 资产 + 横幅 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  margin-bottom: 16px;
}

.assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.asset {
  position: relative;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.asset__label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.asset__label svg { width: 14px; height: 14px; }
.asset__value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: var(--ink-1);
}
.asset__value small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.asset__foot { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.asset--brand { border-color: var(--brand-line); background: var(--brand-soft); }
.asset--brand .asset__label { color: var(--brand); }
.asset--brand .asset__value { color: var(--brand); }

.asset__actions { display: flex; gap: 6px; margin-top: 10px; }

/* 购买引导横幅 */
.banner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, #1e40af 0%, #2962ff 58%, #3b82f6 100%);
  overflow: hidden;
}

.banner::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .3), transparent 68%);
  pointer-events: none;
}

.banner__kicker { font-size: 11.5px; color: rgba(255, 255, 255, .72); letter-spacing: .06em; }
.banner__title { position: relative; z-index: 1; margin-top: 4px; font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.banner__text { position: relative; z-index: 1; margin-top: 5px; font-size: 12.5px; line-height: 1.65; color: rgba(255, 255, 255, .8); }
.banner__foot { position: relative; z-index: 1; margin-top: 14px; }

.banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #1e40af;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.banner__btn:hover { background: #eef3ff; }
.banner__btn svg { width: 14px; height: 14px; }

/* 迷你插画 */
.banner__art { position: absolute; right: 12px; top: 12px; width: 66px; opacity: .92; }

/* ---------------------------------------------------------------- 迷你统计 */
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: left;
  cursor: pointer;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}

.mini:hover { border-color: var(--brand-line); box-shadow: var(--shadow-sm); }

.mini__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--brand-soft);
  color: var(--brand);
}

.mini__icon svg { width: 18px; height: 18px; }
.mini__icon--ok { background: var(--ok-soft); color: var(--ok); }
.mini__icon--warn { background: var(--warn-soft); color: var(--warn); }
.mini__icon--danger { background: var(--danger-soft); color: var(--danger); }
.mini__icon--info { background: var(--info-soft); color: var(--info); }

.mini__label { font-size: 12.5px; color: var(--ink-3); }
.mini__value { font-size: 19px; font-weight: 650; letter-spacing: -.02em; color: var(--ink-1); line-height: 1.3; }
.mini__value small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* ---------------------------------------------------------------- 待办清单 */
.todo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.todo:last-child { border-bottom: 0; }
.todo__icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; background: var(--warn-soft); color: var(--warn); }
.todo__icon svg { width: 15px; height: 15px; }
.todo__title { font-size: 13px; font-weight: 500; color: var(--ink-1); }
.todo__text { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.todo__action { margin-left: auto; flex: 0 0 auto; }

/* ---------------------------------------------------------------- 消息列表 */
.msgs { display: flex; flex-direction: column; }

.msg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.msg-item:last-child { border-bottom: 0; }
.msg-item__tag { flex: 0 0 auto; }
.msg-item__title { flex: 1 1 auto; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item__time { flex: 0 0 auto; font-size: 11.5px; color: var(--ink-4); }

/* ---------------------------------------------------------------- 插画空态 */
.emptyart {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 34px 20px;
  text-align: center;
}

.emptyart__art { width: 108px; margin-bottom: 8px; opacity: .95; }
.emptyart__title { font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.emptyart__text { font-size: 12.5px; color: var(--ink-3); max-width: 320px; line-height: 1.7; }
.emptyart__action { margin-top: 12px; }

/* ---------------------------------------------------------------- 让利滑块 */
.split { display: grid; gap: 10px; }

.split__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.split__title { font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.split__hint { font-size: 12px; color: var(--ink-3); }

.split__bar {
  position: relative;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.split__fill-a { position: absolute; left: 0; top: 0; bottom: 0; background: var(--danger); transition: width .12s var(--ease); }
.split__fill-b { position: absolute; right: 0; top: 0; bottom: 0; background: var(--brand); transition: width .12s var(--ease); }

.split__range { width: 100%; accent-color: var(--brand); }

.split__legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.split__legend b { font-variant-numeric: tabular-nums; }
.split__legend span { display: inline-flex; align-items: center; gap: 5px; }
.split__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- 图表 */
.chart { display: grid; gap: 10px; }

.chart__summary { display: flex; flex-wrap: wrap; gap: 10px; }
.chart__summary-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.chart__summary-k { font-size: 12px; color: var(--ink-3); }
.chart__summary-v { font-size: 14px; font-weight: 650; color: var(--ink-1); }

.chart__legend { display: flex; gap: 16px; flex-wrap: wrap; }
.chart__legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.chart__swatch { width: 8px; height: 8px; border-radius: 2px; }

.chart__plot {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-bottom: 1px solid var(--line);
}

.chart__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; height: 100%; }

.chart__bars {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-height: 0;
}

.chart__bar {
  width: 100%;
  max-width: 22px;
  border-radius: 4px 4px 0 0;
  min-height: 0;
  transition: height .25s var(--ease);
}

.chart__label {
  flex: 0 0 auto;
  padding: 7px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-4);
  white-space: nowrap;
}

.chart-empty {
  padding: 26px 12px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* 占比条 */
.dist { display: grid; gap: 12px; }
.dist__row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 76px; align-items: center; gap: 10px; }
.dist__label { font-size: 12.5px; color: var(--ink-2); }
.dist__track { height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.dist__track i { display: block; height: 100%; border-radius: var(--radius-pill); transition: width .25s var(--ease); }
.dist__value { text-align: right; font-size: 13px; font-weight: 600; color: var(--ink-1); }
.dist__value small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* 漏斗 */
.funnel { display: grid; gap: 12px; }
.funnel__row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 52px; align-items: center; gap: 12px; }
.funnel__meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.funnel__name { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.funnel__value { font-size: 14px; font-weight: 650; color: var(--ink-1); }
.funnel__value small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.funnel__track { height: 12px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.funnel__fill { display: block; height: 100%; border-radius: var(--radius-pill); transition: width .3s var(--ease); }
.funnel__rate { text-align: right; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 排行 */
.rank { display: grid; gap: 10px; }
.rank__row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 74px; align-items: center; gap: 10px; }
.rank__no {
  width: 20px; height: 20px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  background: var(--surface-3); color: var(--ink-3);
}
.rank__no.is-top { background: var(--brand-soft); color: var(--brand); }
.rank__body { min-width: 0; display: grid; gap: 5px; }
.rank__label { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__track { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.rank__track i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--brand); opacity: .75; }
.rank__value { text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink-1); }
.rank__value small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* ---------------------------------------------------------------- 响应式 */
.side-toggle { display: none; }
.scrim { display: none; }

@media (max-width: 1180px) {
  .content { padding: 20px 20px 48px; }
  .topbar { padding: 10px 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-9, .col-8, .col-7 { grid-column: span 12; }
  .col-6, .col-5, .col-4, .col-3 { grid-column: span 6; }

  .hero { grid-template-columns: minmax(0, 1fr); }
  .banner { flex-direction: row; align-items: center; gap: 16px; }
  .banner__foot { margin-top: 0; flex: 0 0 auto; }
  .banner__art { display: none; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .side {
    position: fixed;
    inset: 0 auto 0 0;
    /* 移动端抽屉比桌面窄一点，但字仍按放大后的规格走，否则抽屉里反而更挤 */
    width: 284px;
    transform: translateX(-102%);
    transition: transform .2s var(--ease);
    box-shadow: var(--shadow-lg);
  }

  .side.is-open { transform: none; }
  .side-toggle { display: grid; }

  .scrim.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(12, 22, 38, .42);
  }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__panel { padding: 28px 24px 30px; min-height: 200px; }
  .auth__headline { font-size: 23px; margin-top: 20px; }
  .auth__points, .auth__foot { display: none; }
}

@media (max-width: 720px) {
  .content { padding: 16px 14px 44px; }
  .topbar { padding: 9px 14px; gap: 8px; min-height: 54px; }
  .topbar__title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__sub { display: none; }

  /* 窄屏顶栏塞不下页面操作：交给侧栏与内容区，别把标题挤到换行 */
  .topbar > div:first-of-type { min-width: 0; }
  .topbar [data-page-actions],
  .topbar [data-refresh] { display: none; }

  .stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .grid { gap: 12px; }
  .col-6, .col-5, .col-4, .col-3 { grid-column: span 12; }

  .assets { grid-template-columns: minmax(0, 1fr); }
  .asset__value { font-size: 23px; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { padding: 12px; gap: 10px; }
  .mini__icon { width: 34px; height: 34px; }
  .mini__value { font-size: 17px; }
  .welcome__title { font-size: 17px; }

  /* 顶栏搜索在窄屏收起，避免把标题挤掉 */
  .topbar__search { display: none; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field--span2 { grid-column: span 1; }

  .card__head { padding: 12px 14px; flex-wrap: wrap; }
  .card__body { padding: 14px; }
  .card--pad { padding: 14px; }

  .table th, .table td { padding: 10px 12px; }
  .stat { padding: 13px 14px; }
  .stat__value { font-size: 19px; }

  .modal { max-height: 92vh; }
  .drawer { width: 100%; }
  .overlay { padding: 12px; }

  .msg__body { max-width: 84%; }
  .auth__formwrap { padding: 26px 18px 40px; }
}

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