/* ==================================================================
 * 飞牛 · PC 端设计系统 v2
 * ------------------------------------------------------------------
 * 设计语言：企业级控制台（桌面端）
 *
 *   · 骨架      浅灰底 + 白色卡片 + 1px 描边，不用投影、不用渐变
 *   · 中性色    冷静的灰阶（标题深、正文中、辅助浅），彩色只用于语义
 *   · 圆角      2 / 4 / 6 / 8 四档，控件用小圆角，卡片不超过 8px
 *   · 字号      12 / 13 / 14 / 16 / 20 / 24 六档，取消半像素字号
 *   · 间距      4 / 8 / 12 / 16 / 20 / 24 / 32，8 点栅格
 *   · 投影      仅浮层（弹窗 / 下拉 / 抽屉）使用，内容区一律无投影
 *   · 品牌色    沿用平台蓝 #1677ff，与小程序 / H5 视觉统一
 *
 * 零外部依赖：不加载任何 CDN 或第三方库，字体走系统字体栈。
 * ================================================================== */

/* ==================================================================
 *  一、设计令牌
 * ================================================================== */
:root {
  /* ---------- 品牌 ---------- */
  --brand: #1677ff;
  --brand-hover: #4096ff;
  --brand-active: #0958d9;
  --brand-soft: #e8f2ff;      /* 浅底（标签、图标底） */
  --brand-soft-2: #f2f8ff;    /* 更浅底（hover 背景） */
  --brand-line: #bcdcff;      /* 浅描边 */

  /* ---------- 中性灰阶 ---------- */
  --t1: #1d2129;              /* 标题 / 主要文字 */
  --t2: #4e5969;              /* 正文 */
  --t3: #86909c;              /* 次要说明 */
  --t4: #c9cdd4;              /* 占位 / 禁用 */

  --bg: #f5f6f7;              /* 页面底色 */
  --card: #ffffff;
  --line: #e5e6eb;            /* 主分隔线、卡片描边 */
  --line-2: #f2f3f5;          /* 次分隔线（表格行、列表行） */
  --fill: #f7f8fa;            /* 浅填充块 */
  --fill-2: #f2f3f5;          /* 深一档填充 */
  --hover: #fafbfc;           /* 行 hover */

  /* ---------- 语义色（浅底 + 深字） ---------- */
  --success: #00a63e;
  --success-soft: #e8fff0;
  --warning: #d97706;
  --warning-soft: #fff7e8;
  --danger: #e5484d;
  --danger-soft: #ffece8;
  --info: #1677ff;
  --info-soft: #e8f2ff;
  --purple: #6d28d9;
  --purple-soft: #f5edff;

  /* ---------- 圆角（克制，最多 8px） ---------- */
  --r-xs: 2px;
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --r-pill: 999px;

  /* ---------- 投影（仅浮层） ---------- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .03);
  --shadow-pop: 0 6px 20px -6px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-mask: 0 24px 64px -24px rgba(0, 0, 0, .28);

  /* ---------- 字号 ---------- */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 24px;

  /* ---------- 尺寸 ---------- */
  --sidebar-w: 236px;
  --sidebar-w-min: 64px;
  --topbar-h: 56px;
  --control-h: 32px;          /* 标准控件高度 */
  --control-h-lg: 36px;
}

* { box-sizing: border-box; }

/* 关键：[hidden] 必须压过下面所有 display:flex/grid 规则，
   否则弹窗/遮罩会出现「关不掉、一直挡住点击」的问题 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--t2);
  font-size: var(--fs);
  line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button { font: inherit; }
h1, h2, h3, h4, h5 { margin: 0; color: var(--t1); font-weight: 600; line-height: 1.4; }
p { margin: 0; }
/* 数字统一等宽，避免表格与金额跳动 */
.num, .price, .stat-card__value, .kv__v, .item-row__sum,
table td, .pager__info, .rank-item__need { font-variant-numeric: tabular-nums; }

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

::selection { background: rgba(22, 119, 255, .14); }

/* ==================================================================
 *  二、整体布局
 * ================================================================== */
.layout { display: flex; min-height: 100vh; }

/* ---------------- 侧边栏（深色导航，保持原有观感） ---------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0e1a2b 0%, #16253d 100%);
  color: #a9b7cc;
  transition: width .22s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}
.sidebar::after {
  /* 右侧发丝高光，让深色侧栏与亮色内容区过渡更干净 */
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-h);
  flex: none;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.sidebar__logo {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, #2b8cff, #1677ff 60%, #0a5fd8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs);
  letter-spacing: -.5px;
  background-size: cover;
  background-position: center;
}
.sidebar__brand-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar__brand-text strong {
  color: #fff;
  font-size: var(--fs);
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.sidebar__brand-text em {
  font-style: normal;
  font-size: 11px;
  color: rgba(169, 183, 204, .75);
  white-space: nowrap;
  letter-spacing: .2px;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px 16px;
}
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border: 0; }

