/* ============================================================
   NicheDock 设计系统 — 深蓝 + 金(与 PanguDawn 站群统一)
   三语: en / ar(RTL) / zh  |  移动端优先
   ============================================================ */
:root {
  --bg: #0a1628;
  --bg-2: #0d1b30;
  --panel: #102038;
  --panel-2: #16283f;
  --line: #1e3350;
  --gold: #c8a45c;
  --gold-hi: #e3c88f;
  --gold-dim: rgba(200, 164, 92, .16);
  --txt: #e9edf3;
  --txt-2: #9aa7b8;
  --txt-3: #64748b;
  --green: #34d399;
  --wa: #25d366;
  --red: #f87171;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-num: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --font-ar: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--txt); font-family: var(--font);
  font-size: 15px; line-height: 1.6; min-height: 100vh;
}
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--font-ar); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- 顶部导航 ---------- */
.ticker-bar { background: linear-gradient(90deg, #0d1b30, #132442, #0d1b30); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.ticker-inner { display: inline-block; padding: 6px 0; animation: ticker 30s linear infinite; font-size: 12px; color: var(--txt-2); }
.ticker-inner b { color: var(--gold); margin: 0 4px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.navbar {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 62px; background: rgba(10, 22, 40, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-left { display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), #a8832f); color: #0a1628; font-weight: 800; font-size: 15px;
}
.logo-text em { color: var(--gold); font-style: normal; }
.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--txt-2); padding: 4px 2px; border-bottom: 2px solid transparent; transition: .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); border-color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-switch button { background: none; border: none; color: var(--txt-2); padding: 5px 10px; font-size: 12px; }
.lang-switch button.on { background: var(--gold-dim); color: var(--gold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 9px; padding: 10px 18px; font-size: 14px; font-weight: 600; transition: .18s;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), #b38f4a); color: #0a1628; }
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--txt-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-wa { background: var(--wa); color: #063d17; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 44px 0; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.section-title em { color: var(--gold); font-style: normal; }
.section-sub { color: var(--txt-2); font-size: 14px; margin-bottom: 26px; }

/* ---------- 首页 hero ---------- */
.hero { position: relative; padding: 72px 0 56px; text-align: center; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(200, 164, 92, .12), transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--gold-dim);
  background: var(--gold-dim); color: var(--gold); border-radius: 99px; padding: 6px 16px;
  font-size: 12.5px; margin-bottom: 22px; position: relative;
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; line-height: 1.15; position: relative; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-sub { color: var(--txt-2); font-size: clamp(14px, 2vw, 17px); max-width: 680px; margin: 18px auto 30px; position: relative; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.hero-stats { display: flex; gap: 36px; justify-content: center; margin-top: 44px; flex-wrap: wrap; position: relative; }
.hero-stats .stat b { display: block; font-size: 26px; color: var(--gold); font-family: var(--font-num); }
.hero-stats .stat span { font-size: 12.5px; color: var(--txt-2); }

/* ---------- 角色分流卡 ---------- */
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.role-card {
  background: linear-gradient(160deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; transition: .2s; position: relative; overflow: hidden;
}
.role-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.role-card .icon { font-size: 30px; margin-bottom: 14px; }
.role-card h3 { font-size: 18px; margin-bottom: 8px; }
.role-card p { color: var(--txt-2); font-size: 13.5px; margin-bottom: 16px; min-height: 42px; }
.role-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.role-card .tags span { font-size: 11.5px; color: var(--gold); background: var(--gold-dim); border-radius: 6px; padding: 3px 9px; }

/* ---------- 品类格 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; display: flex; align-items: center; gap: 12px; transition: .18s;
}
.cat-card:hover { border-color: var(--gold); background: var(--panel-2); }
.cat-card .ico { font-size: 24px; }
.cat-card b { font-size: 14px; display: block; }
.cat-card small { color: var(--txt-3); font-size: 11.5px; }

/* ---------- 商品卡 ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.prod-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s; display: flex; flex-direction: column;
}
.prod-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.prod-img {
  height: 150px; display: grid; place-items: center; font-size: 44px;
  background: linear-gradient(135deg, var(--panel-2), var(--bg-2)); border-bottom: 1px solid var(--line);
}
.prod-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.prod-body h4 { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.prod-meta { display: flex; justify-content: space-between; align-items: baseline; }
.prod-price { color: var(--gold); font-family: var(--font-num); font-size: 15px; font-weight: 700; }
.prod-moq { color: var(--txt-3); font-size: 11.5px; }
.prod-sup { font-size: 12px; color: var(--txt-2); display: flex; align-items: center; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; border-radius: 6px; padding: 2px 8px;
  background: var(--gold-dim); color: var(--gold);
}
.badge.wa { background: rgba(37, 211, 102, .14); color: var(--wa); }
.badge.mask { background: rgba(154, 167, 184, .12); color: var(--txt-2); }
.prod-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.prod-foot .btn { flex: 1; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px;
}
.filter-bar select, .filter-bar input {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 8px 12px; font-size: 13.5px; outline: none;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--gold); }
.filter-bar input[type="search"] { flex: 1; min-width: 180px; }
.dir-switch { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.dir-switch button { background: none; border: none; color: var(--txt-2); padding: 6px 14px; border-radius: 6px; font-size: 13px; }
.dir-switch button.on { background: var(--gold); color: #0a1628; font-weight: 700; }

/* ---------- 表单 ---------- */
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 560px; margin: 40px auto; }
.form-card h2 { font-size: 22px; margin-bottom: 6px; }
.form-card .sub { color: var(--txt-2); font-size: 13.5px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--txt-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--txt);
  border-radius: 9px; padding: 11px 13px; font-size: 14px; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--txt-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .3); color: var(--red); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; }
.form-ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); color: var(--green); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; }

/* ---------- 定价卡 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.plan-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; display: flex; flex-direction: column; }
.plan-card.hot { border-color: var(--gold); position: relative; }
.plan-card.hot::after {
  content: attr(data-hot); position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #0a1628; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 12px;
}
.plan-card h3 { font-size: 17px; }
.plan-price { font-family: var(--font-num); font-size: 34px; font-weight: 800; color: var(--gold); margin: 12px 0 2px; }
.plan-price small { font-size: 13px; color: var(--txt-3); font-weight: 400; }
.plan-card ul { list-style: none; margin: 18px 0 24px; flex: 1; }
.plan-card li { font-size: 13.5px; color: var(--txt-2); padding: 6px 0 6px 22px; position: relative; }
.plan-card li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; color: var(--txt-2); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: var(--panel-2); }
.status-pill { font-size: 11.5px; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.status-pill.pending { background: rgba(251, 191, 36, .14); color: #fbbf24; }
.status-pill.active, .status-pill.paid, .status-pill.quoted { background: rgba(52, 211, 153, .13); color: var(--green); }
.status-pill.closed, .status-pill.suspended { background: rgba(154, 167, 184, .13); color: var(--txt-2); }

/* ---------- 详情页 ---------- */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.spec-table { width: 100%; font-size: 13.5px; }
.spec-table tr td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.spec-table tr td:first-child { color: var(--txt-2); width: 40%; }
.spec-table tr td:last-child { font-family: var(--font-num); font-size: 13px; }
.contact-card { background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact-card h4 { font-size: 15px; margin-bottom: 14px; color: var(--gold); }
.contact-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.contact-row:last-child { border-bottom: none; }
.contact-row .k { color: var(--txt-2); }
.contact-row .v { font-family: var(--font-num); font-size: 13px; }
.contact-row .v.masked { color: var(--txt-3); letter-spacing: 1px; }
.unlock-box {
  margin-top: 14px; background: var(--gold-dim); border: 1px solid rgba(200, 164, 92, .35);
  border-radius: 10px; padding: 14px 16px; font-size: 13px; color: var(--gold-hi);
}

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 40px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.footer h5 { font-size: 13px; color: var(--txt-2); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer a { display: block; font-size: 13px; color: var(--txt-2); padding: 4px 0; }
.footer a:hover { color: var(--gold); }
.footer-brand p { color: var(--txt-3); font-size: 12.5px; margin-top: 10px; max-width: 300px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--txt-3); font-size: 12px; }

/* ---------- 订阅卡 ---------- */
.subscribe-panel { background: linear-gradient(135deg, var(--panel-2), var(--panel)); border: 1px solid rgba(200, 164, 92, .3); border-radius: var(--radius); padding: 26px; text-align: center; margin: 36px 0; }
.subscribe-panel h3 { font-size: 19px; margin-bottom: 6px; }
.subscribe-panel p { color: var(--txt-2); font-size: 13.5px; margin-bottom: 16px; }
.subscribe-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.subscribe-form input { flex: 1; background: var(--bg-2); border: 1px solid var(--line); color: var(--txt); border-radius: 9px; padding: 11px 14px; font-size: 14px; outline: none; }
.subscribe-form input:focus { border-color: var(--gold); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--gold); color: var(--txt);
  border-radius: 10px; padding: 12px 22px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 300; box-shadow: var(--shadow); max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .role-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .navbar { padding: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .subscribe-form { flex-direction: column; }
  .hero-stats { gap: 20px; }
}

/* ---------- RTL 适配 ---------- */
[dir="rtl"] .plan-card li { padding: 6px 22px 6px 0; }
[dir="rtl"] .plan-card li::before { left: auto; right: 0; }
[dir="rtl"] table.tbl th { text-align: right; }
[dir="rtl"] .contact-row .v { direction: ltr; }
[dir="rtl"] .prod-price, [dir="rtl"] .plan-price, [dir="rtl"] .v { unicode-bidi: plaintext; }
