/* =========================================================
   seekchinasupply.com — 极简风格供应商分类展示站
   ========================================================= */
:root {
  --ink: #0f172a;
  --muted: #5f6b7a;
  --line: #e5e9ef;
  --page: #f7f8fa;
  --card: #ffffff;
  --accent: #ff6a00;
  --accent-deep: #e85d00;
  --accent-soft: #fff3ea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-md: 0 10px 32px rgba(15, 23, 42, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; color: var(--ink); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部细条 ---------- */
.topbar {
  background: #fbfbfd;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a:hover { color: var(--accent); }
/* auth.js 按登录态切换的入口显隐（.btn 是 inline-flex，会盖掉 hidden 的默认样式） */
[data-auth-guest][hidden], [data-auth-user][hidden] { display: none !important; }
.topbar-links { display: flex; gap: 20px; }
/* 营销页顶栏内的语言切换：覆盖登录页 .lang-switch 的绝对定位，作为普通行内项 */
.topbar-links .lang-switch { position: static; top: auto; right: auto; padding: 0; border: 0; background: transparent; gap: 4px; }
.topbar-links .lang-switch:hover { border: 0; box-shadow: none; color: var(--accent); }

/* ---------- 页头 ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; height: 66px; gap: 34px; }
.brand { font-size: 21px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); white-space: nowrap; }
.brand em { font-style: normal; color: var(--accent); }
.brand i { font-style: normal; font-weight: 600; font-size: 15px; color: #a3adb9; letter-spacing: 0; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-link { color: var(--muted); transition: color .15s; }
.nav-link:hover { color: var(--ink); }
.nav-link.on { color: var(--ink); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; padding-left: 24px; border-left: 1px solid var(--line); }

/* ---------- 按钮 / 输入 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 6px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; }

.input {
  height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; outline: none; width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 106, 0, .12); }
.select {
  height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; outline: none; font-size: 13px;
  color: var(--ink); cursor: pointer;
}
.select:focus { border-color: var(--accent); }

/* ---------- 首屏 Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 300px at 15% -10%, rgba(255, 106, 0, .06), transparent),
    linear-gradient(180deg, #ffffff, #f7f9fc);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.hero-kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.hero h1 { font-size: 42px; line-height: 1.2; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.sub { margin: 14px auto 0; max-width: 560px; color: var(--muted); font-size: 15px; }

.search-wrap {
  margin-top: 30px; display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow-md);
}
.search-wrap input { flex: 1; height: 44px; border: 0; outline: 0; padding: 0 16px; font-size: 15px; min-width: 0; }
.search-wrap .btn { height: 44px; padding: 0 26px; border-radius: 8px; }

.hot-words { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.hot-words b { font-weight: 600; }
.hot-words a { color: var(--muted); padding: 2px 10px; border-radius: 999px; transition: all .15s; }
.hot-words a:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------- 数据条 ---------- */
.stats { border-bottom: 1px solid var(--line); background: #fff; padding: 22px 0; }
.stats .container { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section.page-bg { background: var(--page); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: 26px; }
.section-head .sub-title { color: var(--muted); font-size: 14px; margin-top: 4px; }
.link-more { font-size: 14px; color: var(--muted); white-space: nowrap; }
.link-more:hover { color: var(--accent); }
.link-more::after { content: "→"; margin-left: 6px; }

/* ---------- 分类宫格 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: all .18s; display: block;
}
.cat-tile:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-tile h3 { font-size: 18px; margin-bottom: 2px; }
.cat-tile .en { font-size: 12px; color: #9aa5b1; letter-spacing: .4px; text-transform: uppercase; }
.cat-tile .cnt { display: inline-flex; margin-top: 16px; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.cat-tile:hover .cnt { color: var(--accent); border-color: rgba(255, 106, 0, .4); background: var(--accent-soft); }

/* ---------- Tab 切换 ---------- */
.tabs { display: inline-flex; background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.tabs button { padding: 7px 18px; border-radius: 999px; font-size: 14px; color: var(--muted); font-weight: 600; transition: all .15s; }
.tabs button.on { background: var(--ink); color: #fff; }

/* ---------- 供应商卡片（首页宫格） ---------- */
.sup-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sup-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: all .18s; position: relative;
}
.sup-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sup-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.logo {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 10px; color: #fff;
  font-size: 20px; font-weight: 800; letter-spacing: -.5px;
  position: relative; overflow: hidden;
}
/* logo 字段非空时渲染的图片：铺满占位块，加载失败 onerror 移除后露出字母占位 */
.logo .logo-img,
.p-thumb .logo-img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
}
/* 公司方标是纯字标，裁切无妨 */
.logo .logo-img { object-fit: cover; }
/* 产品图铺满 118px 横条（对齐源项目）：cover 裁切铺满，透明底露出分类渐变兜底 */
.p-thumb .logo-img { object-fit: cover; background: transparent; z-index: 0; }
.sup-name { font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sup-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sup-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sup-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 12px; }
.stars { position: relative; color: #dfe4ea; font-size: 12px; letter-spacing: 2px; }
.stars .fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--accent); }
.sup-bottom .rate { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sup-bottom .rate b { color: var(--accent); font-size: 14px; font-weight: 800; margin-right: 2px; }
.view-link { font-size: 13px; font-weight: 700; color: var(--ink); }
.view-link::after { content: "→"; margin-left: 5px; color: var(--accent); }

/* ---------- 标签徽章 ---------- */
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #eef1f5; color: #45505e; white-space: nowrap;
}
.chip.factory { background: var(--ink); color: #fff; }
.chip.trader { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.chip.verified { background: var(--accent-soft); color: var(--accent-deep); }
.chip.verified::before { content: "✓ "; font-weight: 800; }

/* ---------- 价值主张 ---------- */
.band-dark { background: var(--ink); color: #fff; padding: 56px 0; }
.band-dark .section-head h2 { color: #fff; }
.band-dark .sub-title, .band-dark .section-head .sub-title { color: rgba(255, 255, 255, .55); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius); padding: 24px; transition: all .18s;
}
.feat:hover { background: rgba(255, 255, 255, .09); transform: translateY(-3px); }
.feat .no { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--accent); }
.feat h3 { color: #fff; font-size: 17px; margin: 8px 0 6px; }
.feat p { color: rgba(255, 255, 255, .6); font-size: 14px; }

.cta-band { background: linear-gradient(120deg, var(--accent), #ff9648); padding: 0; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 44px 0; flex-wrap: wrap;
}
.cta-inner h2 { color: #fff; font-size: 28px; }
.cta-inner p { color: rgba(255, 255, 255, .92); margin-top: 6px; font-size: 15px; }
.cta-inner .btn-dark { background: #fff; color: var(--accent-deep); }
.cta-inner .btn-dark:hover { background: #fff5ec; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: #fbfbfd; }
.footer-top { display: grid; grid-template-columns: 1.7fr 1.15fr 1fr 1fr 1fr 1.2fr; gap: 28px; padding: 48px 0 36px; }
.foot-about { font-size: 13px; color: var(--muted); line-height: 1.9; margin-bottom: 10px; }
.foot-more { font-size: 13px; font-weight: 700; color: var(--ink); }
.foot-more:hover { color: var(--accent); }
.foot-more::after { content: "→"; margin-left: 5px; color: var(--accent); }
.foot-contact li { margin-bottom: 8px; color: var(--muted); font-size: 13px; }

/* ---------- About / Contact 页面 ---------- */
.text-block { max-width: 880px; margin: 0 auto; text-align: center; }
.text-block .lead { color: var(--muted); font-size: 15px; line-height: 2; margin-top: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: left; transition: all .18s; }
.m-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.m-card .no { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.m-card h3 { font-size: 16px; margin: 8px 0 6px; }
.m-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.page-cta { margin-top: 30px; }
.footer .brand { font-size: 19px; }
.footer-tagline { color: var(--muted); font-size: 13px; max-width: 300px; margin-top: 12px; line-height: 1.8; }
.foot-col h4 { font-size: 14px; margin-bottom: 14px; }
.foot-col li { margin-bottom: 10px; }
.foot-col a { font-size: 13px; color: var(--muted); }
.foot-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #9aa5b1; flex-wrap: wrap; }

/* ---------- 列表页：页头 ---------- */
.page-head { padding: 36px 0 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, #f7f9fc); }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumb a:hover { color: var(--accent); }
.page-head h1 { font-size: 30px; }
.page-head p.desc { color: var(--muted); font-size: 14px; margin-top: 8px; }
.head-search { max-width: 560px; margin-top: 18px; display: flex; gap: 8px; }

/* ---------- 列表页布局 ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; padding: 28px 0 60px; align-items: start; }
.aside { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.aside + .aside { margin-top: 16px; }
.aside-title { font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.aside-title span { font-size: 12px; color: #9aa5b1; font-weight: 500; }
.flist { margin: 8px 0; }
.flist li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; font-size: 14px; color: var(--muted); border-radius: 6px; transition: all .12s;
}
.flist li a:hover { color: var(--ink); background: var(--page); }
.flist li a.on { color: var(--accent-deep); font-weight: 700; background: var(--accent-soft); }
.flist li a .num { font-size: 12px; color: #a3adb9; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); background: #fff; transition: all .12s;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.aside .btn { width: 100%; margin-top: 14px; }
.field-label { font-size: 13px; color: var(--muted); margin: 14px 0 8px; font-weight: 600; }
.field-label:first-of-type { margin-top: 0; }

/* ---------- 结果工具条 + 列表 ---------- */
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.result-bar .count { font-size: 14px; color: var(--muted); }
.result-bar .count b { color: var(--ink); font-size: 16px; }
.result-bar .controls { display: flex; gap: 10px; align-items: center; }
.row-list { display: flex; flex-direction: column; gap: 16px; }
.company-row {
  display: flex; align-items: center; gap: 20px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: all .18s;
}
.company-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.company-row .logo { width: 76px; height: 76px; font-size: 30px; border-radius: 14px; flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-title h3 { font-size: 18px; }
.row-title h3:hover { color: var(--accent); }
.row-desc {
  margin-top: 8px; color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7;
}
.row-foot { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-side { flex: none; text-align: right; min-width: 130px; }
.row-side .geo { font-size: 12px; color: var(--muted); }
.row-side .founded { font-size: 12px; color: #9aa5b1; margin-top: 2px; }
.row-side .btn { margin-top: 10px; }
.row-side .stars { display: inline-block; font-size: 11px; margin-top: 8px; }

/* ---------- 空状态 ---------- */
.empty { background: #fff; border: 1px dashed #d6dce3; border-radius: var(--radius); padding: 64px 20px; text-align: center; }
.empty b { display: block; font-size: 16px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- 公司详情 ---------- */
.company-profile {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow-sm); margin-top: 28px;
}
.profile-top { display: flex; gap: 24px; align-items: flex-start; }
.profile-top .logo { width: 92px; height: 92px; font-size: 36px; border-radius: 18px; flex: none; }
.profile-info { flex: 1; min-width: 0; }
.profile-info h1 { font-size: 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.profile-meta { color: var(--muted); font-size: 13px; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; flex: none; }
.profile-actions .btn { min-width: 150px; }
.profile-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px;
}
.profile-stats .p-stat { text-align: center; }
.profile-stats b { display: block; font-size: 20px; font-weight: 800; }
.profile-stats span { font-size: 12px; color: var(--muted); }

.body-grid { display: grid; grid-template-columns: 1fr 330px; gap: 22px; padding: 24px 0 64px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); position: relative; }
.card h2::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 34px; height: 3px; background: var(--accent); border-radius: 2px; }
.card p.body-text { color: var(--muted); font-size: 14px; line-height: 2; }

/* ---------- Main Products 卡片 ----------
   对齐源项目：产品名直接压在图片上，图片区固定 118px、文字贴左下角。 */
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.p-item {
  display: flex; flex-direction: column; background: #fff; color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: all .15s;
}
.p-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
/* 图片区：铺满，产品名压在图片左下角（对齐源项目 .p-thumb） */
.p-thumb {
  position: relative; height: 118px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 14px;
  color: #fff; font-size: 15px; font-weight: 700;
}
/* 底部压暗层：图片偏亮时白色产品名仍清晰 */
.p-thumb::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  background: linear-gradient(to top, rgba(15, 23, 42, .72), rgba(15, 23, 42, 0));
  z-index: 1; pointer-events: none;
}
.p-item .p-cap {
  position: relative; z-index: 2; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}
.p-thumb .idx {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: #fff; opacity: .85;
}
/* MOQ 行 */
.p-item .p-moq {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 12px; color: var(--muted);
  background: #fff;
}
.p-item .p-moq b { color: var(--accent-deep); font-weight: 700; white-space: nowrap; }

.cert-list li {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--line); font-size: 14px;
}
.cert-list li:last-child { border-bottom: none; }
/* 认证资质：数据过多时内部纵向滚动（滚动区域高度由 JS 按「资料完整度」卡高度对齐） */
.cert-list { max-height: 320px; overflow-y: auto; padding-right: 6px; }
.cert-list::-webkit-scrollbar { width: 6px; }
.cert-list::-webkit-scrollbar-thumb { background: #d7dde6; border-radius: 999px; }
.cert-list::-webkit-scrollbar-track { background: transparent; }
.cert-list .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.cert-list .cert-name { flex: 1; font-weight: 600; }
.cert-list .cert-exp { flex: none; font-style: normal; font-size: 12px; color: var(--muted); }

/* ---------- Factory Gallery 卡片 ----------
   供应商后台上传的工厂实拍图（数量不固定）。4:3 裁切保持整排等高铁线，
   与产品卡同为 3 列节奏；图注选填，没填就只有图。整卡在无图时由 JS 隐藏。 */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gal-item { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: all .15s; }
.gal-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.gal-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f6f7f9; }
.gal-item figcaption { padding: 9px 12px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

.info-list li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.info-list li:last-child { border-bottom: none; }
.info-list .k { color: var(--muted); flex: none; }
.info-list .v { text-align: right; font-weight: 600; color: var(--ink); word-break: break-all; }
/* 未登录：联系方式锁定行（点击走「登录后查看」引导） */
.info-list li.info-locked { cursor: pointer; border-bottom-style: solid; }
.info-list li.info-locked .k { color: var(--muted); }
.info-list li.info-locked .v { color: var(--accent-deep); font-weight: 700; }
.info-list li.info-locked:hover .v { color: var(--accent); }

.contact-card { background: var(--accent-soft); border-color: rgba(255, 106, 0, .25); }
.contact-card h2::before { background: var(--ink); }
.contact-card p { font-size: 13px; color: #8a4a12; margin-bottom: 16px; }
.contact-card .btn { width: 100%; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: 13px; padding: 12px 20px;
  border-radius: 8px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
  box-shadow: var(--shadow-md); max-width: 90%;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 登录 / 注册页 ---------- */
.auth-page { background: var(--page); min-height: 100vh; display: flex; flex-direction: column; }
.auth-header { background: #fff; border-bottom: 1px solid var(--line); }
.auth-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.auth-back { font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-back:hover { color: var(--accent); }
.auth-back::before { content: "← "; }

.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card {
  width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 34px; box-shadow: var(--shadow-md);
}
.auth-kicker { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.auth-card h1 { font-size: 26px; margin: 6px 0 4px; }
.auth-card p.sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.auth-note {
  background: var(--accent-soft); border: 1px dashed rgba(255, 106, 0, .4);
  padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.7;
  color: #8a4a12; margin-bottom: 18px;
}

.field { display: block; margin-bottom: 14px; }
.field > span { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field .forgot { font-size: 12px; font-weight: 600; color: var(--accent-deep); }
.auth-card .input { height: 44px; }

.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 64px; }
.toggle-pw {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 5px 9px; font-size: 12px; font-weight: 600; color: var(--muted);
  border-radius: 6px; transition: all .12s;
}
.toggle-pw:hover { color: var(--accent); background: var(--accent-soft); }

.row-opt { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 2px 0 18px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }

.auth-submit { width: 100%; height: 46px; font-size: 15px; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 46px; font-size: 15px; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03); transition: all .15s;
}
.btn-google:hover { border-color: #c4cbd5; background: #fafbfc; box-shadow: var(--shadow-sm); }
.btn-google:active { background: #f1f3f5; }

/* 注册页左右分栏（宽卡） */
.auth-card-wide {
  max-width: 960px; padding: 0; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
}
.auth-visual { position: relative; min-height: 100%; background: var(--ink); }
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-visual .veil { position: absolute; inset: 0; background: linear-gradient(195deg, rgba(9, 14, 26, .08) 38%, rgba(9, 14, 26, .66) 100%); }
.auth-visual .v-inner { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; color: #fff; }
.auth-visual .v-inner .v-mini { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.auth-visual .v-inner h3 { color: #fff; font-size: 22px; line-height: 1.35; margin-top: 8px; }
.auth-visual .v-inner p { color: rgba(255, 255, 255, .8); font-size: 13px; margin-top: 8px; line-height: 1.7; }
.v-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.v-tags span { border: 1px solid rgba(255, 255, 255, .5); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.auth-form-side { position: relative; padding: 38px 40px; min-width: 0; }
/* 单栏宽卡（忘记密码页：只有表单，无右侧配图） */
.auth-card-wide.auth-single { grid-template-columns: 1fr; max-width: 560px; }

/* 表单区右上角：中英文切换 */
.lang-switch {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; line-height: 1;
  font-size: 12px; font-weight: 800; color: var(--muted);
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent-deep); box-shadow: var(--shadow-sm); }
.lang-switch .ls-opt { padding: 1px 2px; border-radius: 999px; }
.lang-switch .ls-opt.on { color: var(--accent-deep); }
.lang-switch .ls-sep { color: #c4cbd5; font-weight: 600; }
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 860px) {
  .auth-card-wide { grid-template-columns: 1fr; }
  /* 窄屏时配图回到顶部，保证首屏视觉 */
  .auth-visual { min-height: 230px; order: -1; }
}
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #9aa5b1; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch b { color: var(--accent-deep); font-weight: 700; cursor: pointer; }
.auth-switch b:hover { text-decoration: underline; }

.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.role-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.role-row > span { display: block; width: 100%; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.role-chip { position: relative; flex: 1; min-width: calc(50% - 4px); }
.role-chip input { position: absolute; opacity: 0; pointer-events: none; }
.role-chip span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  height: 42px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer; transition: all .12s;
}
.role-chip span:hover { border-color: var(--ink); color: var(--ink); }
.role-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
.term { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.term input { accent-color: var(--accent); margin-top: 3px; width: 14px; height: 14px; flex: none; }
.term a { color: var(--accent-deep); font-weight: 600; }
.term a:hover { text-decoration: underline; }

/* ---------- 登录页身份切换（采购商 / 工厂） ---------- */
.role-hint {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; line-height: 1.75; color: var(--muted);
  background: var(--page); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin: -6px 0 16px; transition: all .15s;
}
.role-hint b { color: var(--ink); font-weight: 700; }
.role-hint .rh-ico {
  flex: none; width: 18px; height: 18px; border-radius: 999px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--ink);
}
.role-hint[data-role="buyer"] { border-color: rgba(255, 106, 0, .35); background: var(--accent-soft); color: #8a4a12; }
.role-hint[data-role="buyer"] b { color: var(--accent-deep); }
.role-hint[data-role="buyer"] .rh-ico { background: var(--accent); }
.role-hint[data-role="supplier"] { border-color: rgba(15, 23, 42, .18); background: #f4f7fb; color: #33415c; }
.role-hint[data-role="supplier"] .rh-ico { background: var(--ink); }

/* 身份切换联动：切换时轻微提示 */
.auth-card .role-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-card[data-role="supplier"] .btn-google { border-color: var(--line); }
.auth-card[data-role="supplier"] .auth-submit { background: var(--ink); }
.auth-card[data-role="supplier"] .auth-submit:hover { background: #1e293b; }


/* ---------- 工厂入驻注册页（signup-factory） ---------- */
.form-sec {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--ink);
  margin: 24px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.form-sec:first-child { margin-top: 0; }
.form-sec > b {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--accent-deep); background: var(--accent-soft);
}
.form-sec > em {
  font-style: normal; margin-left: auto; font-size: 11px; font-weight: 600;
  color: #9aa5b1; letter-spacing: .3px;
}

/* 必填标记（左对齐，避免被 space-between 推到右侧） */
.field > span.req { justify-content: flex-start; }
.field > span .rq { color: var(--accent); font-weight: 800; margin-left: 3px; }
.field > span em.opt {
  font-style: normal; font-weight: 600; font-size: 11px; color: #9aa5b1; letter-spacing: .3px;
}
.field-tip { font-size: 12px; line-height: 1.7; color: var(--muted); margin: -8px 0 14px; }

/* 下拉框 */
select.input { appearance: auto; padding-right: 28px; cursor: pointer; }

/* 短信 / 图形验证码行 */
.sms-row, .captcha-row { display: flex; gap: 8px; }
.sms-row .input, .captcha-row .input { flex: 1; min-width: 0; }
.sms-row .btn { flex: none; height: 44px; padding: 0 14px; font-size: 13px; }
.sms-row .btn:disabled { opacity: .55; cursor: not-allowed; }
.captcha-box {
  flex: none; width: 100px; height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: linear-gradient(135deg, #f4f7fb, #eef2f7);
  display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  cursor: pointer; user-select: none; overflow: hidden;
}
.captcha-box i {
  font-style: normal; font-size: 17px; font-weight: 800; letter-spacing: 0;
  color: #33415c; font-family: "Courier New", Courier, monospace;
  display: inline-block; transition: transform .12s;
}
.captcha-box:hover { border-color: var(--accent); }

/* 条件显示的字段（如主营品类「以上都不是」时出现的输入框） */
.field[hidden] { display: none; }

/* 主营品类多选标签 */
.chip-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; color: var(--muted); cursor: pointer; transition: all .12s;
}
.chip-check span:hover { border-color: var(--ink); color: var(--ink); }
.chip-check input:checked + span {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); font-weight: 700;
}
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 三选一行（企业类型） */
.role-chip-3 { min-width: calc(33.333% - 6px); }

/* 密码强度条 */
.pw-meter { display: flex; align-items: center; gap: 6px; margin: -6px 0 14px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 999px; background: var(--line); transition: background .15s; }
.pw-meter span { flex: none; min-width: 52px; text-align: right; font-size: 11px; color: var(--muted); }
.pw-meter[data-level="1"] i:nth-child(1) { background: #e85d00; }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: #f0a500; }
.pw-meter[data-level="3"] i { background: #0d9488; }

/* ---------- 分步表单（signup-factory 两步：企业信息 / 联系人与账号） ---------- */
/* 步骤头：第 1 步 / 第 2 步 并排（勿用 .steps，避免与 company 页的 ol.steps 冲突） */
.step-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.step-tabs.cols-3 { grid-template-columns: repeat(3, 1fr); }
.step-tab {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.step-tab .num {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; font-style: normal;
  color: #9aa5b1; background: var(--page); border: 1px solid var(--line); transition: all .15s;
}
.step-tab .txt { min-width: 0; }
.step-tab .txt b { display: block; font-size: 13px; font-weight: 800; color: var(--ink); }
.step-tab .txt em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }
.step-tab:hover { border-color: #c4cbd5; }
.step-tab.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 106, 0, .1); }
.step-tab.active .num { color: #fff; background: var(--accent); border-color: var(--accent); }
.step-tab.done { background: #fffdfa; }
.step-tab.done .num { color: var(--accent-deep); background: var(--accent-soft); border-color: var(--accent); }

/* 未启用 JS 时两步内容全部平铺展示，不影响直接填写提交 */
.steps-form .step-pane { display: block; }
.steps-form.steps-ready .step-pane { display: none; }
.steps-form.steps-ready .step-pane.active { display: block; animation: stepIn .22s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step-nav { display: flex; gap: 10px; margin-top: 6px; }
.step-nav .btn { height: 46px; font-size: 14px; }
.step-nav .btn-ghost::before { content: "← "; }
.step-nav .auth-submit { flex: 1; width: auto; }
.steps-form #fcPrev, .steps-form #fcNext { display: none; }
.steps-form.steps-ready #fcNext { display: inline-flex; flex: 1; }
.steps-form.steps-ready #fcPrev { display: inline-flex; flex: none; padding: 0 18px; }
.steps-form.steps-ready #fcSubmit { flex: 1; }
.steps-form.steps-ready[data-step="1"] #fcSubmit { display: none; }
.steps-form.steps-ready[data-step="1"] #fcPrev { display: none; }
.steps-form.steps-ready[data-step="2"] #fcNext { display: none; }

/* 忘记密码页同样三步逻辑（买家 / 工厂通用），按钮 id 不同故单独声明 */
.steps-form #fpPrev, .steps-form #fpNext { display: none; }
.steps-form.steps-ready #fpNext { display: inline-flex; flex: 1; }
.steps-form.steps-ready #fpPrev { display: inline-flex; flex: none; padding: 0 18px; }
.steps-form.steps-ready #fpSubmit { flex: 1; }
.steps-form.steps-ready[data-step="1"] #fpPrev { display: none; }
.steps-form.steps-ready[data-step="3"] #fpNext { display: none; }
.steps-form.steps-ready[data-step="1"] #fpSubmit,
.steps-form.steps-ready[data-step="2"] #fpSubmit { display: none; }

/* 第 2 步内的子标题（验证与协议） */
.form-sec-sub { font-size: 12px; font-weight: 700; color: var(--muted); border-bottom-style: dashed; margin-top: 22px; }

@media (max-width: 560px) {
  .step-tabs, .step-tabs.cols-3 { grid-template-columns: 1fr; }
  .step-nav { flex-wrap: wrap; }
}


@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; }
  .auth-grid-2 { grid-template-columns: 1fr; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .cat-grid, .sup-grid { grid-template-columns: repeat(3, 1fr); }
  .p-grid { grid-template-columns: repeat(2, 1fr); }
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .body-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .profile-top { flex-wrap: wrap; }
  .profile-actions { flex-direction: row; width: 100%; }
  .profile-actions .btn { flex: 1; }
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .header-actions { margin-left: 0; padding-left: 0; border-left: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 32px; }
  .feat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cat-grid, .sup-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .container { gap: 32px; }
  .company-row { flex-wrap: wrap; }
  .company-row .row-side { text-align: left; min-width: 0; width: 100%; }
  .result-bar { flex-wrap: wrap; }
  .p-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: 1fr; }
}

/* ---------- 首页 About ---------- */
.about-band { padding: 64px 0; background: #fff; }
.about-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.about-kicker { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.about-inner h2 { font-size: 28px; line-height: 1.3; margin-top: 14px; }
.about-inner p { color: var(--muted); font-size: 15px; margin-top: 16px; line-height: 2; }
.about-tags { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.about-tags span { border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.about-tags span:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- 登录 / 注册页页脚 ---------- */
.auth-footer { border-top: 1px solid var(--line); background: #fff; }
.auth-footer .container { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; padding: 18px 20px; font-size: 12px; color: #9aa5b1; }
.auth-links { display: flex; gap: 18px; }
.auth-footer a { color: #9aa5b1; }
.auth-footer a:hover { color: var(--accent); }

/* ---------- Help Center ---------- */
textarea.input { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.help-wrap { max-width: 900px; margin: 0 auto; padding: 44px 20px 76px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.faq-item.open { border-color: rgba(255, 106, 0, .45); box-shadow: var(--shadow-sm); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; padding: 16px 18px; font-size: 15px; font-weight: 600; color: var(--ink); }
.faq-item.open .faq-q { color: var(--accent-deep); }
.faq-icon { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--page); transition: all .2s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--muted); border-radius: 2px; }
.faq-icon::before { width: 10px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 1.5px; height: 10px; transform: translate(-50%, -50%); transition: transform .2s; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--accent-soft); border-color: rgba(255, 106, 0, .5); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }
.faq-item.open .faq-icon::before { background: var(--accent-deep); }
.faq-a { display: none; padding: 0 18px 16px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.faq-item.open .faq-a { display: block; }
.faq-a a { color: var(--accent-deep); font-weight: 600; }
.faq-a a:hover { text-decoration: underline; }

.help-contact { display: grid; grid-template-columns: 300px 1fr; gap: 30px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-top: 44px; box-shadow: var(--shadow-sm); }
.contact-info h3 { font-size: 15px; margin-bottom: 6px; }
.contact-info > p { color: var(--muted); font-size: 13px; margin-bottom: 16px; line-height: 1.8; }
.contact-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.contact-item:last-of-type { border-bottom: none; }
.contact-item .ic { flex: none; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.contact-item b { display: block; font-size: 14px; }
.contact-item span { display: block; color: var(--muted); font-size: 13px; word-break: break-all; }
.help-form h3 { font-size: 19px; margin-bottom: 4px; }
.help-form > p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.help-form .btn { width: 100%; height: 46px; margin-top: 4px; }
@media (max-width: 760px) {
  .help-contact { grid-template-columns: 1fr; }
}

/* ---------- Sourcing Guide ---------- */
.guide-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 34px 20px 72px; align-items: start; }
.guide-nav {
  position: sticky; top: 84px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.guide-nav-title { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.guide-toc li + li { margin-top: 2px; }
.guide-toc a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  font-size: 13px; color: var(--muted); border-radius: 7px; transition: all .12s;
}
.guide-toc a span { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--page); color: #9aa5b1; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.guide-toc a:hover { color: var(--ink); background: var(--page); }
.guide-toc a:hover span { background: var(--accent-soft); color: var(--accent-deep); }

.guide-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.g-section { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; scroll-margin-top: 84px; }
.g-section .g-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.g-section h2 { font-size: 22px; }
.g-section .g-lead { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 8px 0 18px; }
.g-section .g-sub { font-size: 16px; margin: 22px 0 12px; }

.steps { counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.steps li::before {
  content: counter(step); counter-increment: step; flex: none;
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.steps li b { display: block; font-size: 14px; }
.steps li span { display: block; color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 2px; }

.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; transition: all .15s; }
.cmp-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.cmp-card .cmp-tag { display: inline-flex; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; align-items: center; margin-bottom: 10px; }
.cmp-tag.factory { background: var(--ink); color: #fff; }
.cmp-tag.trader { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.cmp-card h3 { font-size: 16px; margin-bottom: 10px; }

.tick-list { display: flex; flex-direction: column; gap: 9px; }
.tick-list li { position: relative; padding-left: 26px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tick-list li b { color: var(--ink); font-weight: 700; }

.g-tip { display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; background: var(--accent-soft); border: 1px dashed rgba(255, 106, 0, .4); border-radius: 9px; font-size: 13px; color: #8a4a12; line-height: 1.7; }
.g-tip b { font-weight: 700; }
.g-tip .chip { flex: none; height: 18px; font-size: 10px; }

.gloss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gloss-grid.three { grid-template-columns: repeat(3, 1fr); }
.gloss { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; transition: all .15s; }
.gloss:hover { border-color: var(--accent); }
.gloss b { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.gloss span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.7; margin-top: 4px; }

@media (max-width: 860px) {
  .guide-wrap { grid-template-columns: 1fr; }
  .guide-nav { position: static; }
  .guide-toc { display: flex; flex-wrap: wrap; gap: 4px; }
  .guide-toc a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; }
  .guide-toc a span { display: none; }
  .cmp { grid-template-columns: 1fr; }
  .gloss-grid, .gloss-grid.three { grid-template-columns: 1fr; }
}

/* ---------- M4 账号：验证码行 / 登录态 header ---------- */
.code-wrap { display: flex; gap: 8px; align-items: stretch; }
.code-wrap .input { flex: 1; min-width: 0; }
.btn-code {
  flex: none; height: 44px; padding: 0 16px; font-size: 13px; font-weight: 700;
  color: var(--accent-deep); background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 0, .35); border-radius: 8px; cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.btn-code:hover:not(:disabled) { border-color: var(--accent); }
.btn-code:disabled { opacity: .6; cursor: not-allowed; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.auth-slot { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.auth-slot .nav-link { white-space: nowrap; }
.auth-slot .nav-user {
  font-size: 13px; font-weight: 700; color: var(--ink);
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth-slot .nav-user + .nav-link { margin-left: 6px; }

/* =========================================================
   工厂端工作台（dashboard-factory.html）
   ========================================================= */
.dash-page { background: var(--page); }

/* ---------- 顶栏 ---------- */
.dash-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  height: 62px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.dash-burger { display: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; align-items: center; justify-content: center; }
.dash-burger svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.dash-top .brand { font-size: 19px; }
.dash-tag { font-size: 12px; font-weight: 700; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); }
.dash-search { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dash-search .input { width: 260px; height: 34px; font-size: 13px; }
.dash-lang { position: static; }
.dash-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.dash-bell:hover { border-color: var(--accent); color: var(--accent-deep); }
.dash-bell svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.dash-bell b { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.dash-me { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.dash-ava { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #0f172a, #3b4a63); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.dash-me-txt b { display: block; font-size: 13px; line-height: 1.35; }
.dash-me-txt em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.dash-exit { flex: none; }

/* ---------- 骨架：左菜单 + 右内容 ---------- */
.dash-wrap { display: grid; grid-template-columns: 240px 1fr; align-items: start; }

.dash-side {
  position: sticky; top: 62px; align-self: start;
  height: calc(100vh - 62px); overflow-y: auto;
  background: #fff; border-right: 1px solid var(--line); padding: 16px 14px 22px;
}
.dash-factory { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: linear-gradient(180deg, #fbfbfd, #fff); }
.df-top { display: flex; gap: 10px; align-items: flex-start; }
.df-logo { flex: none; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #ff6a00, #ff9d54); color: #fff; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.df-txt { min-width: 0; }
.df-txt b { display: block; font-size: 13px; line-height: 1.4; }
.df-txt em { display: block; font-style: normal; font-size: 11px; color: var(--accent-deep); margin-top: 2px; }
.df-meter { height: 5px; border-radius: 999px; background: #eef1f5; margin: 12px 0 8px; overflow: hidden; }
.df-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ff9d54); }
.df-foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.df-pct { color: var(--accent-deep); font-size: 12px; }
.df-foot a { margin-left: auto; color: var(--accent-deep); font-weight: 700; }

.dash-nav { margin-top: 16px; }
.dash-nav-title { font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: #a3adb9; padding: 12px 10px 6px; }
.dash-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  font-size: 14px; color: var(--muted); font-weight: 600; transition: all .13s;
}
.dash-link svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.dash-link:hover { background: var(--page); color: var(--ink); }
.dash-link.on { background: var(--accent-soft); color: var(--accent-deep); }
.dash-link.on svg { stroke: var(--accent-deep); }
.dash-dot { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.dash-side-foot { margin-top: 18px; padding: 12px 10px 0; border-top: 1px dashed var(--line); }
.dash-side-link { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink); }
.dash-side-link:hover { color: var(--accent-deep); }
.dash-side-link i { font-style: normal; color: var(--accent); }

.dash-main { padding: 24px 26px 60px; min-width: 0; }
.dash-view[hidden] { display: none; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-size: 23px; }
.dash-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dash-head-act { display: flex; gap: 8px; }

/* ---------- 卡片 / 栅格 ---------- */
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow-sm); }
.dash-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin: 16px 0; }
.dash-cols > .dash-card + .dash-card { margin-top: 0; }
.dash-card + .dash-card { margin-top: 16px; }
.dc-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.dc-head h2 { font-size: 15px; }
.dc-head-sub { margin-top: 22px; }
.dc-more { font-size: 12px; font-weight: 700; color: var(--accent-deep); background: none; }
.dc-note { font-size: 12px; color: var(--muted); }
.dc-num { font-size: 15px; color: var(--accent-deep); }
.dc-head-tools { align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.dc-head-tools .input-sm { width: 220px; height: 34px; font-size: 13px; }

/* 分段切换 */
.seg { display: inline-flex; padding: 3px; background: var(--page); border-radius: 9px; gap: 2px; }
.seg button { height: 28px; padding: 0 12px; border: 0; background: transparent; cursor: pointer; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--shadow-sm); }
.kpi span { display: block; font-size: 12px; color: var(--muted); }
.kpi b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin: 6px 0 4px; }
.kpi em { display: block; font-style: normal; font-size: 11px; color: #9aa5b1; }
.kpi .up { color: #0f9d58; font-weight: 700; }
.kpi .down { color: #d33a2c; font-weight: 700; }
.kpi .flat { color: #9aa5b1; }
.kpi.hot b { color: var(--accent); }
.kpi.hot em { color: var(--accent-deep); font-weight: 700; }

/* ---------- 图表 / 条形 ---------- */
.chart-box svg { width: 100%; height: 220px; display: block; }
.chart-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.bar-list { display: flex; flex-direction: column; gap: 13px; }
.bar-row { font-size: 12px; }
.bar-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bar-top span { color: var(--ink); font-weight: 600; }
.bar-top b { color: var(--muted); font-weight: 600; }
.bar-track { height: 7px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0f172a, #47536b); }
.chart-sum { display: flex; gap: 28px; padding: 0 0 12px 34px; }
.chart-sum span { display: flex; flex-direction: column; gap: 2px; }
.chart-sum em { font-style: normal; font-size: 11px; color: var(--muted); }
.chart-sum b { font-size: 17px; font-weight: 800; color: var(--ink); }
.donut-box { display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.donut-box svg { width: 132px; height: 132px; display: block; }
.bar-row:nth-child(1) .bar-track i { background: linear-gradient(90deg, var(--accent), #ff9d54); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.dash-table th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: #9aa5b1; padding: 0 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.dash-table td { padding: 13px 12px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #fbfbfd; }
.dash-table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.td-strong { font-weight: 700; color: var(--ink); }
.td-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.td-msg { color: var(--muted); font-size: 12.5px; line-height: 1.6; max-width: 300px; }
.td-role { font-size: 12px; color: var(--muted); }
.td-act { display: flex; gap: 6px; white-space: nowrap; }
.td-num { font-weight: 700; }
/* 表格里的「头像 + 姓名」单元格（账号设置子账号列表） */
.td-user { display: flex; align-items: center; gap: 10px; }
.td-user .ii-ava { width: 30px; height: 30px; font-size: 11.5px; }
/* 手机号、时间等数字信息用等宽数字，纵向更齐 */
.td-mono { font-variant-numeric: tabular-nums; letter-spacing: .2px; }

/* 产品列表：商品缩略图 */
.td-prod { display: flex; align-items: center; gap: 11px; }
.td-prod-t { min-width: 0; }
.prod-thumb {
  flex: none; width: 46px; height: 46px; border-radius: 9px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .07);
}
.prod-thumb img { width: 100%; height: 100%; display: block; }
.prod-thumb img.photo { object-fit: cover; }
.prod-thumb img.shape { object-fit: contain; padding: 5px; }
.empty-tip { padding: 34px 0; text-align: center; color: #9aa5b1; font-size: 13px; }

/* 状态徽章 */
.st { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef1f5; color: #45505e; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.new { background: var(--accent-soft); color: var(--accent-deep); }
.st.replied { background: #eaf2ff; color: #1d4ed8; }
.st.quoted { background: #f1ecfe; color: #6d28d9; }
.st.won { background: #e7f6ee; color: #0f9d58; }
.st.invalid, .st.off, .st.idle { background: #f4f5f7; color: #8c96a3; }
.st.live { background: #e7f6ee; color: #0f9d58; }
.st.pending { background: #fff6e5; color: #b45309; }
.st.active { background: #e7f6ee; color: #0f9d58; }

/* ---------- 小统计行 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-cell { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-cell span { font-size: 12px; color: var(--muted); }
.stat-cell b { display: block; font-size: 20px; font-weight: 800; margin-top: 4px; }
.stat-cell i { font-style: normal; font-size: 11px; color: #9aa5b1; }
.stat-cell.hot b { color: var(--accent); }

/* ---------- 概览：最新询盘 ---------- */
.inq-mini { display: flex; flex-direction: column; }
.inq-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.inq-item:last-child { border-bottom: none; padding-bottom: 0; }
/* 首字母头像：概览页最新询盘与账号设置子账号表格共用 */
.ii-ava { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #eef1f5; color: #45505e; font-size: 12px; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; justify-content: center; }
.inq-item .ii-body { min-width: 0; flex: 1; }
.inq-item b { font-size: 13.5px; }
.inq-item em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }
.inq-item p { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inq-item .ii-side { flex: none; text-align: right; font-size: 11px; color: #9aa5b1; }
.unread-mark { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }

/* ---------- 概览：待办 / 关键词 ---------- */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; transition: all .13s; }
.todo-item:hover { border-color: var(--accent); background: #fffaf6; }
.todo-item .tk { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.todo-item .tk.ok { background: #0f9d58; }
.todo-item .tk.gray { background: #c2c9d2; }
.todo-item .tt { flex: 1; min-width: 0; }
.todo-item .td-due { flex: none; font-style: normal; font-size: 11px; font-weight: 700; color: #b45309; background: #fff6e5; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.todo-item b { margin-left: auto; color: var(--accent-deep); font-size: 12px; }
.kw-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.kw-chip b { color: var(--ink); font-weight: 700; font-size: 11px; }
.kw-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.kw-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.kw-empty { font-size: 12.5px; color: var(--muted); }

/* ---------- 企业资料 ---------- */
.big-meter { height: 9px; border-radius: 999px; background: #eef1f5; overflow: hidden; margin: 4px 0 16px; }
.big-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ff9d54); }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.check-list li::before { content: "✓"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #e7f6ee; color: #0f9d58; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.check-list li.todo::before { content: "!"; background: #fff6e5; color: #b45309; }
.check-list li b { color: var(--ink); font-weight: 600; }
.check-list li a { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent-deep); }

.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.cert-item .ci-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cert-item b { display: block; font-size: 13px; }
.cert-item span { font-size: 11.5px; color: var(--muted); }
.cert-item .ci-st { margin-left: auto; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; }
.info-grid dt { font-size: 11.5px; color: #9aa5b1; font-weight: 700; letter-spacing: .4px; }
.info-grid dd { font-size: 13.5px; margin-top: 3px; word-break: break-word; }
.info-grid .full { grid-column: 1 / -1; }
.info-grid .full dd { color: var(--muted); line-height: 1.8; }

/* 工厂图册：与产品缩略图同尺寸，上传入口用同一方块保证整站一致 */
.gal-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.gal-add i { font-style: normal; font-size: 18px; color: #c4cbd5; }
.gal-add:hover { border-color: var(--accent); color: var(--accent-deep); }
.gal-add:hover i { color: var(--accent); }

/* 编辑企业资料：认证资质动态行 */
.cert-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.cert-row { display: grid; grid-template-columns: 1fr 170px 34px; gap: 10px; align-items: center; }
.cert-del {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; transition: .15s;
}
.cert-del:hover { border-color: #dc2626; color: #dc2626; }
.cert-add { margin-bottom: 6px; }
.cert-add + .field-tip { margin-top: 0; }
@media (max-width: 720px) {
  .cert-row { grid-template-columns: 1fr 140px 34px; gap: 8px; }
}
@media (max-width: 560px) {
  .cert-row { grid-template-columns: 1fr 34px; }
  .cert-row .cert-name { grid-column: 1 / -1; }
}

/* ---------- 富文本内容（企业简介 about） ----------
   字段是其他系统同步维护的富文本（boss 编辑器 + 导入脚本），本站只显示不改写，
   内容原样进 innerHTML。这里只兜底块级默认样式：字号/颜色/高亮等由内联 style 自带。 */
.rich { line-height: 1.8; word-break: break-word; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 10px; }
.rich ul, .rich ol { margin: 6px 0 10px; padding-left: 22px; }
.rich li { margin: 3px 0; }
.rich h3, .rich h4 { margin: 14px 0 8px; font-size: 15px; }
.rich blockquote {
  margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--line);
  color: var(--muted); background: #fafbfc;
}
.rich a { color: var(--accent-deep); text-decoration: underline; }
/* 后台「企业信息」卡里嵌一块富文本，字号跟其余 dd 对齐 */
.info-grid .rich { font-size: 13.5px; color: var(--muted); }

/* 工作台「企业简介」只读展示块（不可编辑，仅呈现） */
.rich-box {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #fafbfc; min-height: 60px; font-size: 13.5px; color: var(--ink);
}
.rich-box:empty::before { content: "—"; color: #9aa5b1; }

/* ---------- 账号设置 ---------- */
/* 通知列表条目少、账号安全行偏长，这一页的两列比默认栅格更均衡 */
[data-dash-panel="account"] .dash-cols { grid-template-columns: 1.35fr 1fr; }
.switch-list { display: flex; flex-direction: column; }
.switch-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.switch-item:last-child { border-bottom: none; padding-bottom: 2px; }
.switch-txt { flex: 1; min-width: 0; }
.switch-txt b { display: block; font-size: 13.5px; font-weight: 600; }
.switch-txt span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.switch { flex: none; width: 42px; height: 24px; border: 0; cursor: pointer; border-radius: 999px; background: #dfe4ea; position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }
.switch:hover { background: #d3dae3; }
.switch.on:hover { background: var(--accent-deep); }

.link-list { display: flex; flex-direction: column; }
.link-list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.link-list li:last-child { border-bottom: none; padding-bottom: 2px; }
/* 每行左侧的图标块，与卡片圆角、侧栏图标风格保持一致 */
.link-list .ll-ico {
  flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--page);
  display: flex; align-items: center; justify-content: center; color: #6b7787; transition: all .13s;
}
.link-list .ll-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.link-list .ll-txt { flex: 1; min-width: 0; }
.link-list .btn { flex: none; min-width: 88px; }
.link-list li:hover .ll-ico { background: var(--accent-soft); color: var(--accent-deep); }

/* 子账号表格：给内容较短的列定个上限，避免手机号列吃掉多余横向空间 */
#teamTable .dash-table th:nth-child(1) { width: 26%; }
#teamTable .dash-table th:nth-child(3) { width: 17%; }
#teamTable .dash-table th:nth-child(4) { width: 18%; }
#teamTable .dash-table th:nth-child(5) { width: 11%; }
/* 手机号与登录时间优先保证单行，窄屏宁可横向滚动也不要折行 */
#teamTable .dash-table td:nth-child(3), #teamTable .dash-table td:nth-child(4) { white-space: nowrap; }

/* ---------- 页脚 ---------- */
.dash-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 18px 26px; border-top: 1px solid var(--line); background: #fff; font-size: 12px; color: #9aa5b1; }
.dash-foot-links { display: flex; gap: 18px; }
.dash-foot a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1020px) {
  .dash-cols { grid-template-columns: 1fr; }
  .dash-search .input { width: 180px; }
  .dash-me-txt { display: none; }
}
@media (max-width: 900px) {
  .dash-wrap { grid-template-columns: 1fr; }
  .dash-burger { display: inline-flex; }
  .dash-side {
    position: fixed; left: 0; top: 62px; z-index: 55;
    width: 258px; max-width: 84vw; height: calc(100vh - 62px);
    transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: var(--shadow-md);
  }
  .dash-side.open { transform: none; }
  .dash-main { padding: 20px 16px 48px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .dash-top { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .dash-search { order: 5; width: 100%; margin-left: 0; }
  .dash-search .input { width: 100%; flex: 1; }
  .dash-tag { display: none; }
  .dash-cols, .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-head h1 { font-size: 20px; }
}

/* ---------- 供应商后台：新增产品表单（scs_supplier_product） ---------- */
.prod-form { padding: 22px 20px 4px; }
.prod-form .auth-grid-2 { gap: 0 16px; }
.prod-form em.field-tip {
  display: block; font-style: normal;
  margin: 6px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted);
}
.prod-form input[type="file"].input { height: auto; padding: 8px 12px; font-size: 13px; }

.pf-gallery { margin: -6px 0 16px; }
.pf-gallery[hidden] { display: none; }
.pf-thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
/* 工厂图册：数据过多时自适应多行平铺（企业资料页） */
[data-dash-panel="company"] .pf-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px;
}
[data-dash-panel="company"] .pf-thumbs .pf-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; }

.pf-thumb {
  position: relative; width: 116px; height: 116px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #f6f7f8; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.pf-thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-thumb:hover { border-color: #c9d2de; }
.pf-thumb.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 3px var(--accent);
}
.pf-thumb-badge {
  position: absolute; left: 0; bottom: 0; padding: 2px 8px;
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.6;
  color: #fff; background: var(--accent); border-top-right-radius: var(--radius-sm);
}
.pf-thumb-x {
  position: absolute; right: 4px; top: 4px; width: 20px; height: 20px;
  font-style: normal; font-size: 14px; line-height: 18px; text-align: center;
  color: #fff; background: rgba(15, 23, 42, .55); border-radius: 50%; cursor: pointer;
}
.pf-thumb-x:hover { background: rgba(15, 23, 42, .82); }

.pf-gallery-tip { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }

.prod-form-act {
  display: flex; justify-content: flex-end; gap: 10px;
  margin: 24px -20px 0; padding: 16px 20px;
  border-top: 1px solid var(--line);
}

/* ---------- 询盘弹窗（scs-modal） ---------- */
.scs-modal { position: fixed; inset: 0; z-index: 1200; display: none; }
.scs-modal.open { display: block; }
.scs-modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.scs-modal-box {
  position: relative; z-index: 1; width: min(92vw, 540px); max-height: 88vh; overflow: auto;
  margin: 6vh auto; background: #fff; border-radius: 14px; padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
}
.scs-modal-x {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; line-height: 28px;
  border: 0; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; border-radius: 8px;
}
.scs-modal-x:hover { background: #f1f5f9; color: var(--ink); }
.scs-modal-box h3 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.scs-modal-box .scs-modal-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.scs-modal-box .field { display: block; margin-bottom: 12px; }
.scs-modal-box .field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.scs-modal-box .field .rq { color: var(--accent); margin-left: 2px; }
.scs-modal-box textarea.input { min-height: 104px; resize: vertical; }
.scs-modal-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
/* 收藏/关注后的高亮态（产品卡与侧栏通用），!important 盖过 btn-ghost 的内联/默认背景 */
.btn.is-fav { border-color: var(--accent) !important; color: var(--accent-deep) !important; background: var(--accent-soft) !important; }

/* ---------- 顶栏全局搜索下拉 ---------- */
.dash-search-drop {
  position: absolute; z-index: 1300; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16); padding: 6px;
}
.dash-search-drop .dsd-item {
  display: flex; align-items: baseline; gap: 2px; padding: 9px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.dash-search-drop .dsd-item:hover, .dash-search-drop .dsd-item.on { background: var(--accent-soft); }
.dash-search-drop .dsd-name { font-weight: 600; }
.dash-search-drop .dsd-kw {
  color: var(--accent-deep); max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.st.read { background: #eef2f7; color: #5f6b7a; }
.st.closed { background: #f1f5f9; color: #94a3b8; }

/* =========================================================
   弹窗（账号安全：修改密码 / 更换登录邮箱）—— 与源项目同步
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px;
}
.modal[hidden] { display: none; }
body.modal-open { overflow: hidden; }

.modal-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .5);
  animation: modalMaskIn .18s ease-out;
}
@keyframes modalMaskIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative; z-index: 1;
  width: min(460px, 100%); max-height: calc(100vh - 48px);
  overflow-y: auto; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  animation: modalBoxIn .2s cubic-bezier(.22, .61, .36, 1);
}
@keyframes modalBoxIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 17px; margin: 0; }
.modal-x {
  flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm);
  font-size: 20px; line-height: 1; color: var(--muted); transition: all .15s;
}
.modal-x:hover { color: var(--ink); background: var(--page); }

.modal-body { padding: 20px; }
.modal-tip {
  padding: 10px 12px; margin-bottom: 16px;
  background: var(--accent-soft); border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.7; color: var(--muted);
}
.modal-tip:empty { display: none; }
/* 弹窗提示区的动态状态：默认（info 橙底）/ 校验失败或接口报错 / 发送成功 */
.modal-tip.err { background: #fdecea; color: #c0392b; }
.modal-tip.ok { background: #e7f6ee; color: #0f9d58; }

.modal-act {
  display: flex; justify-content: flex-end; gap: 10px;
  margin: 20px -20px -20px; padding: 16px 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .modal { padding: 16px 12px; }
  .modal-box { max-height: calc(100vh - 32px); }
  .modal-act .btn { flex: 1; }
}


/* ---------- 商品详情页（product.php，2026-09-28） ---------- */
.pd-main { display: grid; grid-template-columns: 470px 1fr; gap: 28px; padding: 26px 0 6px; align-items: start; }

.pd-stage {
  position: relative; min-height: 380px; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: flex-end; padding: 20px; color: #fff; overflow: hidden;
}
.pd-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pd-stage-cap { position: relative; z-index: 1; }
.pd-stage-cap b { display: block; font-size: 20px; font-weight: 800; }
.pd-stage-cap span { font-size: 12.5px; opacity: .82; }
.pd-stage.has-img { padding: 0; }
.pd-stage.has-img .pd-stage-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px; background: linear-gradient(transparent, rgba(15, 23, 42, .78)); }

.pd-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.pd-thumb {
  position: relative; height: 62px; border: 2px solid transparent; border-radius: var(--radius-sm);
  color: #fff; overflow: hidden; transition: border-color .15s; background: var(--page);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb span { position: absolute; left: 6px; bottom: 5px; font-size: 10.5px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pd-thumb.on, .pd-thumb:hover { border-color: var(--accent); }
.pd-gallery-tip { font-size: 12px; color: #9aa5b1; margin-top: 10px; }

.pd-buy h1 { font-size: 27px; line-height: 1.35; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pd-rate { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.pd-sold { color: var(--muted); }

.pd-price { font-size: 30px; font-weight: 800; color: var(--accent-deep); margin-top: 18px; letter-spacing: -.02em; }
.pd-price .unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.pd-price-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.tier-tip { font-size: 12px; color: var(--muted); margin-top: 8px; }

.pd-kv { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.pd-actions .btn { width: 100%; }
@media (max-width: 480px) { .pd-actions { grid-template-columns: 1fr; } }

.pd-supplier { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.pd-sup { display: flex; align-items: center; gap: 12px; }
.pd-sup .logo { width: 46px; height: 46px; border-radius: 10px; font-size: 19px; }
.pd-sup-txt { min-width: 0; }
.pd-sup-txt b { display: block; font-size: 14px; font-weight: 700; }
.pd-sup-txt > span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pd-sup-chips { display: flex; gap: 6px; margin-top: 6px; }
.pd-sup-link { width: 100%; margin-top: 12px; background: #fff; }

.pd-tabs-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.pd-tabs-note { font-size: 12px; color: #9aa5b1; }
.pd-panel[hidden] { display: none; }
.pd-panel .card > p { color: var(--muted); font-size: 14px; line-height: 1.95; }

.pd-list { margin-top: 14px; }
.pd-list li { position: relative; padding-left: 20px; font-size: 14px; color: var(--muted); line-height: 1.9; }
.pd-list li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--accent); }
.pd-note { font-size: 12.5px; color: #9aa5b1; margin-top: 14px; }
.pd-empty { font-size: 13.5px; color: var(--muted); }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th { width: 190px; text-align: left; vertical-align: top; padding: 11px 14px; background: var(--page); border-bottom: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

.pd-faq-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.pd-faq-item:last-child { border-bottom: none; }
.pd-faq-q {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-deep); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pd-faq-item b { display: block; font-size: 14px; margin-bottom: 4px; }
.pd-faq-item p { font-size: 13.5px; color: var(--muted); line-height: 1.85; }

.pd-rel-grid { grid-template-columns: repeat(3, 1fr); }
.pd-more { display: flex; flex-direction: column; gap: 12px; }
.pd-more-item { display: flex; align-items: center; gap: 11px; }
.pd-more-item:hover b { color: var(--accent); }
.pd-more-thumb {
  position: relative; overflow: hidden;
  flex: none; width: 44px; height: 44px; border-radius: 9px; color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.pd-more-thumb > span { position: relative; z-index: 1; }
.pd-more-thumb .logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.pd-more-txt { min-width: 0; }
.pd-more-txt b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.pd-more-txt i { font-style: normal; font-size: 12px; color: var(--muted); }

.pd-textarea { height: auto; min-height: 84px; padding: 10px 12px; line-height: 1.6; resize: vertical; }

@media (max-width: 1020px) {
  .pd-main { grid-template-columns: 1fr; }
  .pd-stage { min-height: 300px; }
}
@media (max-width: 900px) {
  .pd-rel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pd-thumbs { grid-template-columns: repeat(3, 1fr); }
  .pd-price { font-size: 25px; }
  .pd-buy h1 { font-size: 21px; }
  .spec-table th { width: 130px; }
}

/* 会话里的系统消息（如接受报价） */
.inq-item.inq-sys { justify-content: center; }
.inq-item.inq-sys .ii-body {
  flex: none; max-width: 84%; text-align: center; background: var(--accent-soft);
  color: var(--accent-deep); border-radius: 10px; padding: 8px 14px;
}
.inq-item.inq-sys .ii-body b { font-size: 12.5px; }
.inq-item.inq-sys .ii-body p.sys-val { color: var(--accent-deep); font-weight: 700; white-space: normal; margin-top: 2px; }

/* 会话弹窗内报价面板 */
.quote-panel { margin-top: 14px; }
.quote-panel-title { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.quote-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fcfcfd; }
.quote-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.quote-card-head b { font-size: 15px; color: var(--accent-deep); }
.quote-card .info-list li { padding: 6px 0; font-size: 12.5px; }

/* 选择产品弹窗（company.php 询盘/报价统一入口） */
.pick-list { max-height: 60vh; overflow: auto; margin-top: 6px; }
.pick-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--line); color: inherit; text-decoration: none; }
.pick-item:last-child { border-bottom: none; }
.pick-thumb { position: relative; overflow: hidden; flex: none; width: 44px; height: 44px; border-radius: 9px; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pick-thumb .logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-txt { min-width: 0; flex: 1; }
.pick-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.pick-txt i { font-style: normal; font-size: 12px; color: var(--muted); }
.pick-go { flex: none; color: var(--accent); font-weight: 700; }

/* ---------- 在线聊天浮层（product.php「Chat Now」，访客 / 登录买家） ----------
   参考阿里国际站 Chat Now：右下角浮层 = 头部 + 商品卡 + 消息区 + 输入区。 */
.chat-widget {
  position: fixed; right: 22px; bottom: 22px; z-index: 1400;
  width: 360px; max-width: calc(100vw - 28px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
/* display:flex 会盖掉 hidden 属性，需显式兜底（浮层/联系表单/输入区共用） */
.chat-widget[hidden], .chat-gate[hidden], .chat-form[hidden] { display: none !important; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ink); color: #fff; }
.chat-ava { flex: none; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--accent); }
.chat-head-txt { min-width: 0; flex: 1; line-height: 1.3; }
.chat-head-txt b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-txt span { font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.chat-head-txt span.online::before { content: "●"; color: #34d399; margin-right: 4px; font-size: 9px; vertical-align: 1px; }
.chat-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.chat-x:hover { background: rgba(255, 255, 255, .24); }

.chat-prod { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fbfbfd; }
.chat-prod-thumb { position: relative; overflow: hidden; flex: none; width: 42px; height: 42px; border-radius: 9px; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chat-prod-thumb .logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chat-prod-txt { min-width: 0; flex: 1; }
.chat-prod-txt b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.4; }
.chat-prod-txt i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.chat-body { display: flex; flex-direction: column; height: 360px; }
.chat-thread { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f8fa; }
.chat-msg { max-width: 82%; display: flex; flex-direction: column; gap: 2px; }
.chat-msg .bubble { padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.chat-msg .at { font-size: 10.5px; color: var(--muted); }
.chat-msg.them { align-self: flex-start; align-items: flex-start; }
.chat-msg.them .bubble { background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; color: var(--ink); }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.mine .bubble { background: var(--accent); color: #fff; border-top-right-radius: 4px; }

.chat-gate { padding: 16px; border-top: 1px solid var(--line); background: #fff; }
.chat-gate p { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.chat-gate .field { display: block; margin-bottom: 8px; }
.chat-gate .field > span { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.chat-gate .field .rq { color: var(--accent); margin-left: 2px; }
.chat-gate .input { width: 100%; }
.chat-gate .btn { width: 100%; margin-top: 4px; }

.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea { flex: 1; resize: none; height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 13px; line-height: 1.4; }
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
.chat-form .btn { flex: none; align-self: flex-end; height: 42px; }
.chat-empty { margin: auto; font-size: 12.5px; color: var(--muted); text-align: center; }

@media (max-width: 520px) {
  .chat-widget { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .chat-body { height: 60vh; }
}