.nav-group { margin-bottom: 2px; }
.nav-group__title {
  padding: 14px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: rgba(169, 183, 204, .58);
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  margin: 1px 0;
  border-radius: var(--r);
  color: #a9b7cc;
  font-size: var(--fs-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #e8eefb; }
.nav-item.is-active {
  background: rgba(22, 119, 255, .22);
  color: #fff;
  font-weight: 600;
}
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #3d95ff;
}
.nav-item__icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .92;
}
.nav-item__icon svg { width: 18px; height: 18px; }
.nav-item.is-active .nav-item__icon { opacity: 1; }
.nav-item__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item__badge {
  flex: none;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: rgba(61, 149, 255, .22);
  color: #8dc0ff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
.nav-item.is-active .nav-item__badge { background: rgba(255,255,255,.18); color: #fff; }

.sidebar__foot {
  flex: none;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11px;
  color: rgba(169, 183, 204, .55);
  line-height: 1.7;
  white-space: nowrap;
}

/* 收起态 */
.layout.is-collapsed .sidebar { width: var(--sidebar-w-min); }
.layout.is-collapsed .sidebar__brand { padding: 0 16px; }
.layout.is-collapsed .sidebar__brand-text,
.layout.is-collapsed .nav-group__title,
.layout.is-collapsed .nav-item__label,
.layout.is-collapsed .nav-item__badge,
.layout.is-collapsed .sidebar__foot { display: none; }
.layout.is-collapsed .sidebar__nav { padding: 10px; }
.layout.is-collapsed .nav-item { justify-content: center; padding: 0; }
.layout.is-collapsed .nav-group { margin-bottom: 4px; }

.sidebar-mask {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, .45);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  transition: margin-left .22s cubic-bezier(.4, 0, .2, 1);
}
.layout.is-collapsed .main { margin-left: var(--sidebar-w-min); }

/* ==================================================================
 *  三、顶栏
 * ------------------------------------------------------------------
 *  扁平白底 + 1px 下边线，不使用毛玻璃与投影，滚动时也不浮起。
 * ================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  flex: none;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar__toggle {
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--t3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.topbar__toggle:hover { background: var(--fill); color: var(--t1); }
.topbar__toggle svg { width: 16px; height: 16px; }

.topbar__crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.topbar__title { font-size: var(--fs-lg); font-weight: 600; color: var(--t1); }
.topbar__crumb .crumb-sep { color: var(--t4); }
.topbar__crumb .crumb-sub { font-size: var(--fs-sm); color: var(--t3); }

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.topbar__search {
  display: flex;
  align-items: center;
  height: var(--control-h);
  width: 260px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--fill);
  overflow: hidden;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.topbar__search:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .10);
}
.topbar__search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: var(--fs-sm);
  color: var(--t1);
}
.topbar__search input::placeholder { color: var(--t4); }
.topbar__search-btn {
  flex: none;
  height: 100%;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--t3);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.topbar__search-btn:hover { color: var(--brand); }

.icon-btn {
  position: relative;
  width: var(--control-h);
  height: var(--control-h);
  flex: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--t3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { color: var(--t1); background: var(--fill); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px #fff;
}

.user-menu { position: relative; }
.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h-lg);
  padding: 0 8px 0 4px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  transition: background .15s;
}
.user-menu__trigger:hover { background: var(--fill); }
.user-menu__avatar {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
}
.user-menu__name { font-size: var(--fs-sm); color: var(--t1); font-weight: 500; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__caret { width: 12px; height: 12px; color: var(--t4); }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  min-width: 208px;
  padding: 4px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropdown__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
}
.dropdown__head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); }
.dropdown__head strong { display: block; font-size: var(--fs-sm); color: var(--t1); }
.dropdown__head span { font-size: var(--fs-xs); color: var(--t3); }
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--t2);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.dropdown__item:hover { background: var(--fill); color: var(--t1); }
.dropdown__item svg { width: 15px; height: 15px; opacity: .7; }
.dropdown__item.is-danger { color: var(--danger); }
.dropdown__item.is-danger:hover { background: var(--danger-soft); }
.dropdown__sep { height: 1px; background: var(--line-2); margin: 4px 0; }

/* ==================================================================
 *  四、内容区骨架
 * ================================================================== */
.content {
  flex: 1;
  min-width: 0;
  padding: 20px 20px 32px;
}
/* 整页铺满：路由声明 full:true 时去掉内容区内边距 */
.content--full { padding: 0; }

.page { max-width: 1440px; margin: 0 auto; }
/* 页面切换只做极轻的淡入，避免花哨动效 */
.page { animation: fadeIn .18s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.page-loading { display: flex; align-items: center; justify-content: center; padding: 96px 0; }

.site-foot {
  flex: none;
  padding: 16px 20px 24px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--t4);
  line-height: 1.9;
}
.site-foot a { color: var(--t3); }
.site-foot a:hover { color: var(--brand); }
.site-foot__links { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.site-foot__sep { color: var(--line); }

/* ---------------- 页头 ---------------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-head__main { min-width: 0; flex: 1; }
.page-head__title {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.2px;
}
.page-head__desc {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--t3);
  line-height: 1.7;
}
.page-head__actions { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; }

/* ---------------- 区块 ---------------- */
.section { margin-top: 20px; }
.section:first-child { margin-top: 0; }
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--t1);
}
.section__sub { font-size: var(--fs-xs); font-weight: 400; color: var(--t3); }
.section__more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-sm);
  color: var(--t3);
  cursor: pointer;
}
.section__more:hover { color: var(--brand); }
.section__more svg { width: 13px; height: 13px; }

/* ---------------- 卡片 ---------------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}
.card:last-child { margin-bottom: 0; }
/* 贴边卡片：内容自己带内边距（表格、列表行） */
.card--flush { padding: 0; overflow: hidden; }
.card--tight { padding: 12px; }
.card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs);
  font-weight: 600;
  color: var(--t1);
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.card__desc { margin-top: 4px; font-size: var(--fs-sm); color: var(--t3); }

/* ---------------- 栅格 ---------------- */
/* .grid 本身只负责间距；列数由 .grid-N / .grid-aside 或内联模板决定 */
.grid { display: grid; gap: 12px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.col-span-2 { grid-column: span 2; }

/* ==================================================================
 *  五、按钮
 * ================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--t2);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { border-color: #d0d3d9; color: var(--t1); background: var(--hover); }
.btn:active { background: var(--fill-2); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }

.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); color: #fff; }
.btn-primary:active { border-color: var(--brand-active); background: var(--brand-active); }

.btn-default { /* 默认即描边按钮，保留类名以兼容既有页面 */ }

