/* ============================================================================
   孚米欧 FUMIO · 工厂端 PC 样式表 (pc.css)
   覆盖范围：系统入口页 / 工厂端登录 / 工厂端注册流程 / 工厂端后台全部页面
   依赖：core.css（必须先引入）
   ============================================================================ */

/* ===========================================================================
   A. 认证层 —— 入口页、工厂端登录、注册流程
   =========================================================================== */

/* --- A1. 分屏骨架：左品牌叙事 / 右表单 --- */
.auth {
  display: grid; grid-template-columns: 1.05fr .95fr;
  min-height: 100vh; background: var(--white);
}
.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--sp-7) var(--sp-8); color: var(--text-invert);
  background: var(--ink-900);
}
/* 深色面板上的渐变光晕 + 网格地平线，避免大面积死黑 */
.auth-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46rem 30rem at 12% 4%, rgba(0, 192, 139, .30), transparent 62%),
    radial-gradient(38rem 28rem at 96% 96%, rgba(46, 138, 245, .22), transparent 60%);
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--sp-7) var(--sp-8); background: var(--white);
}
.auth-form { width: 100%; max-width: 400px; margin-inline: auto; }

/* --- A2. 品牌 logo --- */
.logo { display: inline-flex; align-items: center; gap: var(--sp-3); }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; background: var(--accent); color: #04241A;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg);
  letter-spacing: -0.04em; flex: 0 0 auto;
}
.logo-mark.is-buyer { background: var(--accent-buyer); color: var(--white); }
.logo-mark.is-ghost { background: rgba(255, 255, 255, .1); color: var(--text-invert); }
.logo-mark.is-lg { width: 46px; height: 46px; border-radius: 13px; font-size: var(--fs-xl); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b {
  font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-text span {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-3);
}
.logo-text.is-light span { color: var(--text-invert-2); }
.logo-text b.is-light { color: var(--text-invert); }

/* --- A3. 左侧品牌叙事 --- */
.auth-brand .brand-hero { max-width: 34rem; }
.auth-brand h1 {
  color: var(--text-invert);
  font-size: clamp(30px, 3.1vw, 46px); line-height: 1.08; letter-spacing: -0.035em;
  margin-bottom: var(--sp-5);
}
.auth-brand h1 em {
  font-style: normal; color: var(--accent);
}
.auth-brand .lead { color: var(--text-invert-2); font-size: var(--fs-lg); }

.brand-metrics { display: flex; gap: var(--sp-7); margin-top: var(--sp-7); }
.brand-metrics .v {
  font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 700;
  letter-spacing: -0.04em; color: var(--text-invert); line-height: 1;
}
.brand-metrics .v small { font-size: var(--fs-md); font-weight: 600; color: var(--accent); margin-left: 3px; }
.brand-metrics .k { font-size: var(--fs-sm); color: var(--text-invert-2); margin-top: var(--sp-2); }

.brand-quote {
  padding: var(--sp-5); margin-top: var(--sp-7);
  border-left: 2px solid var(--accent); background: rgba(255, 255, 255, .045);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; backdrop-filter: blur(4px);
}
.brand-quote p { font-size: var(--fs-md); line-height: 1.75; color: #D6E2E8; }
.brand-quote footer { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-invert-2); }
.brand-quote footer .avatar { background: rgba(255, 255, 255, .12); color: var(--text-invert); }

/* --- A4. 角色选择卡（入口页） --- */
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.role-card {
  --rc-accent: var(--accent);
  position: relative; display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4); text-align: left; cursor: pointer;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-md);
  transition: all var(--dur-base) var(--ease-out);
}
.role-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--sh-1); }
.role-card.is-active {
  border-color: var(--rc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-accent) 16%, transparent);
}
.role-card.is-active::after {
  content: "✓"; position: absolute; top: 10px; right: 12px;
  font-size: 12px; font-weight: 700; color: var(--rc-accent);
}
.role-card .rc-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--rc-accent) 14%, transparent); color: var(--rc-accent);
}
.role-card .rc-icon svg { width: 20px; height: 20px; }
.role-card b { font-size: var(--fs-md); font-weight: 700; }
.role-card small { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.55; }
.role-card.is-buyer { --rc-accent: var(--accent-buyer); }

