/* ============================================================================
   孚米欧 FUMIO · 共享基础层 (core.css)
   所有页面统一引用。层级：令牌 → 重置 → 排版 → 原子类 → 按钮 → 表单
   → 卡片 → 标记 → 表格 → 弹层 → 反馈 → 动效 → 响应式
   注意：本文件不含任何业务内容，只提供结构与视觉；内容一律写在 HTML 标签内。
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. 设计令牌 Design Tokens
   --------------------------------------------------------------------------- */
:root {
  /* --- 1.1 中性色阶：暖调近黑 → 近白，避免纯黑纯白 --- */
  --ink-950: #05090D;
  --ink-900: #0A1F2C;   /* 品牌深墨（深色区块 / 侧边栏基底） */
  --ink-850: #0E2735;
  --ink-800: #13303F;
  --ink-700: #1E3F4F;
  --ink-600: #2F5566;
  --ink-500: #4E7183;   /* 次级文字 */
  --ink-400: #7B98A6;   /* 三级文字 / 占位 */
  --ink-300: #A8BEC8;   /* 禁用 / 图标弱化 */
  --ink-200: #D3E0E6;   /* 边框 */
  --ink-100: #E8EFF3;   /* 分隔 / 浅底 */
  --ink-50:  #F4F7F9;   /* 页面底（工厂端） */
  --paper:   #FBFAF8;   /* 暖白纸（买家端） */
  --white:   #FFFFFF;

  /* --- 1.2 品牌与强调色 --- */
  --brand:        #0A1F2C;   /* 品牌主色：深墨蓝 */
  --brand-soft:   #14415A;   /* 品牌浅阶 */
  --accent:       #00C08B;   /* 默认强调色（工厂端）：电光青绿 */
  --accent-ink:   #046B50;   /* 强调色的深阶，用于浅底上的文字 */
  --accent-soft:  #E2FBF3;   /* 强调色的极浅底 */
  --accent-buyer: #FF5A2D;   /* 买家端强调色：珊瑚橘 */
  --accent-buyer-ink: #C43A14;
  --accent-buyer-soft: #FFF0EA;

  /* --- 1.3 功能色 --- */
  --info:    #2E8AF5;  --info-soft:    #E7F1FE;
  --success: #0FA968;  --success-soft: #E4F7EE;
  --warning: #E8930C;  --warning-soft: #FDF3E1;
  --danger:  #E5484D;  --danger-soft:  #FDECEC;
  --violet:  #7C5CFF;  --violet-soft:  #F0EDFF;

  /* --- 1.4 语义别名（换肤只需覆盖这一层） --- */
  --bg:            var(--ink-50);
  --bg-alt:        var(--paper);
  --surface:       var(--white);
  --surface-2:     var(--ink-50);
  --surface-3:     var(--ink-100);
  --surface-dark:  var(--ink-900);
  --text:          var(--ink-900);
  --text-1:        var(--ink-900);   /* 别名：兼容历史引用 */
  --text-2:        var(--ink-500);
  --text-3:        var(--ink-400);
  --text-invert:   #F1F6F8;
  --text-invert-2: #9FB6C2;
  --border:        var(--ink-200);
  --border-strong: var(--ink-300);
  --border-soft:   var(--ink-100);
  --ring:          color-mix(in srgb, var(--accent) 42%, transparent);

  /* --- 1.5 字阶（模块化 1.25 比例） --- */
  /* 四端使用浏览器/操作系统字体，避免随包分发第三方字体文件。 */
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-body:    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono:    ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --fs-2xs: 11px;
  --fs-xs:  12px;
  --fs-sm:  13px;
  --fs-md:  14px;   /* B 端正文基准 */
  --fs-lg:  16px;
  --fs-xl:  19px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;
  --fs-4xl: 38px;
  --fs-5xl: 48px;
  --fs-6xl: 64px;
  --fs-7xl: 84px;

  --lh-tight: 1.06;   /* 超大标题 */
  --lh-snug:  1.24;   /* 小标题 */
  --lh-body:  1.7;    /* 正文（中文行高 ≥1.7） */

  --tr-tight: -0.03em;  /* 大标题字距 */
  --tr-wide:  0.06em;   /* 标签/全大写 */
  --tr-cn:    0.01em;   /* 中文正文微字距 */

  /* --- 1.6 间距梯度 --- */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 24px;  --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;
  --sp-9: 96px;  --sp-10: 128px;

  /* --- 1.7 圆角 --- */
  --r-xs: 6px;  --r-sm: 10px; --r-md: 14px;
  --r-lg: 20px; --r-xl: 28px; --r-full: 999px;

  /* --- 1.8 阴影：三级高度，带环境色而非纯黑 --- */
  --sh-1: 0 1px 2px rgba(10, 31, 44, .05), 0 2px 8px rgba(10, 31, 44, .05);
  --sh-2: 0 4px 12px rgba(10, 31, 44, .07), 0 12px 32px rgba(10, 31, 44, .08);
  --sh-3: 0 8px 24px rgba(10, 31, 44, .10), 0 32px 72px rgba(10, 31, 44, .14);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, .08);

  /* --- 1.9 动效 --- */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-fast:  160ms;
  --dur-base:  320ms;
  --dur-slow:  640ms;

  /* --- 1.10 层级 --- */
  --z-base: 1; --z-sticky: 100; --z-drawer: 300; --z-modal: 400; --z-toast: 500;

  /* --- 1.11 尺寸 --- */
  --header-h: 64px;
  --sidebar-w: 236px;
  --tabbar-h: 58px;
  --maxw: 1200px;
}