.btn-soft {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}
.btn-soft:hover { border-color: transparent; background: #d9ebff; color: var(--brand-active); }

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--t2);
}
.btn-ghost:hover { background: var(--fill); color: var(--t1); }

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

.btn-link {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
}
.btn-link:hover { background: transparent; color: var(--brand-hover); }

.btn-lg { height: var(--control-h-lg); padding: 0 16px; font-size: var(--fs); }
.btn-sm { height: 26px; padding: 0 9px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-sm svg { width: 13px; height: 13px; }
.btn-block { display: flex; width: 100%; }

.btn:disabled, .btn.is-disabled {
  border-color: var(--line);
  background: var(--fill);
  color: var(--t4);
  cursor: not-allowed;
}
.btn:disabled:hover, .btn.is-disabled:hover { background: var(--fill); color: var(--t4); border-color: var(--line); }
.btn-primary:disabled, .btn-primary.is-disabled {
  border-color: var(--line);
  background: var(--fill);
  color: var(--t4);
}

/* ==================================================================
 *  六、标签 / 徽标
 * ================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-sm);
  background: var(--fill-2);
  color: var(--t3);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.tag svg { width: 12px; height: 12px; }
.tag--brand { background: var(--brand-soft); color: var(--brand); }
.tag--success { background: var(--success-soft); color: var(--success); }
.tag--warning { background: var(--warning-soft); color: var(--warning); }
.tag--danger { background: var(--danger-soft); color: var(--danger); }
.tag--purple { background: var(--purple-soft); color: var(--purple); }
.tag--outline {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--t2);
}

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.badge-dot.is-on { background: var(--brand); }

/* ==================================================================
 *  七、文本与间距工具类
 * ================================================================== */
.strong { color: var(--t1); font-weight: 600; }
.weak { color: var(--t3); }
.faint { color: var(--t4); }
.muted { color: var(--t3); }

.price { color: var(--t1); font-weight: 600; }
.num { font-weight: 500; color: var(--t1); }

.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.right { text-align: right; }
.left { text-align: left; }
.center { text-align: center; }
.vmid { vertical-align: middle; }
.min-h-34 { min-height: 34px; }
.border-b-dash { border-bottom: 1px dashed var(--line); }
.spacer { flex: 1; }

.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.ml-4 { margin-left: 4px; }
.ml-6 { margin-left: 6px; }
.ml-8 { margin-left: 8px; }
.ml-10 { margin-left: 10px; }
.mr-4 { margin-right: 4px; }
.mr-6 { margin-right: 6px; }
.mr-8 { margin-right: 8px; }
.m-0 { margin: 0; }
.p-0 { padding: 0; }

/* ---------------- 布局工具类（替代页面内联 flex 写法） ---------------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.flex-none { flex: none; }
.ml-auto { margin-left: auto; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.h-40 { height: 40px; }
.border-0 { border: 0; }
.border-t { border-top: 1px solid var(--line); }
.border-b { border-bottom: 1px solid var(--line); }
.border-b-2 { border-bottom: 1px solid var(--line-2); }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.pre-wrap { white-space: pre-wrap; }
.sticky { position: sticky; }
.relative { position: relative; }
.pt-8 { padding-top: 8px; }
.pt-12 { padding-top: 12px; }
.pt-16 { padding-top: 16px; }
.py-9 { padding-top: 9px; padding-bottom: 9px; }
.py-10 { padding-top: 10px; padding-bottom: 10px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.my-20 { margin-top: 20px; margin-bottom: 20px; }
.mb-14 { margin-bottom: 14px; }
.no-shadow { box-shadow: none; }
.t2-text { color: var(--t2); }
.mb-18 { margin-bottom: 18px; }
.fs-18 { font-size: 18px; }
.fs-22 { font-size: 22px; }
.lh-16 { line-height: 1.6; }
.lh-20 { line-height: 2; }
.radius-lg { border-radius: var(--r-lg); }
/* 内容 + 右侧栏 两列布局 */
.grid-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* ---------------- 文字工具类 ---------------- */
.fs-11 { font-size: 11px; }
.fs-12 { font-size: var(--fs-xs); }
.fs-13 { font-size: var(--fs-sm); }
.fs-14 { font-size: var(--fs); }
.fs-15 { font-size: 15px; }
.fs-16 { font-size: var(--fs-lg); }
.fs-20 { font-size: var(--fs-xl); }
.lh-17 { line-height: 1.7; }
.lh-18 { line-height: 1.8; }
.lh-19 { line-height: 1.9; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.brand-text { color: var(--brand); }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }
.warning-text { color: var(--warning); }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }

/* ---------------- 容器宽度 ---------------- */
.narrow { max-width: 900px; margin-left: auto; margin-right: auto; }
.narrow-sm { max-width: 760px; margin-left: auto; margin-right: auto; }
.narrow-lg { max-width: 1120px; margin-left: auto; margin-right: auto; }

/* ---------------- 细分隔行（列表项前的信息行） ---------------- */
.row-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}
.row-line:last-child { border-bottom: 0; }

/* ---------------- 轻量图标底（列表左侧方形图标） ---------------- */
.icon-box {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r);
  background: var(--fill);
  color: var(--t3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-box--brand { background: var(--brand-soft); color: var(--brand); }
.icon-box--lg { width: 40px; height: 40px; }

/* ---------------- 媒体占位（无封面时的统一底） ---------------- */
.cover-blank {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t4);
  background: var(--fill);
}
.thumb-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--fill);
  color: var(--t4);
}
.thumb-blank--4x3 { aspect-ratio: 4 / 3; }
.thumb-blank--21x9 { aspect-ratio: 21 / 9; }
.thumb-blank--1x1 { aspect-ratio: 1 / 1; }

