/* 晟功智能 Harness —— 站点样式（官网 / 用户中心 / 管理后台共用） */
:root {
  --accent: #5a94ff;
  --accent-alt: #56dcd6;
  --bg: #0b1018;
  --bg-soft: #121a26;
  --card: #16202e;
  --card-hi: #1c2836;
  --border: #24313f;
  --text: #e8ecf4;
  --text-dim: #97a3b6;
  --ok: #3ddc97;
  --warn: #ffb454;
  --err: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- 顶栏 ---- */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 24, 0.86);
  border-bottom: 1px solid var(--border);
}
header.site .bar { display: flex; align-items: center; gap: 20px; height: 62px; }
header.site .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
header.site .logo img { height: 26px; width: auto; }
header.site nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
header.site nav a { color: var(--text-dim); font-size: 14px; }
header.site nav a:hover { color: var(--text); text-decoration: none; }

/* ---- 按钮 ---- */
button, .btn {
  font: inherit;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-hi);
  color: var(--text);
  padding: 9px 16px;
  cursor: pointer;
  transition: .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-decoration: none;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button.primary, .btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  border: none;
  color: #08111d;
  font-weight: 600;
}
button.primary:hover, .btn.primary:hover { filter: brightness(1.08); }
button[disabled] { opacity: .5; cursor: not-allowed; }
button.ghost { background: transparent; }