/* --- A5. 表单区 --- */
.auth-form h2 { font-size: var(--fs-4xl); margin-bottom: var(--sp-3); }
.auth-form .sub { font-size: var(--fs-md); color: var(--text-2); margin-bottom: var(--sp-6); }

.auth-links { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.auth-alt { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-6) 0; font-size: var(--fs-xs); color: var(--text-3); }
.auth-alt::before, .auth-alt::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.social-login { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.social-login button {
  display: grid; place-items: center; height: 46px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--white);
  transition: all var(--dur-fast) var(--ease-out);
}
.social-login button:hover { border-color: var(--ink-400); background: var(--surface-2); transform: translateY(-1px); }
.social-login svg { width: 21px; height: 21px; }

.auth-foot {
  margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border-soft);
  font-size: var(--fs-sm); color: var(--text-3); text-align: center;
}
.auth-foot a { font-weight: 600; }

/* --- A6. 注册流程 --- */
.register { min-height: 100vh; background: var(--bg); }
.reg-head {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-6); background: var(--white);
  border-bottom: 1px solid var(--border-soft);
}
.reg-body { max-width: 760px; margin: 0 auto; padding: var(--sp-7) var(--sp-5) var(--sp-9); }
.reg-step-panel { display: none; }
.reg-step-panel.is-active { display: block; animation: fade-up var(--dur-base) var(--ease-out) both; }
.reg-nav { display: flex; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-7); }

/* 会员套餐卡：两端共用组件，样式统一定义在 core.css（科技感 · 外贸版式） */

/* 协议滚动框 */
.agreement {
  max-height: 260px; overflow-y: auto; padding: var(--sp-5);
  font-size: var(--fs-sm); line-height: 1.85; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-sm);
}
.agreement h4 { font-size: var(--fs-md); margin: var(--sp-4) 0 var(--sp-2); color: var(--text); }
.agreement h4:first-child { margin-top: 0; }

/* 人脸核验 */
.face-scan {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 4 / 3; max-width: 380px; margin: 0 auto var(--sp-5);
  background: var(--ink-900); border-radius: var(--r-lg); overflow: hidden;
}
.face-scan .frame {
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 9999px rgba(5, 9, 13, .35);
}
.face-scan .scan-line {
  position: absolute; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 18px var(--accent);
  animation: scan 2.4s var(--ease-soft) infinite;
}
@keyframes scan { 0%, 100% { top: 22%; } 50% { top: 76%; } }
.face-scan .hint {
  position: absolute; bottom: var(--sp-5); left: 0; right: 0; text-align: center;
  font-size: var(--fs-sm); color: var(--text-invert-2);
}

/* 支付 / 审核结果态 */
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin-top: var(--sp-4); }
.pay-method {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4);
  cursor: pointer; background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.pay-method:hover { border-color: var(--border-strong); }
.pay-method.is-active { border-color: var(--accent); background: var(--accent-soft); }
.pay-method .pm-icon { width: 30px; height: 30px; border-radius: var(--r-xs); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); color: #fff; }
.pay-method b { font-size: var(--fs-md); }
.pay-method small { display: block; font-size: var(--fs-xs); color: var(--text-3); }

.result-hero { text-align: center; padding: var(--sp-7) 0; }
.result-icon {
  display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto var(--sp-5);
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 8%, transparent);
}
.result-icon svg { width: 42px; height: 42px; }
.result-icon.is-warning { background: var(--warning-soft); color: var(--warning); box-shadow: 0 0 0 12px rgba(232, 147, 12, .08); }
.result-icon.is-info { background: var(--info-soft); color: var(--info); box-shadow: 0 0 0 12px rgba(46, 138, 245, .08); }

/* ===========================================================================
   B. 工厂端后台布局
   =========================================================================== */
body.is-console { background: var(--bg); }

.console { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* --- B1. 侧边栏 --- */
.sidebar {
  position: sticky; top: 0; align-self: start;
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
  background: var(--ink-900); color: var(--text-invert-2);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(30rem 22rem at 0% 0%, rgba(0, 192, 139, .16), transparent 60%);
}
.sidebar > * { position: relative; z-index: 1; }

.side-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5); }
.side-nav { flex: 1; overflow-y: auto; padding: 0 var(--sp-3) var(--sp-4); }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border: 0; border-radius: 4px; }