.media-card__flag--hot { background: rgba(229, 72, 77, .92); }

/* ---------------- 状态卡片 ---------------- */
.card--warning { background: var(--warning-soft); border-color: #f7e3bd; }
.card--brand { background: var(--brand-soft-2); border-color: var(--brand-line); }

/* 未读 / 高亮行 */
.list-row--unread { background: var(--brand-soft-2); }
.list-row--unread:hover { background: #eaf4ff; }

/* 深色块上的文字（hero / user-hero / quote-hero 内部使用） */
.on-dark { color: #fff; }
.on-dark-sub { color: rgba(255, 255, 255, .68); }
.on-dark .progress { background: rgba(255, 255, 255, .18); }
.on-dark .progress__bar { background: #fff; }

/* 消息行 */
.msg-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .15s;
}
.msg-row:last-child { border-bottom: 0; }
.msg-row:hover { background: var(--hover); }
.msg-row--unread { background: var(--brand-soft-2); }
.msg-row--unread:hover { background: #eaf4ff; }

/* 预览态纸张（合同在线预览等，不需要外框） */
.paper--plain { border: 0; padding: 0; border-radius: 0; }

/* ---------------- 登录/注册页（居中卡片，扁平化） ---------------- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-h) - 96px);
  padding: 24px 0;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
}
.auth-card--wide { max-width: 460px; }
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-brand__logo {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r);
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-lg);
  background-size: cover;
  background-position: center;
}
.auth-brand__name { display: block; font-size: var(--fs); font-weight: 600; color: var(--t1); line-height: 1.4; }
.auth-brand__sub { display: block; font-size: var(--fs-xs); color: var(--t3); margin-top: 2px; }
.auth-title { font-size: var(--fs-xl); font-weight: 600; color: var(--t1); }
.auth-desc { margin-top: 6px; font-size: var(--fs-sm); color: var(--t3); line-height: 1.7; }
.auth-form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: var(--fs-sm);
  color: var(--t3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.auth-points {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-point {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm);
  color: var(--t3);
}
.auth-point svg { color: var(--brand); flex: none; }

/* ==================================================================
 *  八、表单控件
 * ================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
  font-size: var(--fs-sm);
  color: var(--t2);
  font-weight: 500;
}
.field__label .req { color: var(--danger); margin-left: 3px; }
.field__hint { font-size: var(--fs-xs); color: var(--t3); line-height: 1.6; }

.input, .select, .textarea {
  width: 100%;
  height: var(--control-h);
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--t1);
  font-size: var(--fs-sm);
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--t4); }
.input:hover, .select:hover, .textarea:hover { border-color: #d0d3d9; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .10);
}
.input:disabled, .select:disabled, .textarea:disabled,
.input[readonly], .textarea[readonly] {
  background: var(--fill);
  color: var(--t3);
  cursor: default;
}
.textarea {
  height: auto;
  min-height: 84px;
  padding: 8px 10px;
  line-height: 1.65;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
input[type="search"]::-webkit-search-cancel-button { appearance: none; }

.input-group { display: flex; align-items: stretch; gap: 8px; }
.input-group > .input, .input-group > .select { flex: 1; }

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--t2);
  cursor: pointer;
  user-select: none;
}
.inline-check input[type="checkbox"], .inline-check input[type="radio"] {
  width: 14px; height: 14px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid > .col-span-2 { grid-column: span 2; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--line-2);
}

/* 选择卡片（认证场景、练习选项等） */
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.check-card:hover { border-color: var(--brand-line); background: var(--hover); }
.check-card.is-active, .check-card.is-on { border-color: var(--brand); background: var(--brand-soft-2); }
.check-card.is-disabled { background: var(--fill); color: var(--t3); cursor: not-allowed; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.check-row:last-child { border-bottom: 0; }

/* 开关行 */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.switch-row__t { font-size: var(--fs-sm); color: var(--t1); font-weight: 500; }
.switch-row__d { font-size: var(--fs-xs); color: var(--t3); margin-top: 2px; }
.switch {
  position: relative;
  width: 38px;
  height: 20px;
  flex: none;
  border-radius: var(--r-pill);
  background: #d5d8dd;
  cursor: pointer;
  transition: background .18s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s;
}
.switch.is-on { background: var(--brand); }
.switch.is-on::after { transform: translateX(18px); }

/* ==================================================================
 *  九、筛选条 / 分段 / 标签页
 * ================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
}
.filter-bar__label { font-size: var(--fs-sm); color: var(--t3); flex: none; }
.filter-bar__spacer { flex: 1; }

.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--fill);
  color: var(--t2);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--fill-2); color: var(--t1); }
.chip.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.chip__n { font-size: var(--fs-xs); color: var(--t3); }
.chip.is-active .chip__n { color: var(--brand); }

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--t3);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: color .15s;
}
.tab:hover { color: var(--t1); }
.tab.is-active { color: var(--brand); font-weight: 500; }
.tab.is-active::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
}
.tab__n {
  font-size: var(--fs-xs);
  color: var(--t3);
  background: var(--fill-2);
  padding: 0 6px;
  height: 17px;
  line-height: 17px;
  border-radius: var(--r-sm);
}
.tab.is-active .tab__n { background: var(--brand-soft); color: var(--brand); }

/* ==================================================================
 *  十、表格
 * ================================================================== */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
table.table th {
  padding: 10px 14px;
  background: var(--fill);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--t3);
  text-align: left;
  white-space: nowrap;
}
table.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-sm);
  color: var(--t2);
  vertical-align: middle;
}
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover td { background: var(--hover); }
table.table td.right, table.table th.right { text-align: right; }
table.table td.center, table.table th.center { text-align: center; }
.table-empty { padding: 40px 16px; text-align: center; font-size: var(--fs-sm); color: var(--t3); }

.cell-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 0;
  flex-wrap: wrap;
}
.pager__info { font-size: var(--fs-sm); color: var(--t3); }
.pager__list { display: flex; align-items: center; gap: 4px; }
.pager__btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--t2);
  font-size: var(--fs-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
}
.pager__btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager__btn.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }
.pager__btn:disabled { color: var(--t4); cursor: not-allowed; background: var(--fill); }
.pager__btn svg { width: 13px; height: 13px; }
.pager__gap { padding: 0 2px; color: var(--t4); font-size: var(--fs-sm); }