/* ---------------------------------------------------------------------------
   2. 重置与基础
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-cn);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote, dl, dd { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  color: var(--text);
}
p { margin: 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

/* 数字一律等宽对齐，保证表格/金额纵向成列 */
.num, .money, time, .tabular, table td.num, table th.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

::selection { background: var(--accent); color: var(--white); }

/* 焦点：可见描边，键盘可达 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* 滚动条（桌面端细化） */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--ink-200); border: 3px solid transparent;
    background-clip: content-box; border-radius: var(--r-full);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--ink-300); background-clip: content-box; }
}

/* 跳转到主内容（无障碍） */
.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: var(--z-toast);
  padding: var(--sp-2) var(--sp-4); background: var(--ink-900); color: var(--text-invert);
  border-radius: var(--r-sm); transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------------------------------------------------------------------------
   3. 排版
   --------------------------------------------------------------------------- */
.display-1, .display-2, .display-3,
.h1, .h2, .h3, .h4, .h5 {
  font-family: var(--font-display);
  letter-spacing: var(--tr-tight);
  text-wrap: balance;
}

.display-1 { font-size: clamp(38px, 6.4vw, var(--fs-7xl)); line-height: var(--lh-tight); font-weight: 700; }
.display-2 { font-size: clamp(32px, 5vw, var(--fs-6xl));   line-height: 1.0;            font-weight: 700; }
.display-3 { font-size: clamp(26px, 3.6vw, var(--fs-5xl)); line-height: 1.08;           font-weight: 700; }
.h1 { font-size: var(--fs-4xl); }
.h2 { font-size: var(--fs-3xl); }
.h3 { font-size: var(--fs-2xl); }
.h4 { font-size: var(--fs-xl); }
.h5 { font-size: var(--fs-lg); }

/* 标题中的强调片段：用强调色锚定视觉焦点 */
.hl { color: var(--accent-ink); }
.hl-accent { color: var(--accent); }
.hl-buyer { color: var(--accent-buyer); }
/* 下划扫过的强调，比纯改色更有设计感 */
.hl-mark {
  position: relative; display: inline-block; white-space: nowrap;
}
.hl-mark::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: .08em; height: .34em;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 2px; z-index: -1;
}

.lead { font-size: var(--fs-lg); line-height: 1.72; color: var(--text-2); max-width: 62ch; }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tr-wide);
  text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow.is-buyer { color: var(--accent-buyer-ink); }
.eyebrow.is-plain { color: var(--text-3); }

.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }
.small { font-size: var(--fs-sm); }
.tiny  { font-size: var(--fs-xs); }

/* 分隔用的规则线 + 小标签（杂志感元素） */
.rule {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--text-3); font-size: var(--fs-xs);
  letter-spacing: var(--tr-wide); text-transform: uppercase;
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1; background: var(--border);
}
.rule.is-left::after { display: none; }

/* ---------------------------------------------------------------------------
   4. 布局与原子类
   --------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5); }
.container-wide { max-width: 1440px; }
.container-narrow { max-width: 880px; }

.row      { display: flex; }
.row-mid  { display: flex; align-items: center; }
.row-top  { display: flex; align-items: flex-start; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-center  { display: flex; align-items: center; justify-content: center; }
.col      { display: flex; flex-direction: column; }
.grid     { display: grid; }
.wrap     { flex-wrap: wrap; }
.grow     { flex: 1 1 auto; min-width: 0; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); } .gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }
.gap-7 { gap: var(--sp-7); } .gap-8 { gap: var(--sp-8); }

.g-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.g-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.g-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.g-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-5); }

.mt-0 { margin-top: 0; }   .mt-2 { margin-top: var(--sp-2); }  .mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); } .mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); } .mt-8 { margin-top: var(--sp-8); } .mt-9 { margin-top: var(--sp-9); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); } .mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); } .mb-7 { margin-bottom: var(--sp-7); }

.p-4 { padding: var(--sp-4); } .p-5 { padding: var(--sp-5); } .p-6 { padding: var(--sp-6); }
.px-5 { padding-inline: var(--sp-5); } .py-5 { padding-block: var(--sp-5); }
.py-7 { padding-block: var(--sp-7); } .py-9 { padding-block: var(--sp-9); }

.text-c { text-align: center; } .text-r { text-align: right; } .text-l { text-align: left; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hide { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------------
   5. 按钮
   --------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-5);
  font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600;
  letter-spacing: 0.01em; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-sm);
  cursor: pointer; user-select: none;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled], .btn.is-disabled {
  opacity: .5; cursor: not-allowed; transform: none; pointer-events: none;
}
.btn svg { width: 17px; height: 17px; }

/* 主按钮：深墨底 + 白字，最高权重动作 */
.btn-primary {
  --btn-bg: var(--ink-900); --btn-fg: var(--text-invert); --btn-bd: var(--ink-900);
  box-shadow: 0 1px 2px rgba(10, 31, 44, .2);
}
.btn-primary:hover { --btn-bg: var(--ink-800); --btn-bd: var(--ink-800); box-shadow: var(--sh-2); }