.nav-group { margin-bottom: var(--sp-5); }
.nav-group-title {
  padding: 0 var(--sp-3) var(--sp-2); font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(159, 182, 194, .55);
}
.nav-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); margin-bottom: 2px;
  font-size: var(--fs-md); font-weight: 500; color: var(--text-invert-2);
  border-radius: var(--r-sm); position: relative;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: var(--text-invert); }
.nav-item.is-active { background: rgba(255, 255, 255, .1); color: var(--text-invert); font-weight: 600; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-item .nav-count {
  margin-left: auto; padding: 1px 7px; font-size: var(--fs-2xs); font-weight: 700;
  font-family: var(--font-mono); color: var(--text-invert);
  background: rgba(255, 255, 255, .16); border-radius: var(--r-full);
}
.nav-item .nav-count.is-hot { background: var(--danger); }

.side-foot { padding: var(--sp-4); border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2); border-radius: var(--r-sm); }
.side-user:hover { background: rgba(255, 255, 255, .07); }
.side-user .u-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text-invert); }
.side-user .u-sub { font-size: var(--fs-2xs); color: rgba(159, 182, 194, .8); }
.side-user { width: 100%; min-width: 0; text-align: left; color: var(--text-invert); }
.side-user .avatar { flex-shrink: 0; }
.side-user .u-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .u-sub { overflow-wrap: anywhere; line-height: 1.5; }
.side-foot { flex-shrink: 0; position: relative; z-index: 3; }
.side-foot .dropdown-menu { max-width: calc(100vw - 32px); }

/* --- B2. 顶栏 --- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  height: var(--header-h); padding: 0 var(--sp-6);
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-left { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.topbar .search {
  position: relative; width: 320px;
}
.topbar .search input {
  width: 100%; height: 40px; padding: 0 var(--sp-4) 0 42px;
  font-size: var(--fs-sm); background: var(--surface-2);
  border: 1px solid transparent; border-radius: var(--r-full);
  transition: all var(--dur-fast) var(--ease-out);
}
.topbar .search input:focus { background: var(--white); border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.topbar .search svg { position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: var(--sp-2); }
.topbar .icon-btn {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px;
  color: var(--text-2); border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.topbar .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.topbar .icon-btn svg { width: 19px; height: 19px; }
.topbar .dot-badge {
  position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; font-size: 9px; font-weight: 700; font-family: var(--font-mono);
  color: var(--white); background: var(--danger); border: 2px solid var(--white); border-radius: var(--r-full);
}
/* 无未读数时隐藏角标（JS 回填真实数量） */
.topbar .dot-badge:empty { display: none; }

/* --- B3. 内容区 --- */
.main { min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: var(--sp-6); }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5);
  margin-bottom: var(--sp-6); flex-wrap: wrap;
}
.page-head h1 { font-size: var(--fs-3xl); }
.page-head .ph-sub { font-size: var(--fs-sm); color: var(--text-2); margin-top: var(--sp-2); }
.page-head .ph-actions { display: flex; align-items: center; gap: var(--sp-3); }