/* ==================================================================
 *  十一、列表与内容块
 * ================================================================== */
/* 基础列表行（知识库、周报等） */
.list-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .15s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--hover); }
.list-row__icon {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r);
  background: var(--fill);
  color: var(--t3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { font-size: var(--fs); font-weight: 500; color: var(--t1); line-height: 1.55; }
.list-row__desc { margin-top: 3px; font-size: var(--fs-sm); color: var(--t3); line-height: 1.65; }
.list-row__side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--t3);
  padding-top: 3px;
}
.list-row__side > span { display: inline-flex; align-items: center; gap: 4px; }
.list-row__arrow { color: var(--t4); }

/* 明细/订单行 */
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.item-row__index {
  width: 22px; height: 22px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--fill-2);
  color: var(--t3);
  font-size: var(--fs-xs);
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.item-row__fields { flex: 1; display: grid; gap: 8px; grid-template-columns: 1.6fr 1.1fr .7fr .9fr; align-items: center; }
.item-row__sum { flex: none; width: 110px; text-align: right; font-size: var(--fs-sm); font-weight: 600; color: var(--t1); }

/* 订单行（我的订单）：主信息在左、金额与操作在右 */
.item-row--order { align-items: flex-start; padding: 14px 16px; }
.item-row__main { flex: 1; min-width: 0; }
.item-row__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs); }
.item-row__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: var(--fs-xs); color: var(--t3); }
.item-row__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.item-row__side { flex: none; text-align: right; }
.item-row__side .price { font-size: var(--fs-lg); }
.item-row__actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }

/* 键值行 */
.kv {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-sm);
}
.kv:last-child { border-bottom: 0; }
.kv__k { flex: none; width: 96px; color: var(--t3); }
.kv__v { flex: 1; min-width: 0; color: var(--t1); }
.kv--total { border-bottom: 0; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.kv--total .kv__k { color: var(--t2); font-weight: 500; }
.kv--total .kv__v { font-size: var(--fs-xl); font-weight: 600; color: var(--danger); }

/* 汇总块 */
.summary-box { background: var(--fill); border-radius: var(--r-lg); padding: 14px 16px; }
.summary-box .kv { border-bottom: 1px dashed var(--line); }
.summary-box .kv:last-child { border-bottom: 0; }

/* 缩略图行 */
.media-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.media-row:hover { border-color: var(--brand-line); background: var(--hover); }
.media-row__thumb {
  width: 120px;
  height: 76px;
  flex: none;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--fill);
}
.media-row__main { flex: 1; min-width: 0; }
.media-row__title { font-size: var(--fs); font-weight: 500; color: var(--t1); line-height: 1.55; }
.media-row__desc { margin-top: 3px; font-size: var(--fs-sm); color: var(--t3); line-height: 1.6; }
.media-row__meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--t3);
}

/* 封面卡（课程 / 机型 / 专栏） */
.media-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.media-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-1); }
.media-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--fill);
  overflow: hidden;
}
.media-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card__cover--wide { aspect-ratio: 21 / 9; }
.media-card__flag {
  position: absolute;
  left: 8px;
  top: 8px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-sm);
  background: rgba(29, 33, 41, .62);
  color: #fff;
  font-size: var(--fs-xs);
  line-height: 20px;
}
.media-card__flag--free { background: rgba(0, 166, 62, .9); }
.media-card__flag--member { background: rgba(217, 119, 6, .92); }
.media-card__body { flex: 1; display: flex; flex-direction: column; padding: 12px; }
.media-card__title { font-size: var(--fs-sm); font-weight: 500; color: var(--t1); line-height: 1.5; min-height: 39px; }
.media-card__desc { margin-top: 5px; font-size: var(--fs-xs); color: var(--t3); line-height: 1.6; }
.media-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  font-size: var(--fs-xs);
  color: var(--t3);
}
.media-card__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.media-card__meta .price { margin-left: auto; font-size: var(--fs-sm); }

/* 入口宫格 */
.entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.entry:hover { border-color: var(--brand-line); background: var(--hover); }
.entry__icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r);
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.entry__icon img { width: 22px; height: 22px; object-fit: contain; }
.entry__main { min-width: 0; flex: 1; }
.entry__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--t1);
}
.entry__tag {
  height: 17px;
  padding: 0 5px;
  border-radius: var(--r-xs);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  line-height: 17px;
  font-weight: 400;
}
.entry__desc { margin-top: 2px; font-size: var(--fs-xs); color: var(--t3); line-height: 1.5; }

/* 商品卡 */
.goods-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
}
.goods-card:hover { border-color: var(--brand-line); }
.goods-card__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--fill); display: block; }
.goods-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.goods-card__title {
  font-size: var(--fs-xs);
  color: var(--t2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.goods-card__price { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.goods-card__price b { color: var(--danger); font-size: var(--fs-lg); font-weight: 600; }
.goods-card__price del { color: var(--t4); font-size: var(--fs-xs); }
.goods-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--t3);
}

/* ==================================================================
 *  十二、数据展示
 * ================================================================== */
.stat-card {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.stat-card__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  color: var(--t3);
}
.stat-card__value {
  margin-top: 6px;
  font-size: var(--fs-2xl);
  font-weight: 600;
  color: var(--t1);
  line-height: 1.15;
}
.stat-card__value small { font-size: var(--fs-xs); font-weight: 400; color: var(--t3); margin-left: 3px; }
.stat-card__foot {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
  font-size: var(--fs-xs);
  color: var(--t3);
}
.stat-card--brand { border-color: var(--brand-line); background: var(--brand-soft-2); }

.progress { height: 6px; border-radius: var(--r-pill); background: var(--fill-2); overflow: hidden; }
.progress__bar { height: 100%; border-radius: var(--r-pill); background: var(--brand); transition: width .3s; }
.progress-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); }
.progress-row .progress { flex: 1; }
.progress-row__val { flex: none; font-size: var(--fs-xs); color: var(--t3); }