/* 强调按钮：跟随端的强调色 */
.btn-accent {
  --btn-bg: var(--accent); --btn-fg: #04241A; --btn-bd: var(--accent);
  box-shadow: 0 1px 2px rgba(10, 31, 44, .18);
}
.btn-accent:hover { --btn-bg: color-mix(in srgb, var(--accent) 88%, #000); box-shadow: var(--sh-2); }
body[data-role="buyer"] .btn-accent,
.is-buyer .btn-accent {
  --btn-bg: var(--accent-buyer); --btn-fg: var(--white); --btn-bd: var(--accent-buyer);
}

.btn-outline { --btn-bg: transparent; --btn-bd: var(--border-strong); }
.btn-outline:hover { --btn-bg: var(--surface-2); --btn-bd: var(--ink-400); }

.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--surface-3); --btn-fg: var(--text); }

.btn-soft {
  --btn-bg: var(--accent-soft); --btn-fg: var(--accent-ink); --btn-bd: transparent;
}
.btn-soft:hover { --btn-bg: color-mix(in srgb, var(--accent) 18%, #fff); }

.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-danger:hover { --btn-bg: var(--danger); --btn-fg: var(--white); }

.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 var(--sp-3); font-size: var(--fs-sm); border-radius: var(--r-xs); }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { min-height: 54px; padding: 0 var(--sp-6); font-size: var(--fs-lg); border-radius: var(--r-md); }
.btn-xl { min-height: 60px; padding: 0 var(--sp-7); font-size: var(--fs-lg); border-radius: var(--r-full); }
.btn-icon { min-height: 40px; width: 40px; padding: 0; border-radius: var(--r-sm); }
.btn-icon.btn-sm { min-height: 32px; width: 32px; }

/* 文字按钮：下划线扫过 */
.btn-link {
  min-height: auto; padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--accent-ink); font-weight: 600; position: relative;
}
.btn-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: currentColor; transition: width var(--dur-base) var(--ease-out);
}
.btn-link:hover { transform: none; color: var(--accent-ink); }
.btn-link:hover::after { width: 100%; }

/* 加载态：内联转圈 */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--btn-fg); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 按钮组 */
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* 胶囊小按钮：列表行内轻量操作（订单行 / 设置行等） */
.pill-btn {
  padding: 8px 16px; font-size: var(--fs-sm); cursor: pointer;
  border: 1px solid var(--border-soft); border-radius: var(--r-full);
  background: var(--surface); text-decoration: none;
  display: inline-flex; align-items: center;
  transition: all var(--dur-fast) var(--ease-out);
}
.pill-btn:hover { border-color: var(--border-strong); color: var(--text); }
.pill-btn.is-solid { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------------------------------------------------------------------
   6. 表单
   --------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field-label {
  display: flex; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
}
.field-label .req { color: var(--danger); }
.field-hint { font-size: var(--fs-xs); color: var(--text-3); }
.field-error {
  display: none; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-xs); color: var(--danger);
}
.field.is-invalid .field-error { display: flex; }
.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .textarea { border-color: var(--danger); background: var(--danger-soft); }

.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-body); font-size: var(--fs-md); color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.input[disabled], .select[disabled], .textarea[disabled] {
  background: var(--surface-3); color: var(--text-3); cursor: not-allowed;
}
.textarea { min-height: 112px; resize: vertical; line-height: 1.65; }
.select {
  appearance: none; cursor: pointer; padding-right: var(--sp-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B98A6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--sp-4) center;
}
.registration-multi-select { position: relative; width: 100%; }
.registration-multi-select > summary { position: relative; cursor: pointer; list-style: none; padding-right: var(--sp-7); background-image: none; }
.registration-multi-select > summary::marker { content: ''; }
.registration-multi-select > summary::-webkit-details-marker { display: none; }
.registration-multi-select > summary::after { content: ''; position: absolute; right: var(--sp-4); top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400); transform: translateY(-65%) rotate(45deg); transition: transform var(--dur-fast) var(--ease-out); }
.registration-multi-select[open] > summary::after { transform: translateY(-25%) rotate(225deg); }
.registration-multi-select.is-disabled > summary { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; }
.registration-multi-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 248px; overflow-y: auto; padding: var(--sp-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-md); }
.registration-multi-option { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-2) var(--sp-2); cursor: pointer; border-radius: var(--r-xs); }
.registration-multi-option:hover { background: var(--surface-2); }
.registration-multi-option input { flex: 0 0 auto; }
.input-lg { min-height: 56px; padding-inline: var(--sp-5); font-size: var(--fs-lg); border-radius: var(--r-md); }
.input-sm { min-height: 38px; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); }

/* 带图标的输入 */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-left: 46px; }
.input-wrap .input-icon {
  position: absolute; left: var(--sp-4); display: grid; place-items: center;
  color: var(--ink-400); pointer-events: none;
}
.input-wrap .input-icon svg { width: 18px; height: 18px; }
.input-wrap .input-action {
  position: absolute; right: var(--sp-2); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-xs); color: var(--text-3);
}
.input-wrap .input-action:hover { background: var(--surface-3); color: var(--text); }
.input-wrap.has-action .input { padding-right: 48px; }

