* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f7fa;
  --panel: #fff;
  --line: #e6e9ef;
  --text: #1f2733;
  --muted: #7a869a;
  --brand: #2563eb;
  --brand2: #1e40af;
  --amber: #d97706;
  --green: #16a34a;
  --red: #dc2626;
}
body { font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
#app { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: #0f172a; color: #cbd5e1; padding: 22px 14px; display: flex; flex-direction: column; }
.logo { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.logo span { display: block; font-size: 12px; font-weight: 400; color: #60a5fa; margin-top: 2px; }
.sidebar nav { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a { color: #cbd5e1; text-decoration: none; padding: 11px 14px; border-radius: 8px; font-size: 14px; transition: .15s; }
.sidebar nav a:hover { background: #1e293b; color: #fff; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.side-foot { margin-top: auto; font-size: 11px; color: #64748b; }
.content { flex: 1; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: baseline; gap: 14px; padding: 20px 28px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar h1 { font-size: 20px; }
.hint { font-size: 12px; color: var(--muted); }
.view { padding: 26px 28px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.tile { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--text); transition: .15s; }
.tile:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(37,99,235,.12); transform: translateY(-2px); }
.tile b { font-size: 15px; }
.tile .muted { font-size: 13px; line-height: 1.5; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--brand); }
.stat .l { font-size: 13px; color: var(--muted); margin-top: 4px; }

h2.sec { font-size: 16px; margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 5px; }
input, textarea, select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; }
textarea { resize: vertical; min-height: 60px; }
button { cursor: pointer; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; background: var(--brand); color: #fff; transition: .15s; }
button:hover { background: var(--brand2); }
button.ghost { background: #eef2ff; color: var(--brand2); }
button.amber { background: var(--amber); }
button.amber:hover { background: #b45309; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; background: #fafbfc; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.tag.green { background: #dcfce7; color: #166534; }
.tag.amber { background: #fef3c7; color: #92400e; }
.tag.gray { background: #eef2f7; color: #64748b; }
.tag.blue { background: #dbeafe; color: #1e40af; }

.product { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.product img { width: 100%; height: 160px; object-fit: cover; }
.product .body { padding: 12px; }
.product .title { font-size: 14px; font-weight: 600; line-height: 1.4; min-height: 38px; }
.product .price { color: var(--red); font-weight: 700; margin: 6px 0; }
.product .meta { font-size: 12px; color: var(--muted); }
.product .ch { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; }

.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; background: #fff; }
.check input { width: auto; }
.toast { position: fixed; bottom: 26px; right: 26px; background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transform: translateY(10px); transition: .2s; z-index: 99; }
.toast.show { opacity: 1; transform: translateY(0); }
.muted { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.btn-sm.danger { background: #fee2e2; color: #b91c1c; }
.btn-sm.danger:hover { background: #fecaca; }
code { background: #eef2f7; padding: 2px 6px; border-radius: 5px; font-size: 12px; }
code.k { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
pre.code { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 10px; font-size: 13px; line-height: 1.55; overflow: auto; max-height: 440px; white-space: pre-wrap; word-break: break-all; }
.select-tip { font-size: 12px; color: var(--muted); }

/* ===== V1 工程化落地：登录浮层 / 后端状态 / 顶栏控件 ===== */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.overlay[hidden] { display: none; }
.login-card { width: 360px; max-width: 92vw; background: var(--panel); border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.login-card h2 { font-size: 18px; margin: 12px 0 4px; }
.login-card .logo { color: #0f172a; }
.login-card .logo span { color: var(--brand); }
.login-card .muted { margin: 6px 0 10px; }
.login-card button { width: 100%; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 8px; }
.topbar { flex-wrap: wrap; }
.topbar .top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip { font-size: 12px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.chip.demo { background: #eef2f7; color: #64748b; }
.chip.live { background: #dcfce7; color: #166534; }
.chip.warn { background: #fef3c7; color: #92400e; }
.link-btn { background: none; color: var(--brand); padding: 4px 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; }
.link-btn:hover { background: #eef2ff; color: var(--brand2); }

/* ===== V2.2 科技感概览 + 选品分发中心 + PIM 全字段 ===== */
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px 32px; border-radius: 16px; margin-bottom: 20px; color: #fff; background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%); box-shadow: 0 10px 30px rgba(15, 23, 42, .25); }
.hero-glow { position: absolute; right: -80px; top: -100px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(96, 165, 250, .45), transparent 70%); pointer-events: none; }
.hero-left { position: relative; z-index: 1; }
.hero-kicker { font-size: 12px; letter-spacing: 2px; color: #93c5fd; margin-bottom: 8px; }
.hero-left h2 { font-size: 22px; margin-bottom: 8px; }
.hero-left p { font-size: 13px; color: #c7d5ee; max-width: 560px; line-height: 1.6; }
.hero-badges { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-right { position: relative; z-index: 1; text-align: right; min-width: 190px; }
.hero-num { font-size: 44px; font-weight: 800; background: linear-gradient(90deg, #fff, #93c5fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-num.sm { font-size: 26px; margin-top: 8px; }
.hero-lbl { font-size: 12px; color: #93c5fd; margin-top: 2px; }
.hero-sub { font-size: 12px; color: #c7d5ee; margin-top: 6px; }
.stat.tech { position: relative; overflow: hidden; border: 1px solid var(--line); }
.stat.tech::after { content: ''; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: rgba(37, 99, 235, .07); }
.stat.tech .ico { font-size: 22px; margin-bottom: 6px; }
.stat.tech .n { font-size: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.donut-wrap { display: flex; align-items: center; gap: 26px; padding: 6px 0; }
.donut { position: relative; width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(#2563eb var(--p), #eef2f7 0); display: flex; align-items: center; justify-content: center; }
.donut::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.donut b { position: relative; z-index: 1; font-size: 20px; color: var(--brand); }
.donut-legend { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.g { background: var(--green); } .dot.a { background: var(--amber); } .dot.gr { background: #cbd5e1; }
.hbar { display: grid; grid-template-columns: 84px 1fr 30px; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.hbar-l { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.hbar-n { text-align: right; color: var(--text); font-weight: 600; }
.score-bar { display: inline-block; width: 74px; height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-right: 6px; vertical-align: middle; }
.score-bar i { display: block; height: 100%; background: linear-gradient(90deg, #16a34a, #84cc16); }
.thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; }
.p-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.p-title { font-weight: 600; font-size: 13px; line-height: 1.35; }
.form-sec { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: #fbfcfe; }
.form-sec b { display: block; font-size: 13px; color: var(--brand2); margin-bottom: 4px; }
.img-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; min-height: 62px; }
.img-preview img.pv { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.filter-bar { border-top: 3px solid var(--brand); }
.action-bar { border-top: 3px solid var(--amber); background: linear-gradient(180deg, #fffdf5, #fff); }
.ops { white-space: nowrap; }
.ops .link-btn { margin-right: 4px; }

/* ===== V2.3 全站精修：统一设计系统 ===== */
/* 侧边导航分组与图标 */
.nav-group { font-size: 11px; color: #475569; letter-spacing: 1px; margin: 18px 6px 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 8px; }
.sidebar nav a.active { box-shadow: 0 4px 12px rgba(37, 99, 235, .35); }
/* 顶栏页头 */
.topbar { position: sticky; top: 0; z-index: 20; }
.topbar-left { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.topbar-left h1 { font-size: 19px; }
.page-desc { font-size: 12px; color: var(--muted); }
/* 卡片统一质感 */
.card { box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .08); }
h2.sec { display: flex; align-items: center; gap: 8px; }
h2.sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
/* 表单控件焦点态 */
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
input, textarea, select { transition: border-color .15s, box-shadow .15s; }
label.f { font-weight: 600; }
/* 按钮反馈 */
button { box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
button:active { transform: translateY(1px); }
button.ghost:hover { background: #e2e8f0; }
/* 表格 */
table { overflow: hidden; border-radius: 10px; }
thead th { position: sticky; top: 0; z-index: 1; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8fafc; }
td { vertical-align: middle; }
/* 指标卡升级 */
.stat { position: relative; }
.stat .n { background: linear-gradient(120deg, var(--brand), #60a5fa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
/* 商城卡片升级 */
.product { transition: transform .18s, box-shadow .18s; }
.product:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, .1); }
.product .price { font-size: 17px; }
.product .brand { display: inline-block; font-size: 11px; color: var(--muted); background: #f1f5f9; border-radius: 999px; padding: 2px 8px; margin-bottom: 4px; }
.product .mkt { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
/* 页签（订单状态筛选用） */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; color: var(--muted); transition: .15s; }
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.tab .cnt { opacity: .75; margin-left: 4px; font-size: 12px; }
/* 搜索条 */
.search-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.search-row .grow { flex: 1; min-width: 200px; }
/* 响应式 */
@media (max-width: 900px) {
  .sidebar { width: 64px; padding: 18px 8px; }
  .sidebar .logo span, .sidebar nav a, .nav-group { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }

/* ===== V2.4 经营总控台 · 数据驾驶舱 ===== */
.ctrl-flow { background: linear-gradient(180deg, #f8fbff, #fff); }
.flow-scroll { overflow-x: auto; padding: 6px 0; }
.flow-arrow line { animation: flowDash 1.2s linear infinite; }
@keyframes flowDash { to { stroke-dashoffset: -18; } }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.alert-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.alert-item:last-child { border-bottom: none; }
.alert-item .grow { flex: 1; }
.alert-item > span { font-size: 17px; }
.grow { flex: 1; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
a.tile.quick { align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: 13px; padding: 14px 8px; }
.sys-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; font-size: 13px; border-bottom: 1px dashed var(--line); }
.sys-row:last-child { border-bottom: none; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(22, 163, 74, .6); }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 6px rgba(217, 119, 6, .6); }
.status-dot.gray { background: #cbd5e1; }
.status-dot.blue { background: var(--brand); box-shadow: 0 0 6px rgba(37, 99, 235, .6); }
.evt { display: flex; align-items: flex-start; gap: 9px; padding: 7px 2px; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.evt:last-child { border-bottom: none; }
.evt > span { font-size: 15px; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== V2.5 PIM 全生命周期 + 选品中心 ===== */
.prod-detail { display: flex; gap: 18px; padding: 16px; margin-bottom: 14px; border: 1px solid #dbeafe; background: linear-gradient(180deg, #f8fbff, #fff); border-radius: 12px; }
.pd-main { flex-shrink: 0; }
.pd-main img { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.pd-info { flex: 1; min-width: 0; }
.pd-info h3 { font-size: 15px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pd-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0; }
.pd-grid div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.pd-grid span { display: block; font-size: 11px; color: var(--muted); }
.pd-grid b { font-size: 13px; }
.pd-sec { margin-top: 8px; font-size: 13px; }
.pd-sec b { color: var(--muted); margin-right: 8px; }
.pd-sec .pv { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; margin: 4px 6px 0 0; border: 1px solid var(--line); }
.dist-chip { display: inline-flex; align-items: center; gap: 6px; margin: 3px 8px 3px 0; }
.dist-chip .link-btn { padding: 1px 8px; font-size: 12px; }
@media (max-width: 900px) { .pd-grid { grid-template-columns: repeat(3, 1fr); } .prod-detail { flex-direction: column; } }

/* ===== V2.7 电商风图片上传（淘宝/京东/1688 样式） ===== */
.img-zone-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 8px; }
.img-zone-head b { font-size: 13px; color: var(--muted); }
.img-zone { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 92px; }
.img-zone.drag { border-color: var(--brand); background: #f0f7ff; box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .15); }
.img-box { position: relative; width: 88px; height: 88px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
.img-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-box.broken img { opacity: .25; }
.img-badge { position: absolute; left: 0; top: 0; background: var(--brand); color: #fff; font-size: 11px; padding: 2px 8px; border-bottom-right-radius: 8px; z-index: 2; }
.img-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; transition: opacity .15s; }
.img-box:hover .img-mask { opacity: 1; }
.img-mask .btn-sm { padding: 5px 9px; font-size: 12px; background: #fff; color: var(--text); }
.img-mask .btn-sm:hover { background: #e2e8f0; }
.img-mask .btn-sm.danger { background: #fee2e2; color: #b91c1c; }
.img-mask .btn-sm.danger:hover { background: #fecaca; }
.img-add { width: 88px; height: 88px; border: 1.5px dashed #93c5fd; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--brand); background: #f8fbff; transition: all .15s; flex-shrink: 0; }
.img-add:hover { border-color: var(--brand); background: #eef4ff; }
.img-add .plus { font-size: 26px; line-height: 1; font-weight: 300; }
.img-add .cnt { font-size: 11px; color: var(--muted); }
.img-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .7); display: flex; align-items: center; justify-content: center; z-index: 200; }
.img-modal[hidden] { display: none; }
.img-modal-box { background: #fff; border-radius: 12px; padding: 14px; max-width: 86vw; }
.img-modal-box img { max-width: 80vw; max-height: 74vh; border-radius: 8px; display: block; }
.img-modal-box button { margin-top: 10px; }

/* ===== V2.9 深度优化：多规格 SKU 编辑器（电商传统方式 · 规格项可视化）+ 分类管理 + 高级导出 ===== */
.sku-editor { margin-top: 10px; padding: 12px; border: 1px dashed #bfdbfe; border-radius: 10px; background: #f8fbff; }
.sku-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sku-head-btns { display: flex; gap: 6px; flex-shrink: 0; }
.spec-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.spec-item { background: #fff; border: 1px solid #e0e7ff; border-radius: 10px; padding: 10px 12px; }
.spec-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.spec-item-head .spec-name { flex: 1; min-width: 120px; padding: 6px 10px; border: 1px solid #d4d4d8; border-radius: 6px; font-weight: 600; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; min-height: 24px; }
.spec-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #3730a3; border-radius: 14px; font-size: 13px; font-weight: 500; }
.spec-chip b { font-weight: 700; cursor: pointer; opacity: .55; padding: 0 4px; border-radius: 50%; }
.spec-chip b:hover { opacity: 1; background: #fff; color: #dc2626; }
.spec-add-value { display: flex; gap: 6px; }
.spec-add-value input { flex: 1; padding: 6px 10px; border: 1px solid #d4d4d8; border-radius: 6px; font-size: 13px; }
.spec-add-row { display: flex; gap: 8px; margin: 6px 0 10px; padding: 10px; background: #fff; border: 1px dashed #c7d2fe; border-radius: 10px; }
.spec-add-row input { flex: 1; padding: 6px 10px; border: 1px solid #d4d4d8; border-radius: 6px; }
.batch-fill { display: flex; align-items: center; gap: 6px; padding: 10px 12px; margin: 10px 0; background: linear-gradient(135deg, #fef3c7, #fde68a); border-radius: 8px; border: 1px solid #fbbf24; flex-wrap: wrap; }
.batch-fill input { padding: 5px 8px; border: 1px solid #d4d4d8; border-radius: 6px; font-size: 13px; width: 110px; }
.batch-fill input#bf-sku-pre { width: 160px; }
.sku-table { margin-top: 8px; width: 100%; }
.sku-table input { width: 92px; padding: 6px 8px; font-size: 13px; border: 1px solid #d4d4d8; border-radius: 4px; }
.sku-table input.sku-img { width: 130px; }
.sku-table th, .sku-table td { padding: 6px 8px; font-size: 13px; }
.sku-table th { background: #f1f5f9; color: #334155; font-weight: 600; }
.sku-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: 13px; flex-wrap: wrap; }
#sku-total { color: var(--brand); font-weight: 700; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.cm-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cm-item span:first-child { font-size: 13px; color: var(--text); min-width: 52px; }
.cm-item input { width: 70px; padding: 6px 8px; }
.cm-item .muted { font-size: 12px; }
.btn-sm.amber { background: var(--amber); color: #fff; }

/* ===== V2.9 弹窗（overlay / overlay-box） ===== */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; overflow: auto; }
.overlay[hidden] { display: none; }
.overlay-box { background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); max-width: 980px; max-height: 92vh; width: 100%; display: flex; flex-direction: column; overflow: hidden; }
.overlay-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid #e5e7eb; background: linear-gradient(90deg, #f0f9ff, #f8fbff); gap: 10px; flex-wrap: wrap; }
.overlay-head b { font-size: 16px; color: var(--text); }
.overlay-head > div { display: flex; gap: 6px; }
.overlay-body { padding: 16px 20px; overflow: auto; flex: 1; }
.overlay-head .ghost { padding: 4px 12px; font-size: 12px; }

/* ===== V3.0 系统设置 · RBAC 权限管理 ===== */
.settings-page { max-width: 1200px; }
.settings-header { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.settings-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--line); }
.settings-tab { padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 14px; cursor: pointer; color: var(--muted); transition: all .15s; font-weight: 500; }
.settings-tab:hover { border-color: var(--brand); color: var(--brand); background: #f0f7ff; }
.settings-tab.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(37, 99, 235, .25); }
.settings-body { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.role-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.perm-cb { width: 18px !important; height: 18px; cursor: pointer; accent-color: var(--brand); }
.data-tbl th { white-space: nowrap; }
.data-tbl td { vertical-align: middle; }
.ch-enabled { width: 20px !important; height: 20px; cursor: pointer; accent-color: var(--green); }
.ch-markup { text-align: center; }
/* 权限矩阵表格 */
.data-tbl .perm-cb:checked { accent-color: var(--green); }
/* 设置页面卡片间距 */
.settings-body .card { margin-bottom: 18px; }
/* 危险区域卡片 */
.settings-body .card[style*="--red"] { border-color: #fecaca; background: linear-gradient(180deg, #fef2f2, #fff); }
.settings-body .card[style*="--red"] h2.sec { color: var(--red); }
/* 字段说明表格 */
.data-tbl { border-collapse: collapse; }
.data-tbl th { background: #f1f5f9; color: #334155; padding: 8px 10px; text-align: left; font-weight: 600; font-size: 13px; border-bottom: 2px solid #cbd5e1; }
.data-tbl td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.data-tbl code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; color: #1e293b; }
.data-tbl tbody tr:hover { background: #f8fbff; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.tag.green { background: #dcfce7; color: #166534; }
.tag.gray { background: #f1f5f9; color: #475569; }
.tag.amber { background: #fef3c7; color: #92400e; }
.tag.blue { background: #dbeafe; color: #1e40af; }
.btn-sm.amber:hover { background: #b45309; }

/* ===== V3.1 注册 / 入驻 ===== */
.reg-wrap { max-width: 920px; margin: 0 auto; }
.reg-hero { flex-direction: column; align-items: flex-start; gap: 8px; }
.reg-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.reg-tab { background: var(--panel); border: 1.5px solid var(--line); border-radius: 14px; padding: 18px 16px; cursor: pointer; transition: .15s; }
.reg-tab:hover { border-color: #93c5fd; box-shadow: 0 4px 14px rgba(37,99,235,.1); }
.reg-tab.active { border-color: var(--brand); background: linear-gradient(180deg, #eff6ff, #fff); box-shadow: 0 6px 20px rgba(37,99,235,.16); }
.reg-tab .ico { font-size: 28px; }
.reg-tab b { display: block; margin: 8px 0 4px; font-size: 15px; }
.reg-card { max-width: 920px; margin: 0 auto; }

/* ===== V3.1 角色专属工作台横幅 ===== */
.portal-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-radius: 14px; margin-bottom: 18px; color: #fff; }
.portal-banner .pb-left { display: flex; align-items: center; gap: 14px; }
.portal-banner .pb-ico { font-size: 34px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); border-radius: 14px; }
.portal-banner b { font-size: 18px; }
.portal-banner .pb-right { display: flex; align-items: center; gap: 10px; }
.portal-banner.sup { background: linear-gradient(120deg, #0ea5e9, #0369a1); }
.portal-banner.dist { background: linear-gradient(120deg, #8b5cf6, #6d28d9); }
.portal-banner.admin { background: linear-gradient(120deg, #1e293b, #0f172a); border: 1px solid #334155; }
.portal-banner .link-btn { color: #fff; border-color: rgba(255,255,255,.4); }
.portal-banner .link-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.sec-row { display: flex; align-items: center; justify-content: space-between; }
/* 角色标识 */
.role-pill { display: inline-block; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
@media (max-width: 900px) { .reg-tabs { grid-template-columns: 1fr; } .portal-banner { flex-direction: column; align-items: flex-start; } }

/* =====================================================================
 * V4.0 深色科技主题（整体换肤：玻璃拟态 · 霓虹渐变 · 辉光 · 大气布局）
 * 追加于文件末尾，以变量覆盖 + 组件覆写方式实现，旧类名全部保留
 * ===================================================================== */
:root {
  --bg: #070b16;
  --bg2: #0c1322;
  --panel: rgba(21, 30, 52, .72);
  --panel-solid: #111a2e;
  --line: rgba(125, 155, 205, .16);
  --text: #e6edf7;
  --muted: #8b9bb8;
  --brand: #3b82f6;
  --brand2: #60a5fa;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #f59e0b;
  --green: #34d399;
  --red: #f87171;
  --glow: 0 0 0 1px rgba(59, 130, 246, .35), 0 8px 30px rgba(34, 211, 238, .12);
}
body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(59, 130, 246, .16), transparent 60%),
    radial-gradient(900px 480px at 105% 0%, rgba(139, 92, 246, .13), transparent 55%),
    radial-gradient(800px 600px at 50% 115%, rgba(34, 211, 238, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  background-attachment: fixed;
}
#app { background: transparent; }
/* 侧栏：深色玻璃 + 霓虹激活 */
.sidebar {
  background: linear-gradient(180deg, rgba(13, 20, 38, .96), rgba(8, 13, 26, .96));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.logo { background: linear-gradient(90deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: 21px; }
.logo span { -webkit-text-fill-color: var(--muted); color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.nav-group { color: #54658a; font-weight: 700; }
.sidebar nav a { color: #9fb0cc; border: 1px solid transparent; }
.sidebar nav a:hover { background: rgba(59, 130, 246, .1); color: #fff; border-color: rgba(96, 165, 250, .25); }
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, .22), rgba(34, 211, 238, .08));
  color: #fff; border-color: rgba(96, 165, 250, .4); box-shadow: var(--glow);
}
.sidebar nav a.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #22d3ee, #3b82f6); }
.sidebar nav a { position: relative; }
.side-foot { color: #42526f; }
/* 顶栏：玻璃吸顶 + 新组件 */
.topbar {
  background: rgba(9, 14, 27, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 12px;
}
.topbar-left h1 { font-size: 20px; background: linear-gradient(90deg, #e6edf7, #93c5fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.crumb { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; }
.top-search { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; min-width: 200px; background: rgba(16, 25, 45, .85); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 38px; transition: .2s; }
.top-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
.top-search .ts-ico { color: var(--muted); font-size: 13px; }
.top-search input { border: none; background: none; padding: 0; height: 100%; color: var(--text); box-shadow: none; font-size: 13px; }
.top-search input:focus { box-shadow: none; }
.top-icon { position: relative; background: rgba(16, 25, 45, .85); border: 1px solid var(--line); color: var(--text); padding: 6px 12px; border-radius: 10px; font-size: 16px; }
.top-icon:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.top-icon .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 4px; border-radius: 999px; background: linear-gradient(90deg, #f87171, #fb7185); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; box-shadow: 0 0 10px rgba(248, 113, 113, .6); }
.chip { border: 1px solid var(--line); }
.chip.demo { background: rgba(148, 163, 184, .14); color: #b6c2d4; }
.chip.live { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
.chip.warn { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.link-btn { background: rgba(16, 25, 45, .6); color: var(--brand2); border: 1px solid var(--line); }
.link-btn:hover { background: rgba(59, 130, 246, .12); color: #93c5fd; }
/* 卡片：玻璃拟态 + 辉光 */
.card, .stat, .tile {
  background: linear-gradient(180deg, rgba(24, 34, 58, .74), rgba(15, 23, 43, .74));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.card:hover, .tile:hover { box-shadow: 0 10px 34px rgba(34, 211, 238, .1); border-color: rgba(96, 165, 250, .35); }
.tile:hover { border-color: rgba(96, 165, 250, .45); transform: translateY(-3px); }
.stat .n { background: linear-gradient(120deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat.tech::after { background: rgba(34, 211, 238, .08); }
.stat.tech .n { font-size: 30px; }
.kpi-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
/* 标题与分隔线 */
h2.sec { color: var(--text); }
h2.sec::after { background: linear-gradient(90deg, rgba(125, 155, 205, .25), transparent); }
/* 表单控件深色化 */
input, textarea, select {
  background: rgba(12, 19, 36, .85);
  border: 1px solid var(--line);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: #56678a; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
label.f { color: var(--muted); }
/* 按钮 */
button { background: linear-gradient(90deg, #2563eb, #3b82f6); box-shadow: 0 2px 10px rgba(37, 99, 235, .35); }
button:hover { background: linear-gradient(90deg, #1d4ed8, #2563eb); box-shadow: 0 4px 16px rgba(59, 130, 246, .45); }
button.ghost { background: rgba(59, 130, 246, .1); color: var(--brand2); }
button.ghost:hover { background: rgba(59, 130, 246, .2); }
button.amber { background: linear-gradient(90deg, #d97706, #f59e0b); }
button.amber:hover { background: linear-gradient(90deg, #b45309, #d97706); }
.btn-sm.danger { background: rgba(248, 113, 113, .14); color: #fca5a5; }
.btn-sm.danger:hover { background: rgba(248, 113, 113, .24); }
/* 表格深色化 */
th { background: rgba(30, 42, 70, .6); color: #9fb0cc; }
th, td { border-bottom: 1px solid rgba(125, 155, 205, .12); }
tbody tr:hover { background: rgba(59, 130, 246, .07); }
table { border-radius: 10px; }
/* 标签深色适配 */
.tag.green { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
.tag.amber { background: rgba(245, 158, 11, .15); color: #fcd34d; }
.tag.gray { background: rgba(148, 163, 184, .16); color: #b6c2d4; }
.tag.blue { background: rgba(96, 165, 250, .16); color: #93c5fd; }
.tag.red { background: rgba(248, 113, 113, .16); color: #fca5a5; }
/* 页签 */
.tabs { gap: 8px; }
.tab { background: rgba(16, 25, 45, .8); border: 1px solid var(--line); color: var(--muted); }
.tab:hover { border-color: var(--brand); color: var(--brand2); }
.tab.on { background: linear-gradient(90deg, #2563eb, #3b82f6); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(59, 130, 246, .4); }
/* 产品卡 / 商城 */
.product { background: linear-gradient(180deg, rgba(24, 34, 58, .8), rgba(15, 23, 43, .8)); border: 1px solid var(--line); }
.product:hover { box-shadow: 0 12px 30px rgba(34, 211, 238, .12); }
.product .price { color: #fb7185; }
.product .brand { background: rgba(148, 163, 184, .16); color: #b6c2d4; }
/* 杂项硬编码色覆写 */
.check { background: rgba(16, 25, 45, .8); color: var(--text); }
.donut { background: conic-gradient(#3b82f6 var(--p), rgba(125, 155, 205, .2) 0); }
.donut::before { background: var(--panel-solid); }
.donut b { color: #60a5fa; }
.hbar-track { background: rgba(125, 155, 205, .18); }
.hbar-track i { background: linear-gradient(90deg, #3b82f6, #22d3ee); }
.score-bar { background: rgba(125, 155, 205, .18); }
.score-bar i { background: linear-gradient(90deg, #34d399, #a3e635); }
.form-sec { background: rgba(13, 20, 38, .55); border-color: var(--line); }
.form-sec b { color: #93c5fd; }
.img-preview { border-color: rgba(125, 155, 205, .25); }
.action-bar { border-top: 3px solid rgba(245, 158, 11, .7); background: linear-gradient(180deg, rgba(40, 32, 12, .5), rgba(15, 23, 43, .5)); }
.reg-tab { background: rgba(16, 25, 45, .8); border-color: var(--line); }
.reg-tab.active { border-color: var(--brand); background: linear-gradient(180deg, rgba(37, 99, 235, .2), rgba(15, 23, 43, .8)); }
.code, pre.code { background: #0a1120; color: #c9d6ea; border: 1px solid var(--line); }
code { background: rgba(148, 163, 184, .16); color: #c9d6ea; }
.toast { background: rgba(13, 20, 38, .92); border: 1px solid rgba(96, 165, 250, .3); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.overlay { background: rgba(4, 8, 18, .66); backdrop-filter: blur(6px); }
.overlay-box { background: linear-gradient(180deg, rgba(24, 34, 58, .97), rgba(13, 20, 38, .97)); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.overlay-head { border-bottom: 1px solid var(--line); }
.overlay-head b { color: var(--text); }
.login-card { background: linear-gradient(180deg, rgba(24, 34, 58, .97), rgba(13, 20, 38, .97)); border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.login-card .logo { color: var(--text); }
.login-card .logo span { color: #60a5fa; }
.login-card h2 { color: var(--text); }
.empty { color: var(--muted); }
.muted { color: var(--muted); }
.hero { background: linear-gradient(120deg, #0b1226 0%, #12224d 55%, #1d3f8f 100%); }
.hero-left p, .hero-sub { color: #a9bede; }
.hero-lbl, .hero-kicker { color: #7fb0ff; }
.hero-num { background: linear-gradient(90deg, #fff, #7dd3fc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-glow { background: radial-gradient(circle, rgba(56, 189, 248, .4), transparent 70%); }
.role-pill { box-shadow: 0 0 12px rgba(96, 165, 250, .35); }
.portal-banner { border: 1px solid rgba(255, 255, 255, .08); }
/* ===== V4.0 新组件：命令面板 ===== */
.palette { position: fixed; inset: 0; z-index: 200; background: rgba(4, 8, 18, .6); backdrop-filter: blur(6px); display: flex; justify-content: center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.palette-box { width: 620px; max-width: 92vw; height: 420px; background: linear-gradient(180deg, rgba(24, 34, 58, .98), rgba(11, 18, 34, .98)); border: 1px solid rgba(96, 165, 250, .3); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(59, 130, 246, .2); display: flex; flex-direction: column; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input .pi-ico { color: var(--brand2); font-size: 16px; }
.palette-input input { border: none; background: none; font-size: 15px; height: auto; padding: 0; }
.palette-input input:focus { box-shadow: none; }
.palette-list { flex: 1; overflow: auto; padding: 8px; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.pl-item:hover { background: rgba(59, 130, 246, .14); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .25); }
.pl-ico { font-size: 18px; width: 30px; text-align: center; }
.pl-t { font-size: 14px; color: var(--text); font-weight: 600; min-width: 150px; }
.pl-d { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-foot { padding: 8px 16px; font-size: 11px; border-top: 1px solid var(--line); color: var(--muted); }
/* ===== V4.0 新组件：消息待办 ===== */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16, 25, 45, .6); text-decoration: none; transition: .15s; }
.todo-item:hover { border-color: rgba(96, 165, 250, .45); box-shadow: var(--glow); transform: translateX(3px); }
.todo-ico { font-size: 20px; }
.todo-t { flex: 1; color: var(--text); font-size: 14px; font-weight: 600; }
.todo-n { min-width: 30px; text-align: center; background: linear-gradient(90deg, #2563eb, #3b82f6); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.todo-go { color: var(--brand2); font-size: 12px; }
.msg-list { display: flex; flex-direction: column; gap: 8px; }
.msg-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16, 25, 45, .6); }
.msg-item.unread { border-color: rgba(96, 165, 250, .4); box-shadow: 0 0 0 1px rgba(59, 130, 246, .2); }
.msg-ico { font-size: 20px; }
.msg-body { flex: 1; min-width: 0; }
.msg-text { font-size: 13.5px; color: var(--text); }
.msg-item.unread .msg-text { font-weight: 700; }
.msg-ops { display: flex; gap: 6px; align-items: center; }
/* ===== V4.0 新组件：通用 ===== */
.v4-tab { min-height: 220px; }
.v4-empty { padding: 46px 20px; }
.v4-alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; background: rgba(245, 158, 11, .14); color: #fcd34d; border: 1px solid rgba(245, 158, 11, .3); }
.v4-alert.ok { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.v4-ul { padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 2; }
/* 视图切换动效 */
@keyframes v4fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#view.v4fade { animation: v4fadeUp .28s ease; }
/* 滚动条科技化 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(96, 165, 250, .3); border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: rgba(96, 165, 250, .5); }
::-webkit-scrollbar-track { background: transparent; }
/* 响应式微调 */
@media (max-width: 900px) {
  .top-search { flex: 1 1 100%; order: 5; }
  .palette { padding-top: 6vh; }
  .pl-t { min-width: 110px; }
}