/* 段位列表 */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.rank-item.is-current { border-color: var(--brand); background: var(--brand-soft-2); }
.rank-item__badge {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r);
  background: var(--fill);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-item__badge img { width: 100%; height: 100%; object-fit: contain; }
.rank-item__main { flex: 1; min-width: 0; }
.rank-item__name { font-size: var(--fs); font-weight: 600; color: var(--t1); }
.rank-item__desc { margin-top: 3px; font-size: var(--fs-xs); color: var(--t3); line-height: 1.6; }
.rank-item__need { flex: none; font-size: var(--fs-sm); color: var(--t2); text-align: right; }
.rank-item__need b { color: var(--t1); }

/* 认证卡片 */
.cert-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}
.cert-card__bg { position: absolute; inset: 0; opacity: .04; pointer-events: none; }
.cert-card__bg img { width: 100%; height: 100%; object-fit: cover; }
.cert-card__body { position: relative; padding: 16px; }
.cert-card__title { font-size: var(--fs-lg); font-weight: 600; color: var(--t1); }
.cert-card__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  font-size: var(--fs-sm);
  border-bottom: 1px dashed var(--line);
}
.cert-card__row:last-child { border-bottom: 0; }

/* 用户/报价 头图（改为扁平深色块，不用渐变） */
.hero {
  position: relative;
  border-radius: var(--r-lg);
  background: #16253d;
  color: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}
.hero__inner { position: relative; padding: 22px 24px; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .92);
  font-size: var(--fs-xs);
}
.hero__title { margin-top: 12px; font-size: var(--fs-2xl); font-weight: 600; color: #fff; letter-spacing: -.2px; }
.hero__desc { margin-top: 6px; font-size: var(--fs-sm); color: rgba(255, 255, 255, .74); line-height: 1.75; }
.hero__tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.hero__tag {
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .88);
  font-size: var(--fs-xs);
  line-height: 24px;
}
.hero__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.user-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: #16253d;
  color: #fff;
  margin-bottom: 12px;
}
.user-hero__avatar {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .12);
}
.user-hero__main { flex: 1; min-width: 0; }
.user-hero__name { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: 600; color: #fff; }
.user-hero__sub {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, .72);
}
.user-hero__sub > span { display: inline-flex; align-items: center; gap: 4px; }
.user-hero__side { display: flex; align-items: center; gap: 24px; flex: none; }
.user-hero__stat { text-align: right; }
.user-hero__stat b { display: block; font-size: var(--fs-xl); font-weight: 600; color: #fff; }
.user-hero__stat span { font-size: var(--fs-xs); color: rgba(255, 255, 255, .68); }
.user-hero .tag { background: rgba(255, 255, 255, .14); color: #fff; }

.quote-hero {
  border-radius: var(--r-lg);
  background: #16253d;
  color: #fff;
  padding: 20px 24px;
  margin-bottom: 12px;
}
.quote-hero__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.quote-hero__label { font-size: var(--fs-xs); color: rgba(255, 255, 255, .68); }
.quote-hero__value { margin-top: 4px; font-size: 34px; font-weight: 600; color: #fff; letter-spacing: -.5px; line-height: 1.1; }
.quote-hero__value::before { content: '¥'; font-size: var(--fs-lg); font-weight: 500; margin-right: 4px; color: rgba(255,255,255,.72); }
.quote-hero__sub { font-size: var(--fs-xs); color: rgba(255, 255, 255, .66); }
.quote-hero__grid { display: flex; gap: 32px; margin-top: 16px; flex-wrap: wrap; }
.quote-hero__cell b { display: block; font-size: var(--fs-lg); font-weight: 600; color: #fff; }
.quote-hero__cell span { font-size: var(--fs-xs); color: rgba(255, 255, 255, .66); }

/* ==================================================================
 *  十三、文档 / 纸张（合同、报价单、周报正文）
 * ================================================================== */
.paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 36px;
}
.contract-doc { font-size: var(--fs-sm); line-height: 1.9; color: var(--t2); }
.doc { font-size: var(--fs-sm); line-height: 1.8; color: var(--t2); word-break: break-word; }
.doc--article { font-size: var(--fs); line-height: 1.9; }
.doc h1, .doc h2, .doc h3, .doc h4 { color: var(--t1); margin: 20px 0 10px; }
.doc h1 { font-size: var(--fs-xl); }
.doc h2 { font-size: var(--fs-lg); }
.doc h3 { font-size: var(--fs); }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc img { border-radius: var(--r); margin: 8px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: var(--fs-sm); }
.doc table th, .doc table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.doc table th { background: var(--fill); font-weight: 500; color: var(--t2); }
.doc blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--brand-line);
  background: var(--fill);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--t3);
}
.doc code {
  padding: 1px 5px;
  border-radius: var(--r-xs);
  background: var(--fill-2);
  font-size: var(--fs-xs);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.doc a { color: var(--brand); }

/* ==================================================================
 *  十四、提示条 / 空状态 / 骨架屏
 * ================================================================== */
.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: 12px;
}
.notice-bar:last-child { margin-bottom: 0; }
.notice-bar__icon { flex: none; display: flex; align-items: center; margin-top: 2px; }
.notice-bar--info { background: var(--info-soft); color: #2c5fa8; }
.notice-bar--success { background: var(--success-soft); color: #1b7a3d; }
.notice-bar--warning { background: var(--warning-soft); color: #96560a; }
.notice-bar--danger { background: var(--danger-soft); color: #b02a2f; }

.empty { padding: 48px 20px; text-align: center; }
.empty__icon { color: var(--t4); display: flex; justify-content: center; margin-bottom: 12px; }
.empty__title { font-size: var(--fs); color: var(--t2); font-weight: 500; }
.empty__desc { margin-top: 4px; font-size: var(--fs-sm); color: var(--t3); line-height: 1.7; }

.skeleton {
  background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 37%, var(--fill) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--r);
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-card { height: 180px; }
.skeleton-line { height: 12px; margin-bottom: 10px; }

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================================================================
 *  十五、反馈层（Toast / 弹窗 / 抽屉 / 遮罩）
 * ================================================================== */
.toast-stack {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-pop);
  font-size: var(--fs-sm);
  color: var(--t1);
  animation: toastIn .18s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.toast.is-out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
.toast__icon { flex: none; display: flex; align-items: center; }
.toast--success .toast__icon { color: var(--success); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--error .toast__icon, .toast--danger .toast__icon { color: var(--danger); }
.toast--info .toast__icon { color: var(--brand); }

.modal-mask, .drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .15s ease-out;
}
.modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-mask);
  animation: modalIn .18s cubic-bezier(.2, .9, .3, 1);
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal--lg { max-width: 880px; }
.modal--xl { max-width: 1080px; }
.modal--sm { max-width: 420px; }
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: var(--fs-lg); font-weight: 600; color: var(--t1); }
.modal__close {
  width: 28px;
  height: 28px;
  flex: none;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--t3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { background: var(--fill); color: var(--t1); }
.modal__body { flex: 1; overflow-y: auto; padding: 20px; }
.modal__text { font-size: var(--fs-sm); color: var(--t2); line-height: 1.8; }
.modal__foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--fill);
}

.drawer-mask { justify-content: flex-start; padding: 0; }
.drawer {
  width: 100%;
  max-width: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow-mask);
  animation: drawerIn .2s cubic-bezier(.2, .9, .3, 1);
}
@keyframes drawerIn { from { transform: translateX(-16px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer__title { font-size: var(--fs-lg); font-weight: 600; color: var(--t1); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer__foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--fill);
}

.overlay-loading {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .6);
}
.overlay-loading .spinner { width: 28px; height: 28px; border-width: 2.5px; }

/* ==================================================================
 *  十六、业务专用组件
 * ================================================================== */
/* 头像 */
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--fill); flex: none; }
.avatar-72 { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--fill); flex: none; }