/* 章节标题（带短竖线，杂志感） */
.section-title {
  display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.section-title h2 { font-size: var(--fs-xl); }
.section-title::before { content: ""; width: 3px; height: 18px; background: var(--accent); border-radius: 2px; }
.section-title .more { margin-left: auto; }

/* --- B4. 数据卡 --- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.kpi {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5); background: var(--white);
  border: 1px solid var(--border-soft); border-radius: var(--r-md);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: var(--fs-sm); color: var(--text-2); }
.kpi-value {
  font-family: var(--font-display); font-size: var(--fs-4xl); font-weight: 700;
  line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.kpi-value small { font-size: var(--fs-md); font-weight: 600; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); }
.kpi-spark { height: 44px; margin-top: var(--sp-2); }
.kpi-spark svg { width: 100%; height: 100%; overflow: visible; }

/* 深色 KPI：主指标突出 */
.kpi-hero {
  grid-column: span 2;
  background: var(--ink-900); border-color: transparent; color: var(--text-invert);
}
.kpi-hero .kpi-label { color: var(--text-invert-2); }
.kpi-hero .kpi-value { color: var(--text-invert); }
.kpi-hero .kpi-foot { color: var(--text-invert-2); }
.kpi-hero::after {
  content: ""; position: absolute; inset: auto -20% -60% 40%; height: 180px;
  background: radial-gradient(closest-side, rgba(0, 192, 139, .34), transparent);
  pointer-events: none;
}

/* --- B5. 图表区 --- */
.chart-card { display: flex; flex-direction: column; }
.chart-legend { display: flex; gap: var(--sp-5); font-size: var(--fs-sm); color: var(--text-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chart-area { width: 100%; }
.chart-area svg { width: 100%; height: auto; overflow: visible; }
.chart-bar-track { display: flex; align-items: flex-end; gap: var(--sp-3); height: 190px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); height: 100%; }
.chart-bar-col .bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar-col .bar {
  width: 62%; max-width: 34px; border-radius: 5px 5px 0 0; background: var(--accent);
  transition: height var(--dur-slow) var(--ease-out), background var(--dur-fast) var(--ease-out);
  min-height: 4px;
}
.chart-bar-col:hover .bar { background: var(--accent-ink); }
.chart-bar-col .bar-x { font-size: var(--fs-2xs); color: var(--text-3); font-family: var(--font-mono); }

/* 环形占比 */
.donut-row { display: flex; align-items: center; gap: var(--sp-6); }
.donut { position: relative; flex: 0 0 auto; width: 148px; height: 148px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut .center {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.donut .center b { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); letter-spacing: -0.03em; }
.donut .center span { font-size: var(--fs-2xs); color: var(--text-3); }

/* 排行条 */
.rank-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.rank-item { display: flex; align-items: center; gap: var(--sp-4); }
.rank-item .rk-no {
  display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-3); background: var(--surface-3); border-radius: var(--r-xs);
}
.rank-item:nth-child(1) .rk-no { background: var(--accent); color: #04241A; }
.rank-item:nth-child(2) .rk-no { background: var(--ink-700); color: #fff; }
.rank-item:nth-child(3) .rk-no { background: var(--ink-400); color: #fff; }
.rank-item .rk-bar { flex: 1; height: 8px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.rank-item .rk-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.rank-item .rk-val { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 600; min-width: 72px; text-align: right; }

/* --- B6. 快捷入口 --- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-2); text-align: center; cursor: pointer;
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--r-md);
  transition: all var(--dur-base) var(--ease-out);
}
.quick-item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: transparent; }
.quick-item .icon-box { transition: transform var(--dur-base) var(--ease-out); }
.quick-item:hover .icon-box { transform: scale(1.08) rotate(-4deg); }
.quick-item span { font-size: var(--fs-sm); font-weight: 500; }

/* --- B7. 列表/表格工具条 --- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  flex-wrap: wrap; padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
}
.toolbar .tb-left { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.toolbar .tb-right { display: flex; align-items: center; gap: var(--sp-3); }

/* 状态筛选胶囊 */
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  padding: 6px 14px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-full);
  transition: all var(--dur-fast) var(--ease-out); white-space: nowrap;
}
.chip:hover { background: var(--surface-3); color: var(--text); }
.chip.is-active { background: var(--ink-900); color: var(--text-invert); }
.chip .n { font-family: var(--font-mono); font-size: var(--fs-2xs); opacity: .7; margin-left: 4px; }

/* 商品/订单单元格 */
.cell-prod { display: flex; align-items: center; gap: var(--sp-3); min-width: 230px; }
.cell-prod .thumb {
  width: 52px; height: 52px; flex: 0 0 auto; border-radius: var(--r-sm);
  background: var(--surface-3); overflow: hidden; display: grid; place-items: center;
}
.cell-prod .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-prod .p-name { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.cell-prod .p-meta { font-size: var(--fs-xs); color: var(--text-3); font-family: var(--font-mono); }

.money-strong { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.money-strong.is-accent { color: var(--accent-ink); }

/* --- B8. 设置/配置页 --- */
.config-layout { display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-6); align-items: start; }
.config-nav { position: sticky; top: calc(var(--header-h) + var(--sp-5)); display: flex; flex-direction: column; gap: 2px; }
.config-nav button {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); text-align: left;
  border-radius: var(--r-sm); transition: all var(--dur-fast) var(--ease-out);
}
.config-nav button:hover { background: var(--surface-3); color: var(--text); }
.config-nav button.is-active { background: var(--white); color: var(--text); font-weight: 600; box-shadow: var(--sh-1); }

.form-section { margin-bottom: var(--sp-7); }
.form-section h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.form-section .fs-desc { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--sp-5); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.form-grid .span-2 { grid-column: span 2; }
.form-actions {
  display: flex; gap: var(--sp-3); padding-top: var(--sp-5);
  border-top: 1px solid var(--border-soft);
}

/* 行内编辑列表（运费模板、角色权限等） */
.row-list { display: flex; flex-direction: column; }
.row-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border-soft);
}
.row-list-item:last-child { border-bottom: 0; }
.row-list-item:hover { background: var(--surface-2); }

/* 权限矩阵 */
.perm-matrix { width: 100%; font-size: var(--fs-sm); }
.perm-matrix th, .perm-matrix td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-soft); text-align: left; }
.perm-matrix th { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: var(--tr-wide); background: var(--surface-2); }
.perm-matrix tbody tr:hover { background: var(--surface-2); }