/* 勾选 / 单选 */
.check, .radio { display: inline-flex; align-items: flex-start; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); }
.check input, .radio input {
  appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out);
}
.check input { border-radius: var(--r-xs); }
.radio input { border-radius: 50%; }
.check input:checked, .radio input:checked {
  background: var(--accent); border-color: var(--accent);
}
.check input:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' 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;
}
.radio input:checked { box-shadow: inset 0 0 0 3.5px var(--surface); }
.check input:focus-visible, .radio input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.switch input { appearance: none; position: relative; width: 42px; height: 24px; margin: 0; cursor: pointer;
  background: var(--ink-200); border-radius: var(--r-full); transition: background var(--dur-base) var(--ease-out); }
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: var(--white); border-radius: 50%; box-shadow: var(--sh-1);
  transition: transform var(--dur-base) var(--ease-out);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

/* 验证码 / 分隔输入 */
.code-input { display: flex; gap: var(--sp-2); }
.code-input input {
  width: 46px; height: 54px; text-align: center; font-family: var(--font-mono);
  font-size: var(--fs-xl); font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.code-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* 上传区 */
.uploader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); min-height: 132px; padding: var(--sp-5);
  background: var(--surface-2); border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md); cursor: pointer; text-align: center;
  transition: all var(--dur-fast) var(--ease-out);
}
.uploader:hover { border-color: var(--accent); background: var(--accent-soft); }
.uploader svg { width: 26px; height: 26px; color: var(--ink-400); }
.uploader-thumb { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.uploader-thumb img { width: 100%; height: 100%; object-fit: cover; }
.uploader-thumb .remove {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 26px; height: 26px; display: grid; place-items: center;
  background: rgba(5, 9, 13, .68); color: #fff; border-radius: 50%;
}

/* 分段控件 */
.segment {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--r-sm);
}
.segment button {
  padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-2); border-radius: var(--r-xs);
  transition: all var(--dur-fast) var(--ease-out);
}
.segment button:hover { color: var(--text); }
.segment button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
body[data-role="buyer"] .segment button.is-active { color: var(--accent-buyer-ink); }

/* Tab 下划线 */
.tabs { display: flex; gap: var(--sp-6); border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative; padding: var(--sp-3) 0; white-space: nowrap;
  font-size: var(--fs-md); font-weight: 600; color: var(--text-3);
  transition: color var(--dur-fast) var(--ease-out);
}
.tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }

/* 筛选条 */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.filters .input, .filters .select { min-height: 40px; width: auto; min-width: 168px; }

/* 筛选胶囊（状态/分类筛选） */
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  padding: 6px 14px; font-size: var(--fs-sm); cursor: pointer;
  border: 1px solid var(--border-soft); border-radius: var(--r-full);
  background: var(--surface);
  transition: all var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------------------------------------------------------------------
   7. 卡片与面板
   --------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); padding: var(--sp-5);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.card-hover:hover { border-color: var(--border); box-shadow: var(--sh-2); transform: translateY(-2px); }
.card-pad-lg { padding: var(--sp-6); }
.card-flush { padding: 0; overflow: hidden; }

.card-head {
  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);
}
.card-head h3, .card-head .h5 { font-size: var(--fs-lg); }
.card-body { padding: var(--sp-5); }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border-soft); background: var(--surface-2);
}

/* 深色卡：用于数据高亮与品牌叙事区 */
.card-dark {
  background: var(--ink-900); color: var(--text-invert);
  border-color: transparent; position: relative; overflow: hidden;
}
.card-dark .card-head { border-color: rgba(255, 255, 255, .1); }
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: var(--text-invert); }
.card-dark .muted { color: var(--text-invert-2); }