/* 二维码块 */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--fill);
}
.qr-box img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: var(--r);
  background: #fff;
  padding: 6px;
  border: 1px solid var(--line);
}
.qr-box__tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  color: var(--t3);
}

/* 电子印章 */
.seal-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.seal-item { position: relative; width: 72px; height: 72px; cursor: pointer; }
.seal-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.seal-item.is-active img { border-color: var(--brand); border-width: 2px; }
.seal-item__del {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 33, 41, .68);
  color: #fff;
  font-size: var(--fs-xs);
  line-height: 18px;
  cursor: pointer;
  padding: 0;
}
.seal-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--fill);
}
.seal-selected img {
  width: 56px; height: 56px;
  flex: none;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}

/* 手写签名板 */
.sign-pad {
  position: relative;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: var(--fill);
  overflow: hidden;
}
.sign-pad canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sign-pad__hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  color: var(--t4);
  pointer-events: none;
}
.sign-pad.is-signed .sign-pad__hint { display: none; }
.sign-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--fill);
}
.sign-status-card__img {
  width: 52px; height: 52px;
  flex: none;
  object-fit: contain;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
}
.sign-status-card__main { flex: 1; min-width: 0; }

/* 智能客服对话 */
.chat-wrap { display: flex; flex-direction: column; height: 520px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; }
.chat-foot {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--fill);
}
.chat-foot .textarea { min-height: 40px; max-height: 120px; background: #fff; }
.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-msg--me { flex-direction: row-reverse; }
.chat-msg__avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--r);
  background: var(--fill-2);
  color: var(--t3);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-msg--me .chat-msg__avatar { background: var(--brand-soft); color: var(--brand); }
.chat-msg__bubble {
  max-width: 72%;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--fill);
  font-size: var(--fs-sm);
  color: var(--t1);
  line-height: 1.72;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-msg--me .chat-msg__bubble { background: var(--brand-soft); }

/* ==================================================================
 *  十七、任务大厅
 * ================================================================== */
.job-filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
}
.job-filter__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-filter__label { flex: none; width: 58px; font-size: var(--fs-sm); color: var(--t3); }

.job-list { display: flex; flex-direction: column; gap: 10px; }
.job-card {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color .15s;
}
.job-card:hover { border-color: var(--brand-line); }
.job-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-card__title { font-size: var(--fs); font-weight: 600; color: var(--t1); }
.job-card__price { margin-left: auto; font-size: var(--fs-sm); font-weight: 600; color: var(--warning); }
.job-card__price--free { color: var(--success); }
.job-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--t3);
}
.job-card__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.job-card__req {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.job-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}
.job-card__contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--t2);
}
.job-card__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-phone {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .5px;
  color: var(--t1);
  font-weight: 500;
}
.job-count { margin-top: 12px; font-size: var(--fs-sm); color: var(--t3); }

/* ==================================================================
 *  十八、CAAC 执照理论刷题 / PK 对战
 * ================================================================== */