/* --- B9. 客服中心（三栏） --- */
.cs-layout { display: grid; grid-template-columns: 250px 1fr 300px; gap: var(--sp-4); height: calc(100vh - var(--header-h) - 96px); min-height: 560px; }
.cs-panel { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; }
.cs-list { flex: 1; overflow-y: auto; }
.cs-contact {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4);
  cursor: pointer; border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur-fast) var(--ease-out);
}
.cs-contact:hover { background: var(--surface-2); }
.cs-contact.is-active { background: var(--accent-soft); }
.cs-contact .cc-body { min-width: 0; flex: 1; }
.cs-contact .cc-name { font-size: var(--fs-md); font-weight: 600; }
.cs-contact .cc-last { font-size: var(--fs-xs); color: var(--text-3); }

.chat-stream { flex: 1; overflow-y: auto; padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); background: var(--surface-2); }
.bubble { display: flex; gap: var(--sp-3); max-width: 74%; }
.bubble .bb-content {
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-md); line-height: 1.65;
  background: var(--white); border-radius: var(--r-md); box-shadow: var(--sh-1);
}
.bubble .bb-time { font-size: var(--fs-2xs); color: var(--text-3); margin-top: var(--sp-2); font-family: var(--font-mono); }
.bubble.is-me { margin-left: auto; flex-direction: row-reverse; }
.bubble.is-me .bb-content { background: var(--ink-900); color: var(--text-invert); }
.bubble.is-sys { max-width: 100%; justify-content: center; }
.bubble.is-sys .bb-content {
  padding: var(--sp-1) var(--sp-4); font-size: var(--fs-xs); color: var(--text-3);
  background: var(--surface-3); box-shadow: none; border-radius: var(--r-full);
}
.chat-compose { display: flex; align-items: flex-end; gap: var(--sp-3); padding: var(--sp-4); border-top: 1px solid var(--border-soft); background: var(--white); }
.chat-compose textarea { flex: 1; min-height: 44px; max-height: 132px; padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-sm); resize: none; }
.chat-compose textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* --- B10. 响应式 --- */
/* --- B11. 商品服务市场：可多选服务卡 --- */
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.svc-check { position: relative; display: block; cursor: pointer; }
.svc-check input[type="checkbox"] {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  appearance: none; width: 22px; height: 22px; margin: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); border: 1.5px solid var(--border-strong);
  border-radius: var(--r-xs); box-shadow: var(--sh-1);
  transition: all var(--dur-fast) var(--ease-out);
}
.svc-check input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.svc-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.svc-check:hover .svc-card { transform: translateY(-3px); box-shadow: var(--sh-2); }
.svc-check input:checked ~ .svc-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--sh-2);
}
.svc-media { aspect-ratio: 16 / 9; background: var(--surface-3); }
.svc-body { flex: 1; padding: var(--sp-4); }
.svc-body > b { display: block; font-size: var(--fs-md); line-height: 1.45; }
.svc-body p { font-size: var(--fs-sm); color: var(--text-2); margin-top: var(--sp-2); line-height: 1.6; }
.svc-meta {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
  font-size: var(--fs-xs); color: var(--text-3);
}
@media (max-width: 1280px) { .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px)  { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .svc-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 1280px) {
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  /* 上面一行保持 4 列，无需变化 */
  .cs-layout { grid-template-columns: 220px 1fr; }
  .cs-layout .cs-panel:last-child { display: none; }
}

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-hero { grid-column: span 2; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: span 1; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .config-layout { grid-template-columns: minmax(0, 1fr); }
  .config-nav { position: static; flex-direction: row; overflow-x: auto; }
}

