:root {
  --bg: #f6f8fc;
  --dark: #0a0e1a;
  --dark-2: #111a30;
  --dark-3: #1b2a4a;
  --gold: #c8922a;
  --gold-light: #e8c36a;
  --gold-bg: #f8efdc;
  --text: #16203a;
  --muted: #67708a;
  --line: #e3e8f2;
  --white: #ffffff;
  --green: #1b873b;
  --green-bg: #e6f5eb;
  --red: #c0392b;
  --red-bg: #fdeceb;
  --blue: #2563eb;
  --blue-bg: #e8f0fe;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 14, 26, 0.05), 0 8px 24px rgba(10, 14, 26, 0.07);
  --shadow-lg: 0 4px 12px rgba(10, 14, 26, 0.08), 0 18px 44px rgba(10, 14, 26, 0.12);
  --header-h: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea {
  font: inherit; color: var(--text);
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 146, 42, 0.14); }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 5px; }

/* ---------- 顶部导航（响应式） ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 clamp(12px, 4vw, 36px);
  background: rgba(10, 14, 26, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.brand { font-weight: 800; font-size: 20px; color: var(--gold); letter-spacing: 1.5px; white-space: nowrap; }
.brand span { color: #fff; font-weight: 600; font-size: 10px; letter-spacing: 2px; margin-left: 6px; opacity: 0.65; }
nav { display: flex; align-items: center; gap: 2px; }
nav a {
  color: #ccd3e3; text-decoration: none; font-size: 13.5px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; transition: all 0.15s ease;
}
nav a:hover { color: var(--gold-light); background: rgba(255, 255, 255, 0.07); }
nav a.active { color: var(--gold-light); background: rgba(200, 146, 42, 0.14); }
.dropdown { position: relative; }
.dd-toggle {
  display: inline-flex; align-items: center;
  color: #ccd3e3; font-size: 13.5px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; white-space: nowrap; transition: all 0.15s ease;
}
.dd-toggle:hover { color: var(--gold-light); background: rgba(255, 255, 255, 0.07); }
.dd-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 172px;
  background: var(--dark-2); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; padding: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  z-index: 60;
}
.dropdown:hover .dd-menu, .dropdown.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: 9px 12px; font-size: 13.5px; border-radius: 8px; }
.dd-menu a:hover { background: rgba(200, 146, 42, 0.14); color: var(--gold-light); }
.dropdown.active > .dd-toggle { color: var(--gold-light); background: rgba(200, 146, 42, 0.14); }
#lang-select {
  width: auto; padding: 6px 8px; font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08); color: #e6ebf5;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 8px;
}
#lang-select option { color: var(--text); background: var(--white); }
.dd-toggle[data-group="找货源"]::before, .dd-toggle[data-group="Sourcing"]::before { content: "🧭 "; }
.dd-toggle[data-group="服务"]::before, .dd-toggle[data-group="Services"]::before { content: "🛎 "; }
.dd-toggle[data-group="供应商"]::before, .dd-toggle[data-group="For Suppliers"]::before { content: "🏭 "; }
.dd-toggle[data-group="我的"]::before, .dd-toggle[data-group="Me"]::before { content: "👤 "; }
nav a[data-view="home"]::before { content: "🏠 "; }
nav a[data-view="partner"]::before { content: "🤝 "; }
#nav-toggle {
  display: none; position: relative; z-index: 80;
  color: #fff; font-size: 22px; padding: 8px 12px;
  border-radius: 8px; line-height: 1;
  -webkit-appearance: none; appearance: none; touch-action: manipulation;
}

/* ---------- Hero（响应式） ---------- */
.hero {
  background:
    radial-gradient(900px 360px at 12% -10%, rgba(200, 146, 42, 0.22), transparent 60%),
    radial-gradient(700px 320px at 92% 10%, rgba(37, 99, 235, 0.22), transparent 60%),
    linear-gradient(140deg, #0a0e1a 0%, #121b33 55%, #1d2c52 100%);
  color: #fff; padding: clamp(36px, 7vw, 76px) clamp(16px, 5vw, 48px);
  text-align: center;
}
.hero h1 { font-size: clamp(24px, 4.6vw, 44px); font-weight: 800; letter-spacing: 0.5px; line-height: 1.25; }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero p { max-width: 680px; margin: 14px auto 0; color: #bcc6da; font-size: clamp(14px, 2vw, 17px); }
.hero .stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  max-width: 760px; margin: 28px auto 0;
}
.hero .stat {
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px; padding: 12px 8px;
}
.hero .stat b { display: block; font-size: clamp(18px, 3vw, 26px); color: var(--gold-light); }
.hero .stat span { font-size: 12px; color: #9aa8c4; }
.hero .cta { margin-top: 26px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 主容器与栅格 ---------- */
main {
  max-width: 1180px; margin: -30px auto 56px; padding: 0 clamp(12px, 3vw, 24px);
  position: relative; z-index: 2;
}
.section { margin-top: 26px; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin: 0 2px 12px;
}
.section-head h2 { font-size: clamp(16px, 2.4vw, 20px); font-weight: 800; }
.section-head .more { font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.section-head .more:hover { color: var(--gold); }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.brand-band {
  background:
    radial-gradient(600px 260px at 15% -20%, rgba(200, 146, 42, 0.22), transparent 60%),
    linear-gradient(135deg, #0a0e1a 0%, #131d36 60%, #1d2c52 100%);
  color: #fff; border: none; text-align: center;
}
.brand-band h1 { font-weight: 800; letter-spacing: 1px; }
.brand-band h1 em { font-style: normal; color: var(--gold-light); }
.brand-band p { color: #bcc6da; max-width: 720px; margin: 8px auto 0; }
.shop-hero {
  background:
    radial-gradient(600px 260px at 85% -20%, rgba(200, 146, 42, 0.18), transparent 60%),
    linear-gradient(135deg, #0a0e1a 0%, #131d36 60%, #1d2c52 100%);
  color: #fff; border: none;
}
.shop-hero .muted { color: #b9c2d6; }
.shop-hero .big { color: var(--gold-light); }
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.card h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.card .big { font-size: 26px; font-weight: 800; color: var(--dark); }
.card .sub { font-size: 12.5px; color: var(--muted); }
.stat-card { display: flex; flex-direction: column; gap: 2px; }
.stat-card .icon { font-size: 22px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .title { font-weight: 600; font-size: 14.5px; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--red); font-size: 13px; margin-top: 8px; }
.ok { color: var(--green); font-size: 13px; margin-top: 8px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- 按钮 ---------- */
.btn, button.gold, button.ghost, .gold, .ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: all 0.15s ease; text-align: center;
}
button.gold, .gold {
  background: linear-gradient(135deg, #d9a63d, #b87f1f); color: #fff;
  box-shadow: 0 2px 8px rgba(184, 127, 31, 0.3);
}
button.gold:hover, .gold:hover { filter: brightness(1.07); box-shadow: 0 4px 14px rgba(184, 127, 31, 0.4); }
button.ghost, .ghost {
  background: var(--white); color: var(--text);
  border: 1px solid var(--line);
}
button.ghost:hover, .ghost:hover { border-color: var(--gold); color: var(--gold); }
button.sm, .sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- 标签 / 徽章 ---------- */
.tag {
  display: inline-block; background: var(--gold-bg); color: #8a6d1f;
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.gray { background: #eef0f5; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--white); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover, .chip.active { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }
.badge {
  position: relative; display: inline-block; min-width: 18px; height: 18px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px;
}

/* ---------- 完善度进度条 ---------- */
.meter { background: #eef1f7; border-radius: 999px; height: 8px; overflow: hidden; }
.meter > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #d9a63d, #b87f1f);
  transition: width 0.4s ease;
}
.meter.green > i { background: linear-gradient(90deg, #35b55a, #1b873b); }

/* ---------- 列表 / 表格 ---------- */
.list-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.list-item .thumb {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px;
  background: linear-gradient(135deg, var(--dark-2), var(--dark-3));
  color: var(--gold-light); display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .t { font-weight: 600; font-size: 14.5px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 6px; background: #eef1f7; border-radius: 12px; margin-bottom: 16px;
}
.tabs button {
  flex: 1 1 auto; padding: 8px 14px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: transparent; white-space: nowrap;
}
.tabs button.active { background: var(--white); color: var(--text); box-shadow: 0 1px 4px rgba(10,14,26,.12); }

/* ---------- 页脚 ---------- */
footer {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 34px 16px 44px; border-top: 1px solid var(--line);
  background: var(--white);
}
footer b { color: var(--dark); }

/* ---------- 全局加载条 ---------- */
#loading-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: linear-gradient(90deg, #d9a63d, #e8c36a);
  box-shadow: 0 0 8px rgba(200, 146, 42, 0.6);
  opacity: 0; transition: width 0.25s ease, opacity 0.25s ease;
}
#loading-bar.on { opacity: 1; }

/* ---------- 移动端抽屉 ---------- */
@media (max-width: 1080px) {
  #nav-toggle { display: inline-flex; }
  nav {
    position: fixed; top: var(--header-h); right: 0; bottom: 0; z-index: 49;
    width: min(300px, 82vw); flex-direction: column; align-items: stretch;
    background: var(--dark); padding: 16px; gap: 4px;
    transform: translateX(105%); transition: transform 0.25s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
  }
  nav.open { transform: translateX(0); }
  nav a { padding: 12px 14px; font-size: 15px; border-radius: 10px; }
  .dropdown { width: 100%; }
  .dd-toggle { display: block; width: 100%; padding: 12px 14px; font-size: 15px; border-radius: 10px; }
  .dd-menu {
    display: block; position: static; min-width: 0; background: transparent;
    border: none; box-shadow: none; padding: 0 0 4px 14px; margin-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
  .dd-menu a { padding: 10px 12px; font-size: 14px; }
  main { margin-top: -22px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 平板 ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .hero .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 手机 ---------- */
@media (max-width: 600px) {
  :root { --header-h: 54px; }
  .brand { font-size: 17px; }
  .brand span { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  main { padding: 0 10px; margin-bottom: 40px; }
  .card { padding: 14px 15px; border-radius: 12px; }
  .hero { padding: 30px 14px; }
  .hero .stats { gap: 8px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .tabs button { flex: 0 0 auto; }
  .row { align-items: flex-start; }
  .inline { width: 100%; }
  .inline > * { flex: 1 1 auto; min-width: 0; }
  .actions { width: 100%; }
  button.gold, button.ghost { width: 100%; }
  .actions button, .inline button { width: auto; }
  .list-item .thumb { width: 40px; height: 40px; flex-basis: 40px; font-size: 16px; }
}
