* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --purple: #6d28d9;
  --purple-soft: #ede9fe;
  --orange-soft: #ffedd5;
  --radius: 10px;
  --sidebar-w: 220px;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }

#app { display: flex; min-height: 100vh; }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: var(--sidebar-w); background: #1e293b; color: #cbd5e1;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 20;
}
.logo { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid #334155; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex: none;
}
.logo-name { font-size: 16px; font-weight: 700; color: #f1f5f9; letter-spacing: 1px; }
.logo-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: #cbd5e1; font-size: 14px; transition: background .15s;
}
.nav a:hover { background: #334155; }
.nav a.active { background: var(--accent); color: #fff; }
.nav-ico { width: 18px; text-align: center; font-size: 15px; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid #334155; font-size: 11px; color: #64748b; line-height: 1.8; }
.sidebar-foot b { color: #94a3b8; font-weight: 600; }

/* ---------- 主区 ---------- */
.main { flex: 1; margin-left: var(--sidebar-w); padding: 22px 26px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-title small { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 10px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--accent); }

.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 16px 18px; }
.card + .card { margin-top: 14px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-title .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: 12px; color: var(--ink-3); }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.stat-sub { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: #fef2f2; border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
input[type=text], input[type=number], input[type=password], select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  font-family: inherit; background: #fff; color: var(--ink); outline: none; min-width: 0;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=text] { width: 240px; }
label.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.tag-spu { background: var(--purple-soft); color: var(--purple); }
.tag-multi { background: var(--orange-soft); color: #c2410c; }
.tag-own { background: #f1f5f9; color: var(--ink-2); }
.tag-render { background: #ede9fe; color: #6d28d9; }
.tag-blue { background: var(--accent-soft); color: var(--accent); }
.tag-green { background: #dcfce7; color: var(--green); }
.tag-gray { background: #f1f5f9; color: var(--ink-3); }
.tag-amber { background: #fef3c7; color: #b45309; }
.tag-red { background: #fee2e2; color: var(--red); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-gray { background: #cbd5e1; }

/* ---------- 产品网格 ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.prod-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column;
}
.prod-card:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.prod-cover { aspect-ratio: 1; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.prod-cover img { width: 100%; height: 100%; object-fit: contain; }
.prod-cover .noimg { color: #cbd5e1; font-size: 13px; }
.prod-cover .corner { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.prod-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.prod-id { font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; align-items: center; }
.prod-sku { font-size: 13px; font-weight: 600; word-break: break-all; line-height: 1.35; }
.prod-meta { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prod-counts { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- 图片网格 ---------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.img-tile { cursor: zoom-in; }
.img-tile .frame {
  aspect-ratio: 1; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.img-tile:hover .frame { border-color: var(--accent); }
.img-tile img { width: 100%; height: 100%; object-fit: contain; }
.img-name { font-size: 11px; color: var(--ink-2); margin-top: 5px; text-align: center; word-break: break-all; line-height: 1.3; }
.img-flag { position: absolute; right: 6px; bottom: 6px; }

/* ---------- 产品展厅（瀑布流） ---------- */
/* 产品展厅瀑布流：列宽跟着 300px 预览图走，卡片定宽居中，保证图正好 300×300 */
.masonry { column-width: 300px; column-gap: 16px; }
@media (max-width: 660px) { .masonry { column-width: 150px; column-gap: 10px; } }
.mcard {
  break-inside: avoid; margin-bottom: 16px; max-width: 300px; margin-inline: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; cursor: pointer; transition: box-shadow .18s, transform .18s;
}
.mcard:hover { box-shadow: 0 10px 28px rgba(15,23,42,.13); transform: translateY(-3px); border-color: var(--accent); }
/* 白底渲染图统一 1080×1080，比例上给不出高低差；改成画框高度分档：
   contain + 定宽，产品永远铺满整列宽、不裁不缩，多出来的只是白底留白，
   于是卡片高度自然分成几档，瀑布流错落起来。档位由产品ID决定，刷新不跳。*/
.mcard-img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; background: #fff; }
.mcard-img.r1 { aspect-ratio: 1 / 1.10; }
.mcard-img.r2 { aspect-ratio: 1 / 1.22; }
.mcard-img.r3 { aspect-ratio: 1 / 1.34; }
/* 非正方来源（详情图等）加载完就用真实比例 */
.mcard-img.nat.ld { aspect-ratio: auto; }
.mcard-body { padding: 10px 12px 12px; }
.mcard-title {
  font-size: 13px; line-height: 1.45; color: var(--ink); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mcard-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; font-size: 11px; color: var(--ink-3); }
.mcard-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.mcard-price { color: #dc2626; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.mcard-price small { font-size: 11px; font-weight: 400; }
/* 产品ID 是这套系统的主键，展厅卡片上绿色高亮，方便直接抄号 */
.mcard-pid {
  font-size: 12px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums;
  background: #dcfce7; padding: 1px 7px; border-radius: 5px; letter-spacing: .02em;
}
.facet-bar { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; font-size: 13px; }
.facet-label { width: 52px; flex: none; color: var(--ink-3); padding-top: 5px; }
.facet-vals { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.facet-val { padding: 4px 11px; border-radius: 6px; cursor: pointer; color: var(--ink-2); border: 1px solid transparent; }
.facet-val:hover { background: #f1f5f9; }
.facet-val.on { background: var(--accent); color: #fff; }
.facet-more { color: var(--accent); cursor: pointer; padding: 4px 6px; }

/* ---------- 产品详情：单页汇总 ---------- */
.pd-hero { display: grid; grid-template-columns: 420px 1fr; gap: 26px; align-items: start; }
@media (max-width: 1080px) { .pd-hero { grid-template-columns: 1fr; } }
.pd-gal { position: sticky; top: 16px; }
@media (max-width: 1080px) { .pd-gal { position: static; } }
.pd-info { min-width: 0; }
.pd-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pd-quick {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 18px;
  margin-top: 12px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.pd-quick > div { display: flex; gap: 7px; font-size: 13px; min-width: 0; }
.pd-quick b { color: var(--ink-3); font-weight: 400; flex: none; }
.pd-quick span { word-break: break-all; }

.pd-tabs { display: flex; gap: 4px; margin: 20px 0 14px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.pd-tab {
  padding: 9px 18px; font-size: 14px; cursor: pointer; color: var(--ink-2); position: relative;
  border-radius: 8px 8px 0 0; user-select: none; margin-bottom: -2px; border-bottom: 2px solid transparent;
}
.pd-tab:hover { color: var(--accent); background: #f8fbff; }
.pd-tab.on { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.pd-tab .cnt {
  font-size: 11px; background: var(--accent-soft); color: var(--accent);
  padding: 1px 6px; border-radius: 99px; margin-left: 2px; font-weight: 500;
}
.pd-tab.on .cnt { background: var(--accent); color: #fff; }

.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ov-cat {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px 10px; text-align: center;
  background: #fff; cursor: default;
}
.ov-cat.off { opacity: .45; }
.ov-cat.clickable { cursor: zoom-in; transition: all .15s; }
.ov-cat.clickable:hover { border-color: var(--accent); background: #f8fbff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(37,99,235,.12); }
.section-count.clickable { cursor: zoom-in; color: var(--accent); text-decoration: underline dotted; }
.section-count.clickable:hover { color: #1d4ed8; }
.ov-n { font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.ov-cat.off .ov-n { color: var(--ink-3); }
.ov-l { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.ov-cat .tag { margin-top: 5px; }
#ovInstall { cursor: pointer; }
#ovInstall:hover { border-color: var(--accent); }

.sku-list-wide { max-height: 300px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; }

/* 直播口播稿 */
.tp-text {
  white-space: pre-wrap; font-size: 15px; line-height: 2.1; color: var(--ink);
  background: #f8fafc; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 16px 18px; max-height: 460px; overflow-y: auto;
}

/* ---------- 商品详情（淘宝式） ---------- */
.listing { display: grid; grid-template-columns: 460px 1fr; gap: 28px; align-items: start; }
@media (max-width: 1050px) { .listing { grid-template-columns: 1fr; } }
.lg-main { aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lg-main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.lg-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lg-thumb { width: 58px; height: 58px; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; background: #f8fafc; }
.lg-thumb.on { border-color: var(--accent); }
.lg-thumb img { width: 100%; height: 100%; object-fit: contain; }
.li-title { font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.li-sub { font-size: 13px; color: #c2410c; margin-top: 8px; }
.price-box { background: linear-gradient(180deg,#fff5f5,#fff); border: 1px solid #fecaca; border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.price-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-big { color: #dc2626; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-big small { font-size: 15px; font-weight: 400; }
.price-tag { font-size: 12px; color: var(--ink-3); }
/* 直播走量价 */
.live-box { margin-top: 14px; padding: 12px 14px; background: #fff; border: 1px solid #fde68a; border-radius: 9px; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-label { font-size: 13px; font-weight: 600; color: #b45309; }
.live-formula { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.live-price { font-size: 24px; font-weight: 700; color: #b45309; font-variant-numeric: tabular-nums; }
.profit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed #fde68a; }
@media (max-width: 620px) { .profit-row { grid-template-columns: 1fr; } }
.profit-cell { background: #fffbeb; border-radius: 7px; padding: 9px 11px; }
.profit-name { font-size: 12px; color: var(--ink-2); }
.profit-val { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0 3px; }
.pf-pos { color: var(--green); }
.pf-neg { color: var(--red); }
.pf-na { color: var(--ink-3); }
.profit-formula { font-size: 10.5px; color: var(--ink-3); line-height: 1.5; }
.live-note { font-size: 11px; color: #b45309; margin-top: 9px; }
.live-empty { font-size: 12px; color: var(--ink-3); }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 8px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #fecaca; font-size: 12px; }
.price-grid b { color: var(--ink-3); font-weight: 400; }
.price-grid span { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.sku-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.sku-item {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; transition: all .15s; background: #fff;
}
.sku-item:hover { border-color: var(--accent); background: #f8fbff; }
.sku-item.on { border-color: var(--accent); background: var(--accent-soft); }
.sku-thumb { width: 48px; height: 48px; flex: none; border-radius: 6px; overflow: hidden; background: #f8fafc; border: 1px solid var(--line); }
.sku-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sku-info { min-width: 0; flex: 1; }
.sku-name { font-size: 12.5px; line-height: 1.4; color: var(--ink); word-break: break-all; }
.sku-meta { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.attr-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 6px 20px; }
.attr-row { display: flex; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #f1f5f9; }
.attr-row b { color: var(--ink-3); font-weight: 400; min-width: 74px; flex: none; }
.attr-group-title { font-size: 13px; font-weight: 600; color: var(--accent); margin: 14px 0 6px; }
.sp-list { display: flex; flex-direction: column; gap: 8px; }
.sp-item { display: flex; gap: 9px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.sp-num { width: 19px; height: 19px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 600; margin-top: 2px; }
.detail-imgs img { width: 100%; max-width: 790px; display: block; margin: 0 auto; }
.kw-list { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 图库预览（紧凑瀑布流·无限滚动） ---------- */
.gal-masonry { column-gap: 10px; }
@media (min-width: 1700px) { .gal-masonry { column-count: 7; } }
@media (max-width: 1699px) and (min-width: 1400px) { .gal-masonry { column-count: 6; } }
@media (max-width: 1399px) and (min-width: 1100px) { .gal-masonry { column-count: 5; } }
@media (max-width: 1099px) and (min-width: 820px) { .gal-masonry { column-count: 4; } }
@media (max-width: 819px) and (min-width: 560px) { .gal-masonry { column-count: 3; } }
@media (max-width: 559px) { .gal-masonry { column-count: 2; } }
.gal-card {
  break-inside: avoid; margin-bottom: 10px; position: relative; border-radius: 8px;
  overflow: hidden; cursor: zoom-in; background: #f8fafc; line-height: 0;
  transition: transform .15s, box-shadow .15s;
}
.gal-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,23,42,.16); }
/* 未加载时给方形占位，避免列高塌陷导致排版错乱；加载完成后恢复图片真实比例 */
.gal-card img { width: 100%; display: block; aspect-ratio: 1; object-fit: contain; }
.gal-card img.ld { aspect-ratio: auto; }
.gal-type { position: absolute; left: 6px; top: 6px; opacity: 0; transition: opacity .15s; }
.gal-card:hover .gal-type { opacity: 1; }
.gal-pid {
  position: absolute; right: 6px; bottom: 6px; background: rgba(15,23,42,.72); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; line-height: 1.5;
  font-variant-numeric: tabular-nums; cursor: pointer; backdrop-filter: blur(3px);
}
.gal-pid:hover { background: var(--accent); }
.gal-sentinel { height: 60px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 13px; }
.gal-more-n {
  position: absolute; left: 6px; bottom: 6px; background: rgba(37,99,235,.85); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; line-height: 1.5;
  backdrop-filter: blur(3px);
}
/* 图库分类分组 */
.gal-grp { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.gal-grp-name { width: 62px; flex: none; font-size: 12px; color: var(--ink-3); padding-top: 8px; text-align: right; }
.gal-grp .type-chips { flex: 1; }
.type-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.type-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; user-select: none;
  transition: all .15s;
}
.type-chip:hover { border-color: var(--accent); }
.type-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.type-chip .cnt { font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }

/* ---------- 区块 ---------- */
.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 600; }
.section-count { font-size: 12px; color: var(--ink-3); }
.section-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.shared-list { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: none; flex-wrap: wrap; gap: 6px; }
.shared-list.open { display: flex; }
.chip {
  display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px;
  background: #f8fafc; border: 1px solid var(--line); font-size: 12px; cursor: pointer; color: var(--ink-2);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.me { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); cursor: default; }

/* ---------- 详情头 ---------- */
.detail-head { display: flex; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.detail-cover { width: 180px; flex: none; }
.detail-cover .frame { aspect-ratio: 1; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-cover img { width: 100%; height: 100%; object-fit: contain; }
.detail-info { flex: 1; min-width: 0; }
.detail-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 18px; margin-top: 12px; }
.field { font-size: 13px; display: flex; gap: 6px; min-width: 0; }
.field b { color: var(--ink-3); font-weight: 400; flex: none; }
.field span { word-break: break-all; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 8px 10px; color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tr:hover td { background: #f8fafc; }
.tbl .num { font-variant-numeric: tabular-nums; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.pager input { width: 60px; text-align: center; }

/* ---------- 进度 ---------- */
.pbar { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.pbar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.pbar.green > div { background: var(--green); }
.phase-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.phase-name { width: 220px; flex: none; font-size: 13px; }
.phase-row .pbar { flex: 1; }
.phase-num { width: 130px; flex: none; text-align: right; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 日志 ---------- */
.logbox {
  background: #0f172a; color: #cbd5e1; border-radius: 8px; padding: 12px 14px; height: 320px;
  overflow-y: auto; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; line-height: 1.7;
}
.logbox .warn { color: #fbbf24; }
.logbox .error { color: #f87171; }
.logbox .time { color: #64748b; margin-right: 8px; }

/* ---------- 图片墙（先看全部缩略图，再点开大图） ---------- */
.wall { position: fixed; inset: 0; background: rgba(15,23,42,.88); z-index: 90; display: flex; flex-direction: column; }
.wall.hidden { display: none; }
.wall-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; color: #e2e8f0; border-bottom: 1px solid rgba(255,255,255,.12); flex: none;
}
.wall-title { font-size: 15px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wall-title b { font-size: 17px; }
.wall-actions { display: flex; align-items: center; gap: 12px; }
.wall-hint { font-size: 12px; color: #94a3b8; }
.wall-actions .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #e2e8f0; }
.wall-actions .btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.wall-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }
/* 预览墙：瀑布流，图按真实比例显示（不再统一裁成方块）；
   列宽按这一类图的数量分档 —— 几张就大图铺开，几百张就密排。 */
.wall-grid { column-gap: 12px; }
.wall-body[data-size="xl"] .wall-grid { column-width: 480px; }
.wall-body[data-size="lg"] .wall-grid { column-width: 320px; }
.wall-body[data-size="md"] .wall-grid { column-width: 220px; }
.wall-body[data-size="sm"] .wall-grid { column-width: 150px; }
.wall-body[data-size="xs"] .wall-grid { column-width: 110px; column-gap: 8px; }
.wall-tile {
  break-inside: avoid; margin-bottom: 12px; position: relative; border-radius: 8px; overflow: hidden;
  background: #fff; cursor: zoom-in; line-height: 0;
  border: 1px solid rgba(255,255,255,.18); transition: transform .15s, box-shadow .15s;
}
.wall-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
/* 加载前用方形占位，免得列高来回跳；加载完恢复图片真实比例 */
.wall-tile img { width: 100%; display: block; aspect-ratio: 1; object-fit: contain; }
.wall-tile img.ld { aspect-ratio: auto; }
.wall-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px;
  font-size: 10.5px; line-height: 1.35; color: #fff; text-align: center; word-break: break-all;
  background: linear-gradient(to top, rgba(15,23,42,.78), transparent);
  opacity: 0; transition: opacity .15s;
}
.wall-tile:hover .wall-name { opacity: 1; }
.wall-body[data-size="xs"] .wall-name { display: none; }
.wall-more { text-align: center; color: #94a3b8; font-size: 13px; padding: 16px 0; }

/* ---------- 灯箱 ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(15, 23, 42, .95); z-index: 120; display: flex; flex-direction: column; }
.lightbox.hidden { display: none; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; color: #e2e8f0; gap: 10px; }
.lb-title { font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lb-actions { display: flex; gap: 8px; }
.lb-actions .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #e2e8f0; }
.lb-actions .btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.lb-body { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 70px; }
.lb-body img, .lb-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; background: #fff; }
.lb-body .hidden, #lbImg.hidden { display: none; }
.img-tile .vid-badge {
  position: absolute; left: 6px; top: 6px; background: rgba(15,23,42,.75); color: #fff;
  border-radius: 5px; font-size: 10px; padding: 2px 6px;
}
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; cursor: pointer; z-index: 2;
}
.lb-arrow:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-foot { padding: 12px 20px 18px; color: #94a3b8; font-size: 12px; text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  transition: opacity .3s;
}
.toast.hidden { opacity: 0; pointer-events: none; }

/* ---------- 提示块 ---------- */
.hint-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; }
.hint-box .t { font-weight: 600; color: #92400e; font-size: 13px; margin-bottom: 8px; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 13px; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
pre.code {
  background: #0f172a; color: #cbd5e1; padding: 12px 14px; border-radius: 8px; overflow-x: auto;
  font-size: 12px; line-height: 1.7; font-family: "SF Mono", Menlo, Consolas, monospace; margin: 8px 0;
}
/* 接口总览条目 */
.ep { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; flex-wrap: wrap; }
.ep:last-child { border-bottom: none; }
.ep-m { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; flex: none; min-width: 44px; text-align: center; }
.ep-get { background: #dcfce7; color: var(--green); }
.ep-post { background: #fef3c7; color: #b45309; }
.ep-p { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink); }
.ep-d { color: var(--ink-3); font-size: 12.5px; margin-left: auto; }
@media (max-width: 720px) { .ep-d { margin-left: 0; width: 100%; } }

.api-item { margin-bottom: 22px; }
.api-item h4 { font-size: 14px; margin-bottom: 4px; }
.api-item .desc { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 13px; align-items: center; }
.kv b { color: var(--ink-2); font-weight: 500; }

@media (max-width: 860px) {
  .sidebar { width: 60px; }
  .logo-name, .logo-sub, .nav a span:not(.nav-ico), .sidebar-foot { display: none; }
  .nav a { justify-content: center; padding: 12px 0; }
  .main { margin-left: 60px; padding: 16px 14px 60px; }
  .detail-head { flex-direction: column; }
  .detail-cover { width: 100%; max-width: 240px; }
  .phase-name { width: 130px; }
}

/* ---------- 生图提示词 ---------- */
.pm-card { margin-bottom: 12px; }
.pm-item { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.pm-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; font-size: 13px; }
.pm-head .right { margin-left: auto; }
.pm-body { display: grid; grid-template-columns: 46px 1fr; gap: 6px 10px; align-items: start; }
.pm-lbl { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.pm-txt { font-size: 13px; line-height: 1.85; color: var(--ink); word-break: break-word; white-space: pre-wrap; }
.pm-neg { color: var(--ink-2); }
.pm-foot { font-size: 11px; color: var(--ink-3); margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); }

/* ---------- SPU 全景页 ---------- */
.shr-legend { display: grid; gap: 9px; }
.shr-item { display: flex; align-items: baseline; gap: 9px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.shr-item b { color: var(--ink); font-variant-numeric: tabular-nums; }
.shr-item > span:last-child { color: var(--ink-3); font-size: 12.5px; }
.spu-band {
  display: flex; align-items: center; gap: 9px; margin: 20px 0 10px;
  font-size: 13px; color: var(--ink-3); padding-bottom: 7px; border-bottom: 2px solid var(--line);
}
.cg { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cg:last-child { border-bottom: none; }
.cg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; font-size: 13px; }
.own-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.own-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.own-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; }
.own-head .right { margin-left: auto; }
.own-thumbs { display: flex; gap: 5px; flex-wrap: wrap; }
.own-t { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: #f8fafc; }
.own-t img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- 平台售价测算 ---------- */
.pm-base { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; line-height: 1.9; }
.pm-base b { color: var(--ink); }
.pm-dim { color: var(--ink-3); font-size: 12px; }
.pm-tbl th { vertical-align: top; }
.pm-tbl td { vertical-align: top; }
.th-sub { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.pm-list { color: var(--accent); font-size: 16px; }
.pm-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.9; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.pm-take { font-size: 14px; margin-bottom: 10px; }
.pm-take b { font-variant-numeric: tabular-nums; }
.pm-bar { display: flex; height: 22px; border-radius: 5px; overflow: hidden; background: #f1f5f9; }
.pm-seg { height: 100%; transition: opacity .15s; }
.pm-seg:hover { opacity: .8; }
.pm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 11px; font-size: 12px; }
.pm-lg { display: inline-flex; align-items: center; gap: 5px; }
.pm-lg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; flex: none; }
.pm-lg b { font-variant-numeric: tabular-nums; }

/* ---------- 生成按钮条（话术 / 安装说明书） ---------- */
.genbar { display: flex; align-items: center; gap: 10px; padding: 12px 0 2px; flex-wrap: wrap; }
.genbar-msg { font-size: 12px; color: var(--ink-3); }
.spin {
  display: inline-block; width: 12px; height: 12px; vertical-align: -1px;
  border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 共用清单：列出和哪些产品共用这批图 ---------- */
.shared-box { margin-top: 12px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.shared-t { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.shared-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.shared-chip {
  display: inline-flex; align-items: baseline; gap: 3px; font-size: 12px; text-decoration: none;
  padding: 3px 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
}
.shared-chip:hover { border-color: var(--accent); color: var(--accent); }
.shared-chip b { color: var(--green); font-variant-numeric: tabular-nums; }
.shared-chip .off { font-style: normal; color: var(--ink-3); opacity: .7; }
.shared-more { display: none; gap: 6px; flex-wrap: wrap; }
.shared-more.on { display: contents; }
.shared-chip.more-btn { border-style: dashed; color: var(--accent); }
/* 渲染六件套齐不齐 */
.rc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 12px; }
.rc-label { color: var(--ink-3); }
.rc-item { padding: 2px 8px; border-radius: 5px; }
.rc-item.ok { background: #dcfce7; color: var(--green); }
.rc-item.no { background: #fef2f2; color: #dc2626; }

/* ---------- 人工上传 ---------- */
.up-bar { font-size: 12px; color: var(--ink-2); min-height: 0; }
.up-bar:not(:empty) { padding: 6px 0 2px; }
.img-tile.is-up .frame { outline: 2px solid var(--amber, #d97706); outline-offset: -2px; }
.up-badge {
  position: absolute; left: 5px; top: 5px; background: rgba(217,119,6,.9); color: #fff;
  font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; line-height: 1.6;
}
.up-del {
  position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; line-height: 18px;
  border: none; border-radius: 50%; background: rgba(15,23,42,.6); color: #fff;
  font-size: 15px; cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0;
}
.img-tile:hover .up-del { opacity: 1; }
.up-del:hover { background: #dc2626; }
.file-ph {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: #f1f5f9; color: var(--ink-3); font-size: 13px; font-weight: 600; text-transform: uppercase;
}

/* ---------- 一键复制小按钮（SKU 名称 / 货号等） ---------- */
.copy-btn {
  margin-left: 6px; padding: 0 6px; font-size: 11px; line-height: 17px; vertical-align: 1px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink-3);
  cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, border-color .15s;
}
.sku-item:hover .copy-btn, .attr-row:hover .copy-btn, .copy-btn:focus { opacity: 1; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
@media (hover: none) { .copy-btn { opacity: 1; } }   /* 触屏没有 hover，直接常显 */

/* ---------- 提示词一键出图 ---------- */
.pm-gen { font-size: 12px; color: var(--ink-2); }
.pm-gen:not(:empty) { padding: 8px 0 2px; }
.pm-shots:not(:empty) { padding-top: 6px; }
.pm-shots .img-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.hint-box .warn { color: var(--amber); }

/* ---------- 详情页模块图：排版模块清单 ---------- */
.mod-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mod-row { display: flex; gap: 10px; padding: 8px 10px; background: #f8fafc; border-radius: 8px; border: 1px solid var(--line); }
.mod-row.miss { background: #fffbeb; border-color: #fde68a; }
.mod-name { width: 92px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink); padding-top: 2px; }
.mod-main { flex: 1; min-width: 0; }
.mod-src { font-size: 12px; color: var(--ink-2); }
.mod-note { font-size: 12px; color: var(--accent); margin-top: 3px; }
.mod-miss { font-size: 12px; color: var(--amber); margin-top: 4px; }
.mod-shots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mod-shots img {
  width: 76px; height: 76px; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in;
}
.mod-shots img:hover { border-color: var(--accent); }

/* ---------- 搭配师方案 ---------- */
.sty-sum { font-size: 13.5px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.sty-desc { font-size: 13px; color: var(--ink-2); line-height: 1.75; white-space: pre-wrap; }
.sty-blk { margin-top: 14px; }
.sty-palette { display: flex; gap: 8px; flex-wrap: wrap; }
.sty-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2);
  padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.sty-chip i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(15,23,42,.12); }
.sty-chip em { font-style: normal; color: var(--ink-3); }
.sty-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sty-item { display: flex; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); text-decoration: none; color: inherit; }
a.sty-item:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.sty-thumb { width: 62px; height: 62px; flex: none; border-radius: 6px; background: #f8fafc; overflow: hidden; }
.sty-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sty-meta { min-width: 0; flex: 1; }
.sty-name { font-size: 12.5px; color: var(--ink); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sty-sub { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 5px; font-size: 11px; }
.sty-price { color: #dc2626; font-weight: 700; }
.sty-warn { color: var(--amber); }
.sty-note { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.sty-soft { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }

.sty-row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sty-row:last-child { border-bottom: none; }
.sty-row-k { width: 96px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sty-row-v { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.sty-seq { display: inline-block; min-width: 22px; margin-right: 6px; padding: 0 5px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- 图片瓦片上的操作按钮（重渲 / 重出） ---------- */
.tile-act {
  position: absolute; left: 4px; bottom: 4px; padding: 1px 7px; line-height: 18px;
  border: none; border-radius: 4px; background: rgba(15,23,42,.66); color: #fff;
  font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s;
  backdrop-filter: blur(3px);
}
.img-tile:hover .tile-act { opacity: 1; }
.tile-act:hover { background: var(--accent); }
.tile-act:disabled { opacity: .5; cursor: default; }
@media (hover: none) { .tile-act, .up-del { opacity: 1; } }

/* ---------- 用户与日志 ---------- */
.ul-tbl td { vertical-align: top; }
.ul-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.ul-rank { font-size: 15px; text-align: center; width: 42px; }
.ul-bad { color: #dc2626; font-weight: 600; }
.ul-bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; overflow-x: auto; padding-top: 6px; }
.ul-bar { flex: 1; min-width: 14px; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; }
.ul-bar-fill { width: 70%; background: var(--accent); border-radius: 3px 3px 0 0; transition: opacity .15s; }
.ul-bar:hover .ul-bar-fill { opacity: .7; }
.ul-bar-x { font-size: 9.5px; color: var(--ink-3); margin-top: 4px; white-space: nowrap;
  transform: rotate(-45deg); transform-origin: center; height: 22px; }
.ul-pager { margin-top: 10px; font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; align-items: center; }

/* AI 内容板块内部分区 */
.ai-blk { margin-top: 14px; }
.ai-blk:first-of-type { margin-top: 6px; }

.priv-badge {
  position: absolute; right: 5px; bottom: 5px; background: rgba(100,116,139,.88); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 4px; line-height: 1.6; backdrop-filter: blur(3px);
}

.rc-gen {
  margin-left: 5px; padding: 0 6px; font-size: 10.5px; line-height: 16px; vertical-align: 1px;
  border: none; border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer;
}
.rc-gen:hover { filter: brightness(1.1); }
.rc-gen:disabled { opacity: .5; cursor: default; }
.rc-msg { font-size: 12px; color: var(--ink-2); }

/* 安装说明书各语言版本 */
.doc-langs { display:flex; gap:8px; flex-wrap:wrap; align-items:center; padding:8px 0 12px; }
.doc-lbl { font-size:12px; color:var(--ink-3); }
.doc-lang { display:inline-flex; align-items:center; gap:6px; font-size:12px;
  padding:4px 10px; border:1px solid var(--line); border-radius:20px; background:var(--card); }
.doc-lang b { font-weight:600; color:var(--ink); }
.doc-lang i { font-style:normal; color:var(--ink-3); }
.doc-lang a { text-decoration:none; color:var(--accent); }
.doc-lang a:hover { text-decoration:underline; }

/* 说明书二维码 */
.doc-qr { width:34px; height:34px; border-radius:4px; background:#fff; cursor:zoom-in;
  border:1px solid var(--line); }
.doc-qr:hover { border-color: var(--accent); }
.qr-pop { position:fixed; inset:0; background:rgba(15,23,42,.7); z-index:130;
  display:flex; align-items:center; justify-content:center; }
.qr-card { background:#fff; border-radius:14px; padding:22px; text-align:center; max-width:92vw; }
.qr-card img { width:260px; height:auto; display:block; margin:0 auto; }
.qr-url { font-size:12px; color:var(--ink-3); margin:10px 0 14px; word-break:break-all; max-width:280px; }
.qr-acts { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.doc-lang.miss { opacity:.5; }
.doc-lang.miss b { color: var(--ink-3); }
.doc-std { font-size:11.5px; padding:2px 9px; border-radius:20px; align-self:center; }
.doc-std.ok { color:#15803d; background:#dcfce7; }
.doc-std.bad { color:#b45309; background:#fef3c7; }
/* 生图通道选择：点「生成图片」时弹出 */
.prov-card { background: var(--card); border-radius: 14px; padding: 18px; width: 340px;
  max-width: calc(100vw - 32px); box-shadow: 0 18px 50px rgba(15,23,42,.22); }
.prov-t { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.prov-opt { display: block; width: 100%; text-align: left; padding: 11px 13px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer;
  font-family: inherit; position: relative; transition: border-color .15s, background .15s; }
.prov-opt:hover { border-color: var(--accent); background: var(--bg); }
.prov-opt.dft { border-color: var(--accent); }
.prov-opt b { display: block; font-size: 13.5px; color: var(--ink); }
.prov-opt i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.prov-dft { position: absolute; right: 11px; top: 11px; font-size: 10.5px; color: var(--accent); }
.prov-cancel { width: 100%; margin-top: 2px; }
/* 生图参考图选择：点「生成图片」先弹这层 */
.ref-card { width: 520px; }
.ref-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  max-height: 46vh; overflow-y: auto; padding: 2px; }
.ref-item { border: 1px solid var(--line); border-radius: 9px; padding: 6px; cursor: pointer;
  background: var(--card); transition: border-color .15s, box-shadow .15s; text-align: center; }
.ref-item:hover { border-color: var(--accent); }
.ref-item.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft, rgba(37,99,235,.18)); }
.ref-item img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff;
  border-radius: 6px; display: block; }
.ref-item span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-item.ref-none { border-style: dashed; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--ink-3); }
.ref-item.ref-none i { font-style: normal; font-size: 22px; line-height: 1.4; }
.ref-item.ref-none span { white-space: normal; margin-top: 2px; }
.ref-actions { margin-top: 12px; display: flex; gap: 8px; }
.ref-actions .ref-ok { flex: 1; }
.ref-actions .prov-cancel { width: auto; margin-top: 0; }
/* 公共图片 */
.ci-sub { margin-top: 14px; }
.ci-sub:first-of-type { margin-top: 4px; }
.ci-sub-t { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; padding-left: 9px; border-left: 3px solid var(--accent); }
.ci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ci { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); }
.ci img { width: 92px; height: 92px; object-fit: contain; background: #fff; border-radius: 6px; flex: 0 0 auto; }
.ci-body { min-width: 0; flex: 1; }
.ci-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ci-rule { font-size: 12px; color: var(--ink-2); margin: 4px 0 8px; line-height: 1.6; }
.ci-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.ci-foot .ok { color: #15803d; } .ci-foot .warn { color: var(--amber); }
#upSub, #crSub { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); font-size: 12.5px; font-family: inherit; }
.cr-card { background: var(--card); border-radius: 14px; padding: 20px; width: 560px; max-width: calc(100vw - 32px); max-height: 88vh; overflow: auto; }
.cr-meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; align-items: center; }
.cr-row { display: flex; gap: 6px; margin-bottom: 6px; }
.cr-row select, .cr-row input { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); font-size: 12.5px; font-family: inherit; }
.cr-row .cr-v { flex: 1; }
.cr-hint { margin: 10px 0; font-size: 11.5px; color: var(--ink-3); }
.cr-tag { display: inline-block; margin: 3px 4px 0 0; padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px; cursor: pointer; }
.cr-tag:hover { border-color: var(--accent); color: var(--accent); }
.cr-tag i { font-style: normal; color: var(--ink-3); margin-left: 4px; font-size: 10.5px; }
.cr-prev { margin: 12px 0; padding: 10px; background: var(--bg); border-radius: 8px; font-size: 12.5px; min-height: 40px; }
.cr-bd { margin-top: 8px; max-height: 120px; overflow: auto; }
.cr-bd > span:first-child { font-size: 11px; color: var(--ink-3); margin-right: 6px; }
.cr-bd .cr-tag { cursor: default; }
.cr-bd .cr-tag:hover { border-color: var(--line); color: inherit; }
.cr-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cr-thumbs span { text-align: center; font-size: 10px; color: var(--ink-3); }
.cr-thumbs img { width: 46px; height: 46px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 5px; display: block; }
/* 生图对比 */
.cmp-form { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.cmp-form select, .cmp-form input[type=number] { padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--card); color: var(--ink); font-family: inherit; font-size: 13px; }
.cmp-provs { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cmp-pv { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; }
.cmp-pv i { font-style: normal; color: var(--ink-3); font-size: 11px; margin-left: 4px; }
.cmp-grid { display: grid; gap: 10px; align-items: start; }
.cmp-grid .ch { font-size: 12px; font-weight: 600; color: var(--ink-2); padding-bottom: 4px;
  border-bottom: 2px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.cr { font-size: 11.5px; color: var(--ink-3); }
.cr img { width: 100%; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  display: block; cursor: zoom-in; }
.cr b { display: block; font: 600 13px/1.6 ui-monospace, Menlo, monospace; color: var(--ink); }
.cr i { font-style: normal; display: block; line-height: 1.5; }
.cc { position: relative; }
.cc img { width: 100%; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  display: block; cursor: zoom-in; }
.cc i { font-style: normal; font-size: 11px; color: var(--ink-3); display: block; margin-top: 3px; }
.cc .ph { aspect-ratio: 4/3; border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; }
.cc.bad .ph { border-color: #fca5a5; color: #dc2626; }
.cc.empty { color: var(--ink-3); text-align: center; padding-top: 20px; }
.spinph { position: relative; overflow: hidden; }
.spinph::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(37,99,235,.16) 50%, transparent 65%);
  animation: shim 1.4s linear infinite; }
@keyframes shim { from { transform: translateX(-100%) } to { transform: translateX(100%) } }
.tbl .ok { color: #15803d; font-weight: 600; }
.tbl .warn { color: var(--amber); font-weight: 600; }