@media (max-width: 900px) {
  /* 认证层：小屏隐藏品牌叙事，只留表单 */
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: var(--sp-6) var(--sp-5); min-height: 100vh; }
  /* 后台：侧边栏折叠为抽屉 */
  .console { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: var(--z-drawer);
    width: 260px; transform: translateX(-100%);
    transition: transform var(--dur-base) var(--ease-out);
  }
  .sidebar.is-open { transform: none; box-shadow: var(--sh-3); }
  .content { padding: var(--sp-5) var(--sp-4); }
  .topbar { padding: 0 var(--sp-4); }
  .topbar .search { display: none; }
  .cs-layout { grid-template-columns: 1fr; height: auto; }
  .cs-layout .cs-panel:first-child { display: none; }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-hero { grid-column: span 1; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .role-switch { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .brand-metrics { gap: var(--sp-5); flex-wrap: wrap; }
  .page-head { align-items: flex-start; flex-direction: column; }
}

/* ===========================================================================
   会员中心（桌面端）— 买家PC / 卖家PC 共用，配色由 --accent 决定
   仅新增会员中心所需组件；复用 core.css 的 .btn / .card / .modal 等基础类
   =========================================================================== */
.mem-wrap { max-width: 1000px; margin: 0 auto; }
.mem-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-6);
  padding: var(--sp-6); border-radius: var(--r-lg);
  color: #fff; background: linear-gradient(135deg, var(--ink-800), var(--ink-900) 72%);
}
.mem-hero::after {
  content: ""; position: absolute; right: -8%; top: -45%; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%); pointer-events: none;
}
.mem-hero > * { position: relative; z-index: 1; }
.mem-id { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.mem-id .avatar {
  width: 56px; height: 56px; font-size: var(--fs-xl); flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .16); color: #fff;
}
.mem-name { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
.mem-sub { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.mem-vip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  font-size: var(--fs-2xs); font-weight: 700; color: #5C1D0B;
  background: linear-gradient(100deg, #FFD98A, #FFB020); border-radius: var(--r-full);
}
.mem-vip svg { width: 12px; height: 12px; }
.mem-expire { font-size: var(--fs-sm); color: rgba(255, 255, 255, .72); margin-top: 4px; }
.mem-actions { display: flex; gap: var(--sp-3); flex: 0 0 auto; }
.mem-actions .btn { min-width: 128px; }
.btn-ghost-light {
  --btn-bg: rgba(255, 255, 255, .14); --btn-bd: rgba(255, 255, 255, .42); --btn-fg: #fff;
}
.btn-ghost-light:hover { --btn-bg: rgba(255, 255, 255, .24); --btn-fg: #fff; }

/* 资产卡 */
.mem-assets { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin-top: var(--sp-5); }
.mem-asset {
  display: block; padding: var(--sp-4) var(--sp-5); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-1);
  transition: border-color var(--dur-base), transform var(--dur-base);
}
.mem-asset:hover { border-color: var(--accent); transform: translateY(-2px); }
.mem-asset .val { font-family: var(--font-mono); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
.mem-asset .key { font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }

/* 区块 */
.mem-block { margin-top: var(--sp-6); }
.mem-block .section-title { margin-bottom: var(--sp-4); }

/* 续费档位 */
.renew-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.renew-opt {
  position: relative; padding: var(--sp-5); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--r-md); cursor: pointer;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.renew-opt.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.renew-opt .ro-name { font-size: var(--fs-lg); font-weight: 700; }
.renew-opt .ro-desc { font-size: var(--fs-sm); color: var(--text-2); margin-top: 4px; }
.renew-opt .ro-price { font-family: var(--font-mono); font-size: var(--fs-2xl); font-weight: 700; color: var(--accent-ink); margin-top: var(--sp-3); }
.renew-opt .ro-price s { display: block; font-size: var(--fs-sm); color: var(--text-3); font-weight: 400; }

/* 升级套餐 */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); align-items: start; }
.plan-card { position: relative; padding: var(--sp-5); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); }
.plan-card.is-featured { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.plan-card.is-current { border-style: dashed; }
.plan-flag {
  position: absolute; top: -10px; right: var(--sp-4); padding: 2px 10px;
  font-size: var(--fs-2xs); font-weight: 700; color: #fff; background: var(--accent); border-radius: var(--r-full);
}
.plan-name { font-size: var(--fs-xl); font-weight: 700; }
.plan-card .plan-name { color: var(--text-1); }
.plan-price { font-family: var(--font-mono); font-size: var(--fs-3xl); font-weight: 700; margin: var(--sp-2) 0 var(--sp-3); }
.plan-price small { font-size: var(--fs-sm); color: var(--text-3); font-weight: 400; font-family: var(--font-body); }
.plan-feats { list-style: none; padding: 0; margin: 0 0 var(--sp-4); }
.plan-feats li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-1); padding: 5px 0; }
.plan-feats li svg { width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }

/* 支付弹窗信息行（桌面 / 移动共用语义） */
.pay-line { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.pay-line:last-of-type { border-bottom: 0; }
.pay-line b { font-family: var(--font-mono); font-size: var(--fs-md); }

/* ===== 买家 PC 商城：商品网格（桌面端复用，珊瑚橘由 buyer-pc.css 控制） ===== */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
.prod-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.prod-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--sh-2); }
.prod-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #EDE7E1, #DCD3CB); }
.prod-media > span { position:absolute; inset:0; }
.prod-badge { position: absolute; top: 10px; left: 10px; padding: 2px 10px; font-size: var(--fs-2xs); font-weight: 700; color: #fff; background: var(--accent); border-radius: var(--r-full); z-index: 2; }
.prod-body { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.prod-title { font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.prod-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.prod-tag { font-size: var(--fs-2xs); padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.prod-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.prod-price { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md); color: var(--accent-ink); }
.prod-price s { color: var(--text-3); font-weight: 400; font-size: var(--fs-2xs); margin-left: 6px; }
.prod-supply { font-size: var(--fs-2xs); color: var(--text-3); }

/* 商城顶部 banner */
.mall-hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-7); color: #fff; background: linear-gradient(135deg, #FF7A45, #E85D2A 60%, #C43A14); margin-bottom: var(--sp-5); }
.mall-hero::after { content:""; position:absolute; right:-8%; top:-40%; width:320px; height:320px; border-radius:50%; background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent 70%); pointer-events:none; }
.mall-hero .eyebrow { color: rgba(255,255,255,.75); letter-spacing:.12em; font-size: var(--fs-2xs); }
.mall-hero h2 { font-size: var(--fs-2xl); font-weight: 700; margin: var(--sp-2) 0 var(--sp-2); letter-spacing: -.02em; }
.mall-hero p { color: rgba(255,255,255,.85); font-size: var(--fs-sm); }
.mall-hero .btn { margin-top: var(--sp-4); }

/* 公告条（买家 PC 找货首页） */
.notice-bar { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--white); border-radius: var(--r-sm); }
.notice-bar .nb-tag { padding: 2px 8px; font-size: var(--fs-2xs); font-weight: 700; color: var(--accent-buyer-ink); background: var(--accent-buyer-soft); border-radius: var(--r-xs); }
.notice-bar .nb-text { flex: 1; font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; }
.notice-bar .nb-text div { white-space: nowrap; }

/* 招聘功能暂时下线：只隐藏工厂 PC 端入口，保留页面和数据便于恢复。 */
html[data-role="factory"] a[href^="jobs.html"] { display: none !important; }

/* ===== 登录页醒目注册 CTA 卡片 ===== */
.reg-cta-card {
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  background: linear-gradient(135deg, #FFFBF8, #FFF5EF);
}
.reg-cta-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.reg-cta-body b {
  font-size: var(--fs-md);
  color: var(--text-1);
}
@media (max-width: 520px) {
  .reg-cta-body { flex-direction: column; text-align: center; }
}