/* ---- 卡片与表单 ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card h3 { margin: 18px 0 8px; font-size: 15px; color: var(--text-dim); font-weight: 600; }
.sub { color: var(--text-dim); font-size: 13.5px; margin: 0 0 16px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e1622;
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 90px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }
.desc { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }

/* ---- 套餐 ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(90, 148, 255, .3), 0 12px 40px -20px rgba(90, 148, 255, .6); }
.plan .name { font-size: 16px; font-weight: 600; }
.plan .tagline { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; min-height: 20px; }
.plan .price { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--text-dim); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 18px; font-size: 13.5px; color: var(--text-dim); }
.plan ul li { padding-left: 20px; position: relative; margin-bottom: 6px; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); }
.plan button { margin-top: auto; }

/* ---- 表格 ---- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

/* ---- 其它 ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); color: var(--text-dim); }
.badge.ok { color: var(--ok); border-color: rgba(61, 220, 151, .4); }
.badge.warn { color: var(--warn); border-color: rgba(255, 180, 84, .4); }
.badge.err { color: var(--err); border-color: rgba(255, 107, 107, .4); }
.hint { font-size: 13px; color: var(--text-dim); }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stat { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat .k { font-size: 12.5px; color: var(--text-dim); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.progress { height: 8px; border-radius: 999px; background: #0e1622; overflow: hidden; border: 1px solid var(--border); }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-alt)); }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--card-hi); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 18px; font-size: 14px; z-index: 100; box-shadow: 0 16px 40px -18px #000;
}
.toast.ok { border-color: rgba(61, 220, 151, .5); }
.toast.err { border-color: rgba(255, 107, 107, .5); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { border-radius: 999px; padding: 7px 14px; font-size: 13.5px; }
.tabs button.active { background: linear-gradient(135deg, var(--accent), var(--accent-alt)); color: #08111d; border: none; font-weight: 600; }
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: 40px; margin: 0 0 14px; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent-alt)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); font-size: 16px; max-width: 620px; margin: 0 auto 26px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
section { padding: 40px 0; }
section h2 { font-size: 24px; margin: 0 0 8px; }
section > .wrap > p.lead { color: var(--text-dim); margin: 0 0 26px; }

footer.site {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 40px;
}
footer.site .cols { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }

.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
.qr img, .qr canvas { display: block; }
.modal-bg {
  position: fixed; inset: 0; background: rgba(4, 8, 14, .72);
  display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px;
}
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; max-width: 460px; width: 100%; }
.login-wrap { max-width: 420px; margin: 60px auto; }
.login-wrap h1 { font-size: 22px; margin: 0 0 6px; }
.login-wrap .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-weight: 700; }
.login-wrap .brand img { height: 28px; }

/* ---- 品牌中心 ---- */
.brand-top { display: flex; flex-direction: column; gap: 10px; }
.brand-top .row { align-items: flex-end; }
.brand-top .row > .field { flex: 1 1 220px; margin-bottom: 0; }
.brand-top-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.brand-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 18px; align-items: start; }
.brand-layout > main { min-width: 0; }
.brand-preview { position: sticky; top: 82px; }
@media (max-width: 1080px) {
  .brand-layout { grid-template-columns: 1fr; }
  .brand-preview { position: static; }
}
.bc-color { display: flex; gap: 8px; align-items: center; }
.bc-color input[type="color"] { width: 46px; height: 40px; padding: 3px; flex: 0 0 46px; }
.bc-color input[type="text"] { flex: 1; font-family: ui-monospace, Consolas, monospace; }
input.invalid, .bc-color input[type="text"].invalid { border-color: var(--err); }
input[type="range"] { padding: 0; accent-color: var(--accent); }
.asset-list { display: flex; flex-direction: column; gap: 10px; }
.asset-slot {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border: 1px dashed var(--border); border-radius: 12px; background: #101927;
  transition: border-color .15s, background .15s;
}
.asset-slot:hover { border-color: var(--accent); }
.asset-slot.drag { border-color: var(--accent); background: rgba(90, 148, 255, .08); }
.asset-slot.empty { opacity: .82; }
.asset-thumb {
  flex: 0 0 72px; width: 72px; height: 72px; border-radius: 10px;
  border: 1px solid var(--border); background: #0b111a;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.asset-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.asset-thumb span { font-size: 12px; color: var(--text-dim); }
.asset-thumb.checker {
  background-color: #0b111a;
  background-image: linear-gradient(45deg, #1a2431 25%, transparent 25%, transparent 75%, #1a2431 75%),
    linear-gradient(45deg, #1a2431 25%, transparent 25%, transparent 75%, #1a2431 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}
.asset-meta { flex: 1; min-width: 0; }
.asset-title { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asset-title .mono { color: var(--text-dim); font-size: 12px; }
.asset-meta .hint { margin-top: 2px; }
.asset-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.asset-actions button { padding: 6px 12px; font-size: 13px; }
.bc-copy { display: flex; gap: 8px; }
.bc-copy input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

/* 客户端外观预览 */
.bc-preview-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px;
}
.bc-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.bc-shell {
  --bc-accent: #5a94ff; --bc-accent-alt: #56dcd6; --bc-icon-bg: #0e1424;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: #0b1018; box-shadow: 0 18px 50px -30px #000;
}
.bc-titlebar {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  background: #0e1622; border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--text-dim);
}
.bc-titlebar i { width: 8px; height: 8px; border-radius: 50%; background: #2b3a4d; }
.bc-titlebar i:first-child { background: #ff6b6b66; }
.bc-titlebar i:nth-child(2) { background: #ffb45466; }
.bc-titlebar i:nth-child(3) { background: #3ddc9766; }
.bc-titlebar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-body { display: grid; grid-template-columns: 118px minmax(0, 1fr); min-height: 300px; }
.bc-sidebar { background: #0e1622; border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 14px; }
.bc-brandrow { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.bc-brandrow img { height: 24px; width: auto; max-width: 34px; object-fit: contain; }
.bc-brand-text { min-width: 0; }
.bc-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-eng { font-size: 9.5px; color: var(--text-dim); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-menu { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-dim); }
.bc-menu span { padding: 5px 8px; border-radius: 7px; }
.bc-menu span.active { background: color-mix(in srgb, var(--bc-accent) 18%, transparent); color: var(--text); }
.bc-thinking { margin-top: auto; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-dim); padding: 6px 2px; }
.bc-thinking-icon { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 3px; background: var(--bc-accent); display: inline-block; }
.bc-thinking-icon.masked {
  background: var(--bc-accent);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  border-radius: 0;
}
.bc-dots { display: inline-flex; gap: 3px; }
.bc-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--bc-accent); opacity: .35; animation: bc-blink 1.2s infinite; }
.bc-dots i:nth-child(2) { animation-delay: .2s; }
.bc-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes bc-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.bc-content { padding: 22px 18px; display: flex; align-items: center; justify-content: center; }
.bc-hero { text-align: center; max-width: 250px; }
.bc-hero img { max-height: 46px; max-width: 150px; object-fit: contain; margin-bottom: 12px; }
.bc-hero h3 { margin: 0 0 6px; font-size: 14px; }
.bc-hero p { margin: 0 0 14px; font-size: 11.5px; color: var(--text-dim); }
.bc-cta {
  display: inline-block; padding: 6px 14px; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: #08111d;
  background: linear-gradient(135deg, var(--bc-accent), var(--bc-accent-alt));
}
.bc-preview-note { margin: 12px 0 0; }
@media (max-width: 560px) {
  .asset-slot { flex-wrap: wrap; }
  .asset-actions { width: 100%; justify-content: flex-end; }
}