/* 角括号装饰：工业感细节，四角细线 */
.bracket { position: relative; }
.bracket::before, .bracket::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--accent); opacity: .55;
}
.bracket::before { top: 10px; left: 10px; border-top: 1.5px solid; border-left: 1.5px solid; }
.bracket::after { bottom: 10px; right: 10px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

/* 统计数字块 */
.stat { display: flex; flex-direction: column; gap: var(--sp-2); }
.stat-label { font-size: var(--fs-sm); color: var(--text-2); }
.stat-value {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-4xl);
  line-height: 1; letter-spacing: -0.035em;
}
.stat-value .unit { font-size: var(--fs-lg); font-weight: 600; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }
.stat-delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; }
/* 中国习惯：涨红跌绿 */
.up   { color: #D6353C; }
.down { color: #0FA968; }

/* 图标容器 */
.icon-box {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink);
  flex: 0 0 auto;
}
.icon-box svg { width: 21px; height: 21px; }
.icon-box.is-dark { background: rgba(255, 255, 255, .08); color: var(--text-invert); }
.icon-box.is-info { background: var(--info-soft); color: var(--info); }
.icon-box.is-warn { background: var(--warning-soft); color: var(--warning); }
.icon-box.is-danger { background: var(--danger-soft); color: var(--danger); }
.icon-box.is-violet { background: var(--violet-soft); color: var(--violet); }
.icon-box.is-lg { width: 56px; height: 56px; border-radius: var(--r-md); }
.icon-box.is-lg svg { width: 26px; height: 26px; }

/* 头像 */
.avatar {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 700; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: var(--fs-xs); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
.avatar-xl { width: 76px; height: 76px; font-size: var(--fs-2xl); }

/* ---------------------------------------------------------------------------
   8. 标记：徽标 / 标签 / 状态点
   --------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.5;
  border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2);
  border: 1px solid transparent; white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge-accent  { background: var(--accent-soft);   color: var(--accent-ink); }
.badge-info    { background: var(--info-soft);     color: var(--info); }
.badge-success { background: var(--success-soft);  color: var(--success); }
.badge-warning { background: var(--warning-soft);  color: #A9690A; }
.badge-danger  { background: var(--danger-soft);   color: var(--danger); }
.badge-violet  { background: var(--violet-soft);   color: var(--violet); }
.badge-dark    { background: var(--ink-900);       color: var(--text-invert); }
.badge-outline { background: transparent; border-color: var(--border); color: var(--text-2); }
.badge-lg { padding: 5px 12px; font-size: var(--fs-sm); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.dot-live { position: relative; }
.dot-live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: .4; animation: pulse 1.8s var(--ease-soft) infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }

/* 角标 */
.tag-corner {
  position: absolute; top: 0; left: 0; z-index: 2;
  padding: 4px 12px 4px 10px; font-size: var(--fs-xs); font-weight: 700;
  color: var(--white); background: var(--accent-buyer);
  border-radius: var(--r-md) 0 var(--r-sm) 0;
}

/* ---------------------------------------------------------------------------
   9. 数据表格
   --------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th {
  position: sticky; top: 0; z-index: 2;
  padding: var(--sp-3) var(--sp-4); text-align: left; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tr-wide);
  text-transform: uppercase; color: var(--text-3);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.table td {
  padding: var(--sp-4); vertical-align: middle;
  border-bottom: 1px solid var(--border-soft); color: var(--text-2);
}
.table tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.is-selected { background: var(--accent-soft); }
.table .cell-strong { color: var(--text); font-weight: 600; }
.table .cell-actions { display: flex; gap: var(--sp-3); white-space: nowrap; }
/* 行内编辑列表（商品分类等）：操作链接组等距右对齐、hover 下划线沿用 .btn-link；
   间距 12px，过窄屏自动换行，避免「重命名添加二级在此发布删除」挤成一团 */
.row-list-item .cell-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-3, 12px); flex-wrap: wrap; white-space: normal;
}
.row-list-item .cell-actions .btn-link { flex: 0 0 auto; }
.table-compact th, .table-compact td { padding: var(--sp-2) var(--sp-3); }
.table-sticky-foot tfoot td {
  position: sticky; bottom: 0; background: var(--surface-2);
  border-top: 1px solid var(--border); font-weight: 600;
}

/* 分页 */
.pager { display: flex; align-items: center; gap: var(--sp-2); }
.pager button, .pager span {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 var(--sp-2);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface);
  transition: all var(--dur-fast) var(--ease-out);
}
.pager button:hover { border-color: var(--ink-400); color: var(--text); }
.pager button[aria-current="page"] { background: var(--ink-900); border-color: var(--ink-900); color: var(--text-invert); }
.pager button[disabled] { opacity: .4; pointer-events: none; }

/* 面包屑 */
.breadcrumb { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-3); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .5; }

/* ---------------------------------------------------------------------------
   10. 弹层：Modal / Drawer / Dropdown / Toast
   --------------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center; padding: var(--sp-5);
  background: rgba(6, 14, 20, .5); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
.overlay.is-open { opacity: 1; visibility: visible; }
/* hidden 属性优先于 display:grid，避免遮罩无法隐藏 */
.overlay[hidden] { display: none; }

.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3);
  transform: translateY(16px) scale(.98); opacity: 0;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.overlay.is-open .modal { transform: none; opacity: 1; }
.modal-wide { max-width: 760px; }
.modal-narrow { max-width: 400px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
}
.modal-head h3 { font-size: var(--fs-xl); }
.modal-body { padding: 0 var(--sp-5) var(--sp-5); overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border-soft); background: var(--surface-2);
}

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(460px, 92vw); display: flex; flex-direction: column;
  background: var(--surface); box-shadow: var(--sh-3);
  transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out);
}
.drawer.is-open { transform: none; }
.drawer-left { right: auto; left: 0; transform: translateX(-100%); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: var(--z-sticky);
  min-width: 190px; padding: var(--sp-2);
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); box-shadow: var(--sh-2);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all var(--dur-fast) var(--ease-out);
}
.dropdown-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  padding: var(--sp-3); font-size: var(--fs-sm); color: var(--text-2);
  border-radius: var(--r-xs); text-align: left;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu .divider { height: 1px; background: var(--border-soft); margin: var(--sp-2) 0; }
.dropdown-menu svg { width: 16px; height: 16px; }

/* Toast */
.toast-stack {
  position: fixed; top: var(--sp-5); left: 50%; transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-2);
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5); font-size: var(--fs-sm); font-weight: 500;
  background: var(--ink-900); color: var(--text-invert);
  border-radius: var(--r-full); box-shadow: var(--sh-3);
  animation: toast-in var(--dur-base) var(--ease-out);
}
.toast svg { width: 17px; height: 17px; }
.toast.is-out { animation: toast-out var(--dur-base) var(--ease-out) forwards; }
.toast-success svg { color: var(--accent); }
.toast-error   svg { color: #FF7B7D; }
.toast-warning svg { color: #FFC24D; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* ---------------------------------------------------------------------------
   11. 状态：步骤条 / 空态 / 骨架 / 进度
   --------------------------------------------------------------------------- */
.steps { display: flex; align-items: flex-start; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); position: relative; text-align: center; }
.steps li::before {
  content: ""; position: absolute; top: 17px; left: calc(-50% + 20px); right: calc(50% + 20px);
  height: 2px; background: var(--border); transition: background var(--dur-slow) var(--ease-out);
}
.steps li:first-child::before { display: none; }
.steps .step-dot {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 36px; height: 36px;
  font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 700;
  background: var(--surface); color: var(--text-3);
  border: 2px solid var(--border); border-radius: 50%;
  transition: all var(--dur-base) var(--ease-out);
}
.steps .step-text { font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); }
.steps .step-sub { font-size: var(--fs-xs); color: var(--text-3); }
.steps li.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: #04241A; }
.steps li.is-done::before { background: var(--accent); }
.steps li.is-active .step-dot {
  border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--accent-soft);
}
.steps li.is-active .step-text { color: var(--text); }
.steps li.is-done .step-text { color: var(--text-2); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-9) var(--sp-5); text-align: center;
}
.empty-art {
  display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: var(--sp-2);
  border-radius: var(--r-xl); background: var(--surface-3); color: var(--ink-300);
}
.empty-art svg { width: 34px; height: 34px; }
.empty h4 { font-size: var(--fs-lg); }
.empty p { font-size: var(--fs-sm); color: var(--text-3); max-width: 36ch; }