/* ---- 执照选择 ---- */
.qz-scope {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
}
.qz-scope__label { font-size: var(--fs-sm); color: var(--t3); flex: none; }

/* ---- 练习：题目卡 ---- */
.qz-question {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.qz-question__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.qz-question__index { font-size: var(--fs-sm); color: var(--t3); }
.qz-question__text {
  margin-top: 16px;
  font-size: var(--fs-lg);
  line-height: 1.75;
  color: var(--t1);
  font-weight: 500;
}

.qz-options { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.qz-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.qz-option:hover { border-color: var(--brand-line); background: var(--hover); }
.qz-option__key {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--fill-2);
  color: var(--t3);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qz-option__text { flex: 1; font-size: var(--fs-sm); line-height: 1.7; color: var(--t2); }
.qz-option.is-selected { border-color: var(--brand); background: var(--brand-soft-2); }
.qz-option.is-selected .qz-option__key { background: var(--brand); color: #fff; }
.qz-option.is-right { border-color: var(--success); background: var(--success-soft); }
.qz-option.is-right .qz-option__key { background: var(--success); color: #fff; }
.qz-option.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.qz-option.is-wrong .qz-option__key { background: var(--danger); color: #fff; }
.qz-option.is-disabled { cursor: default; }
.qz-option.is-disabled:hover { border-color: inherit; background: inherit; }

.qz-analysis {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--fill);
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--t2);
}
.qz-analysis__title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 6px;
}

.qz-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.qz-toolbar__spacer { flex: 1; }

/* ---- 答题卡（模拟考） ---- */
.qz-sheet { display: flex; flex-wrap: wrap; gap: 6px; }
.qz-sheet__item {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--t2);
  font-size: var(--fs-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qz-sheet__item:hover { border-color: var(--brand); color: var(--brand); }
.qz-sheet__item.is-done { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.qz-sheet__item.is-current { border-color: var(--brand); background: var(--brand); color: #fff; }
.qz-sheet__item.is-right { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.qz-sheet__item.is-wrong { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ---- 成绩 ---- */
.qz-score { text-align: center; padding: 26px 20px; }
.qz-score__num { font-size: 52px; font-weight: 600; line-height: 1.1; letter-spacing: -1px; }
.qz-score__num small { font-size: var(--fs-lg); font-weight: 400; color: var(--t3); margin-left: 4px; }
.qz-score__label { margin-top: 6px; font-size: var(--fs-sm); color: var(--t3); }
.qz-score--pass .qz-score__num { color: var(--success); }
.qz-score--fail .qz-score__num { color: var(--danger); }
.qz-score__grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.qz-score__cell b { display: block; font-size: var(--fs-xl); font-weight: 600; color: var(--t1); }
.qz-score__cell span { font-size: var(--fs-xs); color: var(--t3); }

/* ---- PK 对战 ---- */
.pk-stage {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.pk-players {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.pk-player { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.pk-player--opp { flex-direction: row-reverse; text-align: right; }
.pk-player__avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--t3);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pk-player__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pk-player__name { font-size: var(--fs-sm); color: var(--t1); font-weight: 500; }
.pk-player__score { font-size: var(--fs-2xl); font-weight: 600; color: var(--t1); font-variant-numeric: tabular-nums; }
.pk-player__score small { font-size: var(--fs-xs); color: var(--t3); font-weight: 400; }
.pk-vs { flex: none; font-size: var(--fs-xs); color: var(--t4); }
.pk-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--fill);
  font-size: var(--fs-sm);
  color: var(--t2);
}
.pk-countdown b { font-size: var(--fs-lg); color: var(--brand); font-variant-numeric: tabular-nums; }
.pk-race {
  height: 6px;
  background: var(--fill-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 12px;
}
.pk-race__bar { height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width .2s linear; }
.pk-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: var(--fs-sm);
  margin-top: 12px;
}
.pk-feedback--right { background: var(--success-soft); color: #1b7a3d; }
.pk-feedback--wrong { background: var(--danger-soft); color: #b02a2f; }
.pk-feedback--opp { background: var(--warning-soft); color: #96560a; }

/* ==================================================================
 *  十九、响应式
 * ================================================================== */
@media (max-width: 1400px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar__search { width: 200px; }
}
@media (max-width: 1024px) {
  /* 侧栏改抽屉 */
  .sidebar { transform: translateX(-100%); transition: transform .22s cubic-bezier(.4,0,.2,1); }
  .layout.is-drawer-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .layout.is-collapsed .main { margin-left: 0; }
  .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .check-grid { grid-template-columns: 1fr; }
  .form-grid > .col-span-2 { grid-column: auto; }
  .content { padding: 16px 16px 28px; }
  .topbar__search { display: none; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .item-row { flex-wrap: wrap; }
  .item-row__fields { grid-template-columns: 1fr 1fr; }
  .item-row__side { text-align: left; }
  .item-row__actions { justify-content: flex-start; }
  .list-row__side { display: none; }
  .user-hero { flex-direction: column; align-items: flex-start; }
  .user-hero__side { text-align: left; }
  .user-hero__stat { text-align: left; }
  .modal-mask { padding: 0; }
  .modal { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .drawer { max-width: 100%; }
  .media-row__thumb { width: 96px; height: 66px; }
  .paper { padding: 20px 16px; }
}

/* ==================================================================
 *  十九、打印（合同 / 报价单导出 PDF）
 * ================================================================== */
@media print {
  .sidebar, .topbar, .site-foot, .toast-stack, .modal-mask, .drawer-mask,
  .overlay-loading, .no-print, .page-head__actions, .pager, .filter-bar { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  html, body { background: #fff; }
  .page { max-width: none; animation: none; }
  .paper, .card { box-shadow: none; border: 0; border-radius: 0; padding: 0; }
}

