/* LinsGeek ERP —— 商品编辑整页样式（配合 71-sku-edit.js）。【2026-12-02 上线（真实环境只开放已接后端的部分）】回滚：删除这两个文件。 */
#lg-se { --s-brand: #0d7b6d; --s-soft: #e7f2f0; --s-ink: #0f1a18; --s-muted: #5f6e6b; --s-line: #e6ecea; --s-bad: #b3261e; max-width: 1240px; margin: 0 auto; padding: 12px 16px 96px; min-width: 0; color: var(--s-ink); font-size: 14px; line-height: 1.5; font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
#lg-se * { box-sizing: border-box; }
/* 页面框架给左侧菜单留了 228px（ml-[228px]），编辑页不显示左侧菜单，这块空白会让内容偏右；去掉后内容在整页居中 */
section.ml-\[228px\]:has(> div > #lg-se) { margin-left: 0 !important; }

/* 页头 */
#lg-se .se-head { margin-bottom: 14px; }
#lg-se .se-back { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--s-muted); font: inherit; cursor: pointer; }
#lg-se .se-back:hover { color: var(--s-brand); }
#lg-se .se-back i { width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
#lg-se .se-hd { display: flex; align-items: center; gap: 14px; margin-top: 8px; min-width: 0; }
#lg-se .se-hd img { flex: none; width: 56px; height: 56px; border: 1px solid var(--s-line); border-radius: 10px; object-fit: cover; background: var(--s-soft); }
#lg-se .se-hd > div { min-width: 0; }
#lg-se h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#lg-se .se-hd p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0 0; color: var(--s-muted); font-size: 13px; }
#lg-se .se-hd em { padding: 1px 10px; border-radius: 10px; background: #eef1f0; color: var(--s-muted); font-style: normal; font-size: 12px; white-space: nowrap; }
#lg-se .se-hd em.on { background: var(--s-soft); color: var(--s-brand); font-weight: 600; }
#lg-se .se-hd em.demo { background: #fff4d6; color: #7a5200; }

/* 左导航 + 内容 */
#lg-se .se-cols { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 16px; align-items: start; }
#lg-se .se-nav { position: sticky; top: 62px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--s-line); border-radius: 12px; background: #fff; }
#lg-se .se-nav button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--s-ink); font: inherit; text-align: left; cursor: pointer; }
#lg-se .se-nav button:hover { background: #f3f6f5; }
#lg-se .se-nav button.on { background: var(--s-soft); color: var(--s-brand); font-weight: 600; }
#lg-se .se-nav b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--s-brand); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
#lg-se .se-main { min-width: 0; }

/* 卡片 */
#lg-se .se-card { margin-bottom: 12px; padding: 16px 18px 18px; border: 1px solid var(--s-line); border-radius: 12px; background: #fff; scroll-margin-top: 62px; }
#lg-se h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 14px; font-size: 16px; font-weight: 700; }
#lg-se h2 small { font-size: 12px; font-weight: 400; color: var(--s-muted); }
#lg-se .se-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
#lg-se .se-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#lg-se .se-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#lg-se .se-f.wide { grid-column: 1 / -1; }
#lg-se .se-f > span { color: var(--s-muted); }
#lg-se .se-f b { color: var(--s-bad); font-weight: 600; }
#lg-se .se-f small, #lg-se .se-tip { color: var(--s-muted); font-size: 12px; }
#lg-se .se-tip { margin: 10px 0 0; }
#lg-se .se-tip:empty { display: none; }
#lg-se input:not([type=file]), #lg-se select, #lg-se textarea { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #d5dedb; border-radius: 8px; background: #fff; color: var(--s-ink); font: inherit; }
#lg-se textarea { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }
#lg-se input[readonly] { background: #f3f6f5; color: var(--s-muted); }
#lg-se input:focus-visible, #lg-se select:focus-visible, #lg-se textarea:focus-visible, #lg-se button:focus-visible, #lg-se .se-file:focus-within { outline: 2px solid #13b8a6; outline-offset: 1px; }

/* 按钮 */
#lg-se .se-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 18px; border: 1px solid #d5dedb; border-radius: 18px; background: #fff; color: var(--s-ink); font: inherit; white-space: nowrap; cursor: pointer; }
#lg-se .se-btn:hover { border-color: var(--s-brand); color: var(--s-brand); }
#lg-se .se-btn.pri, #lg-se .se-btn.pri:hover { border-color: var(--s-brand); background: var(--s-brand); color: #fff; }
#lg-se .se-file { position: relative; overflow: hidden; }
#lg-se .se-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#lg-se .se-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#lg-se .se-row input[type=url] { flex: 1 1 280px; }

/* 图片 */
#lg-se .se-imgs { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 12px; padding: 0; }
#lg-se .se-imgs li { position: relative; width: 104px; height: 104px; border: 1px solid var(--s-line); border-radius: 10px; overflow: hidden; background: var(--s-soft); }
#lg-se .se-imgs li:first-child { border-color: var(--s-brand); box-shadow: 0 0 0 1px var(--s-brand); }
#lg-se .se-imgs img { display: block; width: 100%; height: 100%; object-fit: cover; }
#lg-se .se-imgs em, #lg-se .se-imgs .mk { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; border: 0; text-align: center; font: inherit; font-style: normal; font-size: 12px; color: #fff; background: rgba(13, 123, 109, .9); }
#lg-se .se-imgs .mk { background: rgba(15, 26, 24, .72); cursor: pointer; opacity: 0; }
#lg-se .se-imgs li:hover .mk, #lg-se .se-imgs .mk:focus-visible { opacity: 1; }
#lg-se .se-imgs .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(15, 26, 24, .7); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }

/* 商品分类下面的类目映射情况 */
#lg-se .se-catmap { margin-top: -4px; }
#lg-se .se-cm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--s-line); border-radius: 10px; background: #f7fbfa; }
#lg-se .se-cm-tip { flex: 1 1 100%; color: var(--s-muted); font-size: 12px; }
#lg-se .se-cm-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
#lg-se .se-cm-chips span { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; height: 26px; padding: 0 10px 0 3px; border: 1px solid var(--s-line); border-radius: 13px; background: #fff; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-se .se-cm-chips span.off { border-style: dashed; border-color: #e8b4ae; color: var(--s-bad); }
#lg-se .mp-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; font-size: 10px; font-weight: 700; }
#lg-se .se-cm-chips .mp-logo { width: 20px; height: 20px; border-radius: 10px; }
#lg-se .se-btn.sm { height: 30px; padding: 0 14px; font-size: 13px; }

/* 各平台标题 */
#lg-se .se-pt { display: flex; flex-direction: column; }
#lg-se .se-ptr { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--s-line); }
#lg-se .se-ptr:first-child { border-top: 0; padding-top: 0; }
#lg-se .se-ptp { display: flex; align-items: center; gap: 10px; min-width: 0; }
#lg-se .se-ptp .mp-logo { width: 28px; height: 28px; border-radius: 7px; }
#lg-se .se-ptp div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
#lg-se .se-ptp strong { font-weight: 600; }
#lg-se .se-ptp span { color: var(--s-muted); font-size: 12px; }
#lg-se .se-pti { position: relative; min-width: 0; }
#lg-se .se-pti input { padding-right: 84px; }
#lg-se .se-pti em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--s-muted); pointer-events: none; }
#lg-se .se-pti em.bad { color: var(--s-bad); font-weight: 600; }
#lg-se .se-pti.bad input { border: 2px solid var(--s-bad); background: #fdecea; }
#lg-se .se-ptn { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--s-muted); font-size: 12px; }
#lg-se .se-ptn span { min-width: 0; }
#lg-se .se-ptn .ok { color: var(--s-brand); }
#lg-se .se-ptn .bad { color: var(--s-bad); font-weight: 600; }
#lg-se .se-ptn button { height: 24px; padding: 0 10px; border: 1px solid var(--s-brand); border-radius: 12px; background: #fff; color: var(--s-brand); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
#lg-se .se-ptn button:hover { background: var(--s-soft); }
@media (max-width: 560px) { #lg-se .se-ptr { grid-template-columns: 1fr; } #lg-se .se-ptn { grid-column: 1; } }

/* 库存表 */
#lg-se .se-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--s-line); border-radius: 10px; }
#lg-se table { width: 100%; border-collapse: separate; border-spacing: 0; }
#lg-se th, #lg-se td { padding: 10px 12px; border-bottom: 1px solid var(--s-line); text-align: left; }
#lg-se tbody tr:last-child td { border-bottom: 0; }
#lg-se th { background: #f5f8f7; color: var(--s-muted); font-weight: 600; white-space: nowrap; }
#lg-se td.strong { color: var(--s-brand); font-weight: 700; }

/* 关联刊登（列表样式复用 70-multi-publish.css 的 .lg-mp-assoc） */
#lg-se .mpp-list { list-style: none; max-width: 640px; margin: 0; padding: 0; border-bottom: 1px solid var(--s-line); }
#lg-se .mpp-list > li:first-child { border-top: 0; }
#lg-se .se-empty { display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; border: 1px dashed #cfdad7; border-radius: 12px; text-align: center; }
#lg-se .se-empty span { color: var(--s-muted); font-size: 13px; }

/* 底部固定操作栏 */
#lg-se .se-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 24px; border-top: 1px solid var(--s-line); background: #fff; box-shadow: 0 -4px 16px rgba(15, 26, 24, .06); }
#lg-se .se-foot span { margin-right: auto; color: var(--s-brand); font-weight: 600; }

@media (max-width: 900px) {
  #lg-se .se-cols { grid-template-columns: 1fr; }
  #lg-se .se-nav { position: static; flex-direction: row; overflow-x: auto; }
  #lg-se .se-nav button { flex: none; white-space: nowrap; }
  #lg-se .se-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #lg-se { padding: 8px 8px 132px; }
  #lg-se .se-grid, #lg-se .se-grid.four { grid-template-columns: 1fr; }
  #lg-se .se-foot { padding: 10px; }
  #lg-se .se-foot .se-btn { flex: 1; }
  #lg-se .se-foot span { width: 100%; }
}