/* 加载/空态占位行（接口数据填充前的容器占位） */
.empty-tip { padding: var(--sp-5); text-align: center; color: var(--text-3); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--ink-100) 37%, var(--surface-3) 63%);
  background-size: 400% 100%; border-radius: var(--r-xs);
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.progress { height: 6px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit;
  transition: width var(--dur-slow) var(--ease-out); }

/* 提示条 */
.notice {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4); font-size: var(--fs-sm); line-height: 1.65;
  background: var(--info-soft); color: #1B5DA8;
  border-radius: var(--r-sm); border-left: 3px solid var(--info);
}
.notice svg { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; }
.notice-warning { background: var(--warning-soft); color: #8A5A05; border-color: var(--warning); }
.notice-danger  { background: var(--danger-soft);  color: #A8262A; border-color: var(--danger); }
.notice-success { background: var(--success-soft); color: #06603C; border-color: var(--success); }

/* 描述列表 */
.desc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-5); }
.desc-item dt { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: var(--sp-1); }
.desc-item dd { font-size: var(--fs-md); color: var(--text); font-weight: 500; }

/* 时间线 */
.timeline { position: relative; padding-left: var(--sp-6); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1.5px; background: var(--border); }
.timeline li { position: relative; padding-bottom: var(--sp-5); list-style: none; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-6) + 3px); top: 6px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong);
}
.timeline li.is-done::before { background: var(--accent); border-color: var(--accent); }
.timeline li.is-active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------------------------------------------------------------------------
   12. 氛围与动效
   --------------------------------------------------------------------------- */
/* 渐变光晕：铺在页面背景层，制造空气感 */
.atmosphere { position: relative; isolation: isolate; }
.atmosphere::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58rem 36rem at 8% -12%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%),
    radial-gradient(46rem 34rem at 102% 4%, rgba(46, 138, 245, .14), transparent 58%),
    radial-gradient(40rem 30rem at 50% 108%, rgba(124, 92, 255, .10), transparent 60%);
}
body[data-role="buyer"].atmosphere::before {
  background:
    radial-gradient(48rem 32rem at 12% -8%, color-mix(in srgb, var(--accent-buyer) 18%, transparent), transparent 60%),
    radial-gradient(40rem 30rem at 96% 8%, rgba(232, 147, 12, .14), transparent 58%);
}

/* 细颗粒噪点：叠加在深色区，避免大面积纯色发闷 */
.grain::after {
  content: ""; position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 网格地平线：工业感背景纹理 */
.grid-lines {
  background-image:
    linear-gradient(to right, rgba(10, 31, 44, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 31, 44, .055) 1px, transparent 1px);
  background-size: 56px 56px;
}
.grid-lines-dark {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* 入场序列：一次编排好的错峰显现 */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal[data-delay="1"] { transition-delay: 70ms; }
.reveal[data-delay="2"] { transition-delay: 140ms; }
.reveal[data-delay="3"] { transition-delay: 210ms; }
.reveal[data-delay="4"] { transition-delay: 280ms; }
.reveal[data-delay="5"] { transition-delay: 350ms; }
.reveal[data-delay="6"] { transition-delay: 420ms; }

/* 页面级入场 */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.enter { animation: fade-up var(--dur-slow) var(--ease-out) both; }
.enter-1 { animation-delay: 60ms; }  .enter-2 { animation-delay: 130ms; }
.enter-3 { animation-delay: 200ms; } .enter-4 { animation-delay: 270ms; }
.enter-5 { animation-delay: 340ms; } .enter-6 { animation-delay: 410ms; }

/* 跑马灯 */
.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: var(--sp-8); padding-right: var(--sp-8); flex: 0 0 auto; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* 悬停抬升 */
.lift { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.lift:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }

/* 降级：尊重系统偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------------
   13. 响应式
   --------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --fs-7xl: 62px; --fs-6xl: 50px; }
}

@media (max-width: 768px) {
  :root { --sp-9: 64px; --sp-10: 80px; --fs-7xl: 44px; --fs-6xl: 38px; --fs-5xl: 34px; }
  .container { padding-inline: var(--sp-4); }
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .g-auto { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-4); }
  .desc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
  .hide-sm { display: none !important; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; }
  .steps li::before { top: 14px; }
  .steps .step-dot { width: 30px; height: 30px; font-size: var(--fs-xs); }
  .steps .step-text { font-size: var(--fs-xs); }
}

@media (max-width: 480px) {
  .desc-list { grid-template-columns: minmax(0, 1fr); }
  .card { padding: var(--sp-4); }
  .card-body { padding: var(--sp-4); }
}

/* ---------------------------------------------------------------------------
   14. 注册流程共用组件：会员套餐 / 审核结果 / OCR 识别 / 微信登录
   --------------------------------------------------------------------------- */

/* --- 14.1 会员套餐：深色玻璃面板 + 网格 + 流光扫描（科技感 · 外贸版式） --- */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-5); }
.plan {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-5); cursor: pointer; text-align: left;
  color: var(--text-invert);
  background: linear-gradient(168deg, #13222E 0%, #0A1F2C 56%, #06151D 100%);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--r-lg);
  transition: transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
/* 顶部高光细线 */
.plan::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 80%, transparent), transparent);
  opacity: .45; transition: opacity var(--dur-base) var(--ease-out);
}
/* 网格底纹，营造仪表盘质感 */
.plan::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000, transparent 72%);
}
.plan > * { position: relative; z-index: 1; }

.plan:hover { transform: translateY(-4px); box-shadow: 0 20px 44px -18px rgba(5, 12, 18, .7); }
.plan.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -18px color-mix(in srgb, var(--accent) 55%, transparent);
}
.plan.is-active::before { opacity: 1; }

/* 流光扫描：只在选中/推荐款上流动 */
.plan-sweep { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.plan-sweep::before {
  content: ""; position: absolute; top: -70%; left: -35%; width: 55%; height: 240%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
  transform: rotate(16deg);
  animation: plan-sweep 4.2s var(--ease-soft) infinite;
}
@keyframes plan-sweep { 0% { left: -35%; } 60%, 100% { left: 120%; } }

.plan-tag {
  position: absolute; top: 0; right: 0; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .06em;
  color: #04241A; background: var(--accent);
  border-radius: 0 var(--r-lg) 0 var(--r-sm);
}
body[data-role="buyer"] .plan-tag { color: var(--white); }
.plan-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  animation: pulse 1.8s var(--ease-soft) infinite;
}

/* 外贸规格条：等宽数字，制造报价单质感 */
.plan-spec {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .04em;
  color: rgba(233, 242, 246, .62);
}
.plan-spec b { color: var(--accent); font-weight: 700; }
.plan-spec .sp-sep { color: rgba(255, 255, 255, .22); }

.plan-name { font-family: var(--font-display); font-size: var(--fs-lg); letter-spacing: -0.02em; color: var(--text-invert); }
.plan-en { font-family: var(--font-mono); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: rgba(233, 242, 246, .45); }

.plan .price {
  display: flex; align-items: baseline; gap: 3px; margin-top: var(--sp-1);
  font-family: var(--font-display); font-size: 40px; font-weight: 700;
  letter-spacing: -0.045em; line-height: 1.05; color: var(--text-invert);
  font-variant-numeric: tabular-nums;
}
.plan .price .cur { font-size: var(--fs-xl); font-weight: 600; color: var(--accent); letter-spacing: 0; }
.plan .price .per { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500; color: rgba(233, 242, 246, .55); letter-spacing: 0; }
.plan .price-origin { font-family: var(--font-mono); font-size: var(--fs-xs); color: rgba(233, 242, 246, .40); text-decoration: line-through; }

.plan ul { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); }
.plan li {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  font-size: var(--fs-sm); line-height: 1.55; color: rgba(233, 242, 246, .82);
}
.plan li svg {
  width: 15px; height: 15px; margin-top: 3px; flex: 0 0 auto; color: var(--accent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent));
}
.plan .plan-cta {
  margin-top: auto; padding-top: var(--sp-4);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-sm); font-weight: 600; color: rgba(233, 242, 246, .48);
}
.plan.is-active .plan-cta { color: var(--accent); }
.plan .plan-cta svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan .price { font-size: 34px; }
}

/* --- 14.2 审核结果：环形进度 + 描边对勾 + 脉冲光环 --- */
.result-icon.is-live {
  position: relative; isolation: isolate; pointer-events: none;
  width: 118px; height: 118px; background: transparent; box-shadow: none; color: var(--accent);
}
.result-icon.is-live .rp-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-track { fill: none; stroke: color-mix(in srgb, var(--accent) 16%, transparent); stroke-width: 3.5; }
.rp-arc {
  fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 76 251;
  transform-box: fill-box; transform-origin: center;
  animation: rp-spin 1.5s linear infinite;
}
@keyframes rp-spin { to { transform: rotate(360deg); } }
.rp-tick {
  fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 64; stroke-dashoffset: 64;
  transform-box: fill-box; transform-origin: center; transform: rotate(90deg);
  animation: rp-tick .66s var(--ease-out) .45s forwards;
}
@keyframes rp-tick { to { stroke-dashoffset: 0; } }
.rp-halo {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0;
  animation: rp-halo 2.6s var(--ease-out) infinite;
}
.rp-halo.is-delay { animation-delay: 1.3s; }
@keyframes rp-halo {
  0% { transform: scale(.8); opacity: .5; }
  70% { transform: scale(1.16); opacity: 0; }
  100% { opacity: 0; }
}
.rp-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.rp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: rp-bounce 1.3s var(--ease-soft) infinite; }
.rp-dots i:nth-child(2) { animation-delay: .16s; }
.rp-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes rp-bounce {
  0%, 100% { transform: translateY(0); opacity: .35; }
  50% { transform: translateY(-7px); opacity: 1; }
}

/* --- 14.3 OCR 识别上传：上传 → 扫描 → 回填可改 --- */
.ocr {
  position: relative; overflow: hidden;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  background: var(--surface-2);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.ocr:hover { border-color: var(--accent); }
.ocr[data-state="scanning"] { border-color: var(--accent); background: var(--accent-soft); }
.ocr[data-state="done"] {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--surface);
}
.ocr input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }

.ocr-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); min-height: 150px; padding: var(--sp-5); text-align: center; cursor: pointer;
}
.ocr-drop .ocr-ico { width: 28px; height: 28px; color: var(--ink-400); }
.ocr-drop b { font-size: var(--fs-md); }
.ocr-drop .field-hint { max-width: 34ch; line-height: 1.6; }
.ocr:hover .ocr-drop .ocr-ico { color: var(--accent); }

.ocr-preview { position: relative; aspect-ratio: 16 / 9; background: var(--ink-900); overflow: hidden; }
.ocr-preview img { width: 100%; height: 100%; object-fit: cover; }
/* 识别中的扫描线与网格，模拟 OCR 取景 */
.ocr-scanfx { position: absolute; inset: 0; pointer-events: none; }
.ocr[data-state="scanning"] .ocr-scanfx::before {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 20px var(--accent);
  animation: ocr-scan 1.25s var(--ease-soft) infinite;
}
@keyframes ocr-scan { 0%, 100% { top: 8%; } 50% { top: 90%; } }
.ocr[data-state="scanning"] .ocr-scanfx::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 26px 26px;
}
.ocr-corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--accent); opacity: .9; }
.ocr-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.ocr-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.ocr-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.ocr-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.ocr-status {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); font-weight: 600;
  border-top: 1px solid var(--border-soft); background: var(--surface);
}
.ocr-status svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ocr[data-state="scanning"] .ocr-status { color: var(--accent-ink); background: var(--accent-soft); }
.ocr[data-state="done"] .ocr-status { color: var(--success); background: var(--success-soft); }
.ocr-status .ocr-spin, .ocr-status .ocr-ok { display: none; }
.ocr[data-state="scanning"] .ocr-status .ocr-spin { display: block; }
.ocr[data-state="done"] .ocr-status .ocr-ok { display: block; }
.ocr-status .ocr-spin {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite;
}
.ocr-status .ocr-ok { width: 16px; height: 16px; flex: 0 0 auto; }
.ocr-status .ocr-txt { flex: 1; min-width: 0; }

/* 识别结果字段：等宽值，提示可在上方表单中修改 */
.ocr-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-4); border-top: 1px solid var(--border-soft);
}
.ocr-fields .of { display: flex; align-items: baseline; gap: var(--sp-3); font-size: var(--fs-sm); min-width: 0; }
.ocr-fields .of-k { color: var(--text-3); flex: 0 0 auto; }
.ocr-fields .of-v {
  font-family: var(--font-mono); font-weight: 600; color: var(--text);
  text-align: right; margin-left: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ocr-note {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-xs); color: var(--text-3);
  background: var(--surface-2); border-top: 1px solid var(--border-soft);
}
.ocr-note svg { width: 14px; height: 14px; flex: 0 0 auto; }

@media (max-width: 560px) {
  .ocr-fields { grid-template-columns: minmax(0, 1fr); }
}

/* --- 14.4 微信登录按钮 --- */
.btn-wechat { --btn-bg: #07C160; --btn-fg: var(--white); --btn-bd: #07C160; }
.btn-wechat:hover {
  --btn-bg: #06A855; --btn-bd: #06A855;
  box-shadow: 0 8px 22px -8px rgba(7, 193, 96, .6);
}
.btn-wechat svg { width: 20px; height: 20px; }
.btn-wechat-outline { --btn-bg: transparent; --btn-fg: #06A855; --btn-bd: rgba(7, 193, 96, .38); }
.btn-wechat-outline:hover { --btn-bg: rgba(7, 193, 96, .07); --btn-bd: #07C160; }

/* 第三方登录仅微信时：单列居中 */
.social-single { display: flex; justify-content: center; }
.social-single .btn { min-width: 260px; }

/* 打印：去掉装饰层 */
@media print {
  .atmosphere::before, .grain::after { display: none; }
  .card { box-shadow: none; border-color: #ccc; }
  .plan-sweep, .rp-arc, .rp-halo, .rp-dots i { animation: none !important; }
}

/* 分类横幅标题：深色背景上强制白字（覆盖继承/缓存样式） */
.cat-banner, .cat-banner h2, .cat-banner h3, .cat-banner p { color: #fff; }
.cat-banner p { opacity: .9; }
[hidden]{display:none !important}
/* H5 弹窗适配：小屏弹窗收窄全宽、不留 PC 空边 */
@media (max-width: 480px) {
  .modal, .modal-wide, .modal-narrow { width: calc(100vw - 32px) !important; max-width: calc(100vw - 32px) !important; margin: 0 auto; }
  .modal .modal-head, .modal .modal-body, .modal .modal-foot { padding-left: 14px !important; padding-right: 14px !important; }
}

/* Expanded mobile choices stay in flow so the next selector remains reachable. */
@media (max-width: 720px) { .registration-multi-menu { position: static; margin-top: 6px; } }
