/* ===== Shopee 运营 OA 高保真原型 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #1e293b;
  --sub: #64748b;
  --sidebar: #0f172a;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --purple: #7c3aed;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }

/* ---- 登录页 ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px 44px 32px;
  width: 480px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: var(--sub); font-size: 13px; margin-bottom: 26px; }
.login-card .form-item { margin-bottom: 16px; }
.login-card .form-item input { padding: 11px 12px; }
.account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.account-chip {
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.account-chip:hover { border-color: var(--primary); }
.account-chip.active { border-color: var(--primary); background: #eff6ff; }
.account-chip b { display: block; font-size: 14px; }
.account-chip span { font-size: 12px; color: var(--sub); }
.login-hint { margin-top: 16px; font-size: 12px; color: #94a3b8; text-align: center; }

/* ---- 布局 ---- */
.layout { display: flex; min-height: 100vh; height: 100vh; overflow: hidden; }
.sidebar {
  width: 216px;
  background: var(--sidebar);
  color: #cbd5e1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;          /* 菜单不滚动 */
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}
.logo { min-height: 74px; padding: 14px 10px 14px 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .2px; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.logo-mark { width: 25px; text-align: center; font-size: 20px; flex-shrink: 0; }
.logo-copy { min-width: 0; white-space: nowrap; }
.logo small { display: block; font-weight: 400; font-size: 11px; color: #64748b; margin-top: 3px; }
.sidebar-toggle { margin-left: auto; width: 25px; height: 28px; flex-shrink: 0; border: 0; border-radius: 6px; color: #cbd5e1; background: rgba(255,255,255,.08); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.sidebar-toggle:hover { background: rgba(255,255,255,.18); color: #fff; }
.nav { padding: 12px 10px; flex: 1; overflow: hidden; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 8px; cursor: pointer;
  margin-bottom: 3px; font-size: 14px;
}
.nav-icon { width: 20px; flex-shrink: 0; text-align: center; font-size: 18px; line-height: 1; }
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .cnt { margin-left: auto; background: rgba(255,255,255,.15); border-radius: 99px; font-size: 11px; padding: 1px 8px; }
.side-foot { padding: 14px 18px; font-size: 11px; color: #475569; border-top: 1px solid rgba(255,255,255,.08); line-height: 1.7; flex-shrink: 0; }
.sidebar.compact { width: 64px; }
.sidebar.compact .logo { min-height: 74px; padding: 8px 4px; flex-direction: column; justify-content: center; gap: 2px; }
.sidebar.compact .logo-copy, .sidebar.compact .nav-item .cnt, .sidebar.compact .side-foot { display: none; }
.sidebar.compact .nav-label { display: none; }
.sidebar.compact .sidebar-toggle { margin: 0; width: 30px; height: 22px; line-height: 18px; }
.sidebar.compact .nav { padding: 12px 8px; }
.sidebar.compact .nav-item { justify-content: center; padding: 11px 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; }
.topbar {
  height: 56px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; gap: 14px;
  position: sticky; top: 0; z-index: 20; flex-shrink: 0;
}
.topbar .title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.role-switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--sub); flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 8px; background: #f8fafc; border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px 5px 6px; flex-shrink: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.content { padding: 24px; flex: 1; }

/* ---- 通用组件 ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .tag { font-size: 11px; font-weight: 400; color: var(--sub); background: #f1f5f9; padding: 2px 8px; border-radius: 99px; }
.btn {
  border: none; border-radius: 8px; padding: 9px 18px; font-size: 13.5px; cursor: pointer;
  background: var(--primary); color: #fff; transition: all .15s; font-family: inherit;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn.outline { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.outline:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #b91c1c; }
.btn.success { background: var(--green); }
.btn.success:hover { background: #15803d; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 6px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.green { background: #dcfce7; color: #15803d; }
.badge.amber { background: #fef3c7; color: #b45309; }
.badge.purple { background: #ede9fe; color: #6d28d9; }
.badge.gray { background: #e2e8f0; color: #475569; }
.badge.timeout { background: var(--red); color: #fff; }

/* ---- 统计卡片 ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat .num { font-size: 26px; font-weight: 700; margin: 4px 0 2px; }
.stat .num small { font-size: 13px; font-weight: 400; color: var(--sub); }
.stat .lbl { font-size: 12.5px; color: var(--sub); }

/* ---- 待办 ---- */
.todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #f1f5f9; }
.todo-item:last-child { border-bottom: none; }
.todo-item .name { font-weight: 600; }
.todo-item .desc { color: var(--sub); font-size: 12.5px; margin-top: 2px; }
.todo-item .days { margin-left: auto; font-size: 12px; color: var(--sub); white-space: nowrap; }
.todo-item .days.over { color: var(--red); font-weight: 700; }
.empty { color: #94a3b8; text-align: center; padding: 26px 0; font-size: 13px; }

/* ---- 表格 ---- */
.filter-bar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input[type="text"] {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; background: #fff; font-family: inherit; min-width: 170px;
}
table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
table.list th {
  text-align: left; font-size: 12.5px; color: var(--sub); font-weight: 600;
  padding: 12px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: relative; border-left: 1px solid #e8edf3;
}
table.list th:first-child { border-left: none; }
table.list td + td { border-left: 1px solid #f4f7fa; }
.product-list-scroll { overflow-x: auto; border-radius: 12px; }
.product-list-scroll table.list { min-width: 940px; }

/* 列头悬浮操作：− 覆盖式显示（不改列宽）｜ 间隙热点 = 分界线 + ＋ + 悬停 tip 列表 */
.th-x {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 16px; height: 16px; line-height: 15px; text-align: center; border-radius: 4px;
  background: #fee2e2; color: #b91c1c; font-size: 13px; font-weight: 700; cursor: pointer;
  opacity: 0; transition: opacity .12s; user-select: none;
  box-shadow: 0 0 0 3px #f8fafc;  /* 与表头同色描边，盖住下方文字不发脏 */
}
table.list th:hover .th-x { opacity: 1; }
.th-gap {
  position: absolute; top: 0; right: -9px; width: 18px; height: 100%;
  cursor: pointer; z-index: 6;
}
.th-gap::before {
  content: ''; position: absolute; top: 5px; bottom: 5px; left: 8px; width: 0;
  border-left: 2px dotted #b6c4d4; opacity: 0; transition: opacity .12s;
}
table.list th:hover .th-gap::before { opacity: .7; }
.th-gap:hover::before { border-left: 2px solid var(--primary); opacity: 1; }
.th-add {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 13px; cursor: pointer;
  opacity: 0; transition: all .12s; user-select: none;
  box-shadow: 0 1px 6px rgba(37, 99, 235, .5);
}
.th-gap:hover .th-add { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ＋ 悬停 tip（挂在 body 的门户元素，脱离表格渲染层级） */
#th-tip { position: fixed; z-index: 90; display: none; }
#th-tip.open { display: block; }
.th-menu-in {
  display: block; background: #fff; border: 1px solid #d7dfe9; border-radius: 10px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .22); padding: 5px; position: relative;
}
.th-menu-in::after {  /* 顶部连接小三角 */
  content: ''; position: absolute; top: -5px; left: 50%; margin-left: -4px;
  width: 8px; height: 8px; background: #fff; transform: rotate(45deg);
  border-left: 1px solid #d7dfe9; border-top: 1px solid #d7dfe9;
}
.th-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 7px 9px; font-size: 13px; border-radius: 6px; cursor: pointer;
}
.th-menu-item:hover { background: #eff6ff; color: var(--primary); }
.th-menu-item i { font-style: normal; font-size: 11px; color: #93b4d8; }
.th-menu-item:hover i { color: var(--primary); }
.th-menu-item.reset { color: var(--sub); border-top: 1px solid var(--line); margin-top: 3px; border-radius: 0 0 6px 6px; }
.th-menu-item.reset:hover { color: var(--primary); background: #f8fafc; }
.th-menu-empty { display: block; font-size: 12px; color: #94a3b8; padding: 7px 9px; }
.th-confirm-text { display: block; font-size: 12.5px; padding: 5px 9px 9px; color: var(--text); }
.th-confirm-btns { display: flex; gap: 8px; padding: 0 6px 6px; }

/* 列拖拽排序 */
table.list th[data-draggable="1"] { cursor: grab; }
table.list th.dragging { opacity: .45; background: #eff6ff; }
body.col-dragging, body.col-dragging * { cursor: grabbing !important; user-select: none; }
#col-drop-line {
  position: fixed; width: 3px; border-radius: 2px; background: var(--primary);
  z-index: 95; pointer-events: none; display: none;
  box-shadow: 0 0 8px rgba(37, 99, 235, .65);
}
#col-drop-line.show { display: block; }

/* 选品工作台网格 */
.sheet-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sheet-list-head h2 { font-size: 20px; margin-bottom: 5px; }
.sheet-list-head p { color: var(--sub); font-size: 13px; }
.sheet-list-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sheet-list-stats > div { display: flex; align-items: baseline; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.sheet-list-stats b { font-size: 22px; color: var(--text); }
.sheet-list-stats span { font-size: 12px; color: var(--sub); }
.sheet-list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.sheet-list-toolbar input, .sheet-list-toolbar select { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 8px 10px; font: inherit; font-size: 13px; }
.sheet-list-toolbar input { width: min(350px, 100%); }
.sheet-list-toolbar input:focus, .sheet-list-toolbar select:focus { outline: 2px solid #bfdbfe; }
.sheet-list-count { margin-left: auto; color: var(--sub); font-size: 12px; }
.sheet-list-table-wrap { overflow-x: auto; border-radius: 12px; }
.sheet-list-table { min-width: 860px; }
.sheet-list-table .sheet-list-row { cursor: pointer; }
.sheet-list-table .sheet-list-row:hover { background: #f8fafc; }
.sheet-list-table .pid { margin-top: 4px; }
.sheet-list-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: 12px 0 22px; color: var(--sub); font-size: 12px; }
.sheet-list-pagination button:disabled { opacity: .45; cursor: default; }
.modal.sheet-new-dialog { width: 680px; }
.modal.sheet-help-dialog { width: 680px; }
.sheet-help-dialog .modal-btns { position: sticky; bottom: 0; background: #fff; padding-top: 10px; margin-top: 12px; }
.sheet-help-intro { color: var(--sub); font-size: 12px; margin: 8px 0 16px; }
.sheet-help-section { padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; margin-top: 10px; }
.sheet-help-section h4 { font-size: 14px; margin-bottom: 8px; }
.sheet-help-section ul { padding-left: 20px; color: var(--sub); line-height: 1.75; }
.sheet-help-section li + li { margin-top: 5px; }
.sheet-help-section b { color: var(--text); }
.sheet-new-dialog .form-row { align-items: flex-end; }
.sheet-new-fx { display: inline-flex; align-items: center; gap: 6px; min-height: 39px; flex-wrap: wrap; }
.sheet-new-modes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 19px; }
.sheet-new-modes > span { color: var(--sub); font-size: 12px; margin-right: 4px; }
.sheet-new-source { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; margin-top: 12px; background: #f8fafc; border-radius: 8px; font-size: 13px; }
.sheet-new-source select, .sheet-new-source input[type="file"] { width: 100%; max-width: 440px; }
.sheet-new-source select { border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: #fff; }
@media (max-width: 700px) { .sheet-list-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sheet-list-head { flex-direction: column; } .sheet-list-count { margin-left: 0; } }
.sheet-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sheet-wrap table.list { border-radius: 0; border: none; overflow: visible; }
.sheet-main-wrap { max-height: calc(100vh - 210px); min-height: 220px; overflow: auto; }
.sheet-main-wrap .sheet-grid thead th { position: sticky; top: 0; z-index: 2; }
.sheet-main-wrap .sheet-grid thead th:last-child { background: #f8fafc; }
.sheet-main-wrap .sheet-grid th, .sheet-main-wrap .sheet-grid td { padding: 8px; }
.sheet-main-wrap .cell-img .btn.sm, .sheet-main-wrap .sheet-grid td:last-child .btn.sm { padding: 4px 6px; }
.sheet-grid td.sheet-link-cell { color: #1d4ed8; text-decoration: underline; text-decoration-color: #b7cdf7; cursor: pointer; }
.sheet-main-wrap .sheet-grid td.sheet-link-cell { width: 82px; min-width: 82px; max-width: 82px; }
.sheet-main-wrap .sheet-grid td.sheet-link-cell[data-f="compLink"],
.sheet-main-wrap .sheet-grid td.sheet-link-cell[data-f="compX"] { width: 78px; min-width: 78px; max-width: 78px; }
.sheet-grid td.sheet-link-cell:focus { cursor: text; }
.modal.sheet-profit-dialog { width: calc(100vw - 40px); max-width: calc(100vw - 40px); height: calc(100vh - 40px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 20px; overflow: hidden; }
.sheet-profit-dialog .sheet-wrap { flex: 1; min-height: 0; max-height: none; overflow: auto; }
.sheet-profit-dialog .sheet-grid thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.sheet-grid td[data-f] { cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.sheet-main-wrap .sheet-grid td[data-f="code"] { white-space: pre-wrap; overflow-wrap: anywhere; text-overflow: clip; }
.sheet-grid td[data-f]:hover { background: #f8fafc; }
.sheet-grid td[data-f]:focus { outline: 2px solid #bfdbfe; background: #fff; border-radius: 4px; white-space: normal; overflow: visible; }
.sheet-grid td.cell-n { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-grid td.sheet-audit-cell { text-align: center; }
.sheet-audit { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.sheet-audit:disabled { cursor: default; }
.sheet-grid tr.peer-lock td { background: #fef9c3 !important; }
.sheet-grid tr.imported-row td { color: #94a3b8; background: #fafbfc; }

/* 币种切换按钮与换算单元格 */
.cur-tg {
  display: inline-block; cursor: pointer; color: var(--primary); font-size: 11px; font-weight: 400;
  border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; background: #fff;
  user-select: none; vertical-align: 1px; line-height: 15px;
}
.cur-tg:hover { background: #eff6ff; border-color: var(--primary); }
.sheet-grid td.cell-conv { color: #1d4ed8; font-style: italic; cursor: default; background: #eef4fd; }
.collab-bar .avatar { width: 24px; height: 24px; font-size: 11px; }

/* 选品表格图片格与卡片实图 */
.cell-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; display: inline-block; vertical-align: middle; }
.photo-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }

/* 选品表格列分组配色：a=选品信息(蓝) b=核算与初审2(黄) c=定价与补充(绿) */
table.list th.th-g-a { background: #d5e4f9; }
table.list th.th-g-b { background: #fce8c4; }
table.list th.th-g-c { background: #d4ecda; }
.sheet-grid td.td-g-a { background: #f3f8fe; }
.sheet-grid td.td-g-b { background: #fef8ee; }
.sheet-grid td.td-g-c { background: #f2faf4; }
.sheet-grid td.td-g-a:hover { background: #e8f1fd; }
.sheet-grid td.td-g-b:hover { background: #fdf0da; }
.sheet-grid td.td-g-c:hover { background: #e7f5eb; }
.legend-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--sub); margin-right: 12px; }
.legend-chip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* 基础资料字段标签分组配色（与选品表格一致） */
.field .fl.fl-g-a { background: #dce9fb; border-radius: 6px; padding: 2px 8px; margin: -2px 6px -2px -8px; }
.field .fl.fl-g-b { background: #fce8c4; border-radius: 6px; padding: 2px 8px; margin: -2px 6px -2px -8px; }
.field .fl.fl-g-c { background: #d4ecda; border-radius: 6px; padding: 2px 8px; margin: -2px 6px -2px -8px; }

/* 图片查看灯箱 */
#img-viewer {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .82);
  z-index: 200; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; cursor: zoom-out;
}
#img-viewer.open { display: flex; }
#img-viewer img { max-width: 82vw; max-height: 76vh; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
.img-viewer-bar { display: flex; align-items: center; gap: 12px; color: #cbd5e1; font-size: 12.5px; }
table.list td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.list tr.rowlink { cursor: pointer; }
table.list tr.rowlink:hover { background: #f8fafc; }
tr.timeout-row td { background: #fef2f2; }
td .pid { color: var(--sub); font-size: 12px; }
.subprog { font-size: 12px; color: var(--sub); }
.subprog b.ok { color: var(--green); }

/* ---- 详情页 ---- */
.detail-head {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
  position: sticky; top: 56px; z-index: 15;
  background: var(--bg); padding: 12px 0 10px; border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.detail-head h2 { font-size: 19px; }
.detail-head .meta { color: var(--sub); font-size: 12.5px; margin-top: 6px; }
.detail-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* 字段展示与表单 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.field { display: flex; padding: 9px 0; border-bottom: 1px dashed #f1f5f9; font-size: 13.5px; gap: 14px; }
.field .fl { color: var(--sub); width: 110px; flex-shrink: 0; }
.field .fv { word-break: break-all; }
.field .fv.basic-edit-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.basic-edit-wrap > span { min-width: 0; }
.basic-edit-wrap .btn { flex: none; }
.modal.basic-edit-dialog { width: 620px; }
.field .fv a { word-break: break-all; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.form-item { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 180px; }
.form-item label { font-size: 12.5px; color: var(--sub); }
.form-item label b.red { color: var(--red); }
.form-item input, .form-item select, .form-item textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; font-family: inherit;
}
.form-item textarea { resize: vertical; min-height: 66px; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }

.img-box {
  width: 84px; height: 84px; border-radius: 9px; background: #f1f5f9; border: 1px dashed #cbd5e1;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #94a3b8; text-align: center; line-height: 1.4;
}
.img-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0; }

.art-upload-group { padding: 16px 0; border-top: 1px solid var(--line); }
.art-upload-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.art-upload-head b { display: flex; align-items: center; gap: 8px; }
.art-upload-head .btn:disabled { color: #94a3b8; border-color: #e2e8f0; background: #f8fafc; }
.art-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.art-image-item { position: relative; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.art-image-thumb { display: block; width: 100%; height: 112px; object-fit: contain; background: #f8fafc; border-radius: 5px; cursor: zoom-in; }
.art-image-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; font-size: 12px; }
.art-image-item small, .art-video-item small { display: block; color: var(--sub); font-size: 11px; }
.art-image-remove { position: absolute; top: 10px; right: 10px; width: 25px; height: 25px; border: 0; border-radius: 50%; color: #fff; background: rgba(15,23,42,.72); cursor: pointer; font-size: 19px; line-height: 1; }
.art-image-remove:hover { background: var(--red); }
.art-video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.art-video-item { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.art-video-item video { display: block; width: 100%; max-height: 280px; border-radius: 8px; background: #111827; }
.art-video-item > div { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.art-download { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 8px; border-top: 1px solid var(--line); }
.art-download label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.art-download input { width: 92px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }

.margin-chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #dcfce7; color: #15803d; }
.margin-chip.warn { background: #fef3c7; color: #b45309; }
.stage-note { font-size: 12.5px; color: var(--sub); background: #f8fafc; border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; line-height: 1.7; }

/* 产品设计：按规格分组填写选项与图片 */
.spec-axis-card { position: relative; background: #f6f6f6; border-radius: 6px; padding: 20px 24px; margin: 12px 0; }
.spec-axis-title { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; font-size: 14px; }
.spec-axis-title > span { min-width: 56px; color: #444; white-space: nowrap; }
.spec-axis-title .spec-input-wrap { max-width: 560px; }
.spec-options-label { position: absolute; top: 96px; left: 34px; color: #555; font-size: 13px; }
.spec-options-grid { margin-left: 96px; display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 10px 18px; }
.spec-option-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.spec-input-wrap { display: flex; align-items: center; min-width: 0; flex: 1; background: #fff; border: 1px solid #dedede; border-radius: 5px; height: 40px; overflow: hidden; }
.spec-input-wrap:focus-within { border-color: #ee6b55; box-shadow: 0 0 0 2px #fee7e2; }
.spec-input-wrap input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 0 14px; font: inherit; background: transparent; }
.spec-input-wrap input:disabled { color: #333; opacity: 1; }
.spec-input-wrap small { flex: none; border-left: 1px solid #eee; padding: 0 10px; color: #a1a1a1; font-size: 12px; }
.spec-icon-btn { border: 0; background: transparent; color: #a8a8a8; font-size: 21px; cursor: pointer; padding: 2px 6px; }
.spec-icon-btn:hover { color: #e74f37; }
.spec-axis-title .spec-icon-btn { margin-left: auto; }
.spec-image-btn { flex: none; border: 1px dashed #d7d7d7; color: #777; background: #fff; border-radius: 5px; min-width: 52px; height: 40px; cursor: pointer; font-size: 12px; }
.spec-image-btn:hover { border-color: #ee6b55; color: #ee6b55; }
.spec-add-axis { padding: 16px 20px; background: #f6f6f6; border-radius: 6px; margin: 12px 0; }
.spec-add-axis .btn { border-style: dashed; color: #e9543b; }
.sku-table-input { border: 1px solid #dedede; border-radius: 5px; padding: 9px 10px; font: inherit; min-width: 0; }
.sku-table-input:focus { outline: 2px solid #fee7e2; border-color: #ee6b55; }
.sku-table-scroll { overflow-x: auto; margin-bottom: 12px; }
.sku-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
table.sku-spec-table { min-width: 850px; border: 1px solid #e3e3e3; border-radius: 6px; }
table.sku-spec-table th { background: #f6f6f6; color: #444; font-weight: 500; }
table.sku-spec-table td { border: 1px solid #e9e9e9; padding: 12px; }
.sku-spec-table .sku-variant-cell { text-align: center; min-width: 100px; }
.sku-image-slots { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.sku-image-slot { display: flex; flex-direction: column; align-items: center; width: 94px; flex: none; }
.sku-image-label { font-size: 11px; color: #555; white-space: nowrap; }
.sku-image-upload { display: block; width: 82px; min-height: 70px; margin: 6px auto 0; padding: 0; border: 1px dashed #d7d7d7; border-radius: 5px; background: #fafafa; color: #888; font-size: 11px; cursor: pointer; }
.sku-image-upload:hover { border-color: #e9543b; color: #e9543b; }
.sku-variant-image { display: block; width: 80px; height: 70px; object-fit: cover; border-radius: 5px; }
.sku-image-paste { border: 0; background: transparent; color: var(--primary); font-size: 11px; cursor: pointer; margin-top: 5px; }
.sku-image-paste:hover { text-decoration: underline; }
.sku-image-remove { border: 0; background: transparent; color: #999; font-size: 11px; cursor: pointer; margin-top: 4px; }
.sku-image-remove:hover { color: #e9543b; }
.sku-table-input { width: 100%; min-width: 100px; background: #fff; }
.sku-table-input:disabled { background: #f8f8f8; color: #555; }
@media (max-width: 900px) { .spec-options-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .spec-axis-card { padding: 14px; } .spec-options-label { position: static; margin-bottom: 8px; } .spec-options-grid { margin-left: 0; } }

/* 商品属性 */
.copy-region-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 18px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.copy-region-tab { border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--sub); padding: 7px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.copy-region-tab:hover { border-color: var(--primary); color: var(--primary); }
.copy-region-tab.active { background: #eff6ff; border-color: #93c5fd; color: var(--primary-dark); font-weight: 600; }
.copy-region-panel { min-height: 120px; }
.copy-keywords { width: 100%; }
.copy-keywords > input { display: none; width: 100%; }
.copy-keywords.editing > input { display: block; }
.copy-keywords.editing > .copy-keyword-tags { display: none; }
.copy-keyword-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 40px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; cursor: text; }
.copy-keyword-tags:focus-visible { outline: 2px solid #bfdbfe; }
.copy-keyword-tags.readonly { border: 0; padding: 0; cursor: default; }
.copy-keyword-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 7px; border-radius: 5px; background: #eff6ff; color: var(--primary-dark); font-size: 12px; overflow-wrap: anywhere; }
.copy-keyword-tag button { border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 17px; line-height: 1; }
.copy-keyword-empty { color: var(--sub); font-size: 12px; }
.attribute-card h3 { font-size: 19px; margin-bottom: 5px; }
.attribute-help { color: #858b96; font-size: 13px; margin: 0 0 22px; }
.attribute-help b { color: #344054; }
.attribute-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 38px; row-gap: 16px; }
.attribute-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; }
.attribute-row > label { text-align: right; color: #42464e; font-size: 13px; }
.attribute-row > label .red { color: #e9543b; }
.attribute-row > label small { display: block; color: #a0a5ad; font-size: 11px; }
.attribute-single, .attribute-value-box, .attribute-custom-row input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px; background: #fff; border: 1px solid #dce1e7; border-radius: 5px; font: inherit; font-size: 13px; }
.attribute-single:focus, .attribute-value-box:focus-within, .attribute-custom-row input:focus { outline: 2px solid #fee7e2; border-color: #ee6b55; }
.attribute-single:disabled, .attribute-custom-row input:disabled { background: #f8f9fb; color: #555; }
.attribute-value-box { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px 7px; }
.attribute-comma-field > .attribute-comma-input { display: none; width: 100%; border: 0; outline: 0; padding: 3px 5px; font: inherit; font-size: 13px; }
.attribute-comma-field.editing > .attribute-comma-input { display: block; }
.attribute-comma-field.editing > .attribute-tag-list { display: none; }
.attribute-tag-list { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; width: 100%; min-height: 28px; cursor: text; }
.attribute-tag-list:focus-visible { outline: 2px solid #fee7e2; }
.attribute-empty-inline { color: #9aa0a9; font-size: 12px; }
.settings-card p { margin: 9px 0 0; color: var(--sub); line-height: 1.7; }
.settings-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.settings-rule-grid > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.settings-rule-grid b { font-size: 13px; }
.settings-rule-grid p { margin-top: 5px; font-size: 12.5px; }
@media (max-width: 700px) { .settings-rule-grid { grid-template-columns: 1fr; } }
.attribute-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid #e2e5e9; border-radius: 3px; background: #f8f9fa; white-space: nowrap; }
.attribute-chip button, .attribute-add-value, .attribute-custom-remove { border: 0; background: transparent; color: #8f959e; cursor: pointer; font-size: 17px; line-height: 1; }
.attribute-chip button:hover, .attribute-add-value:hover, .attribute-custom-remove:hover { color: #e9543b; }
.attribute-new-value { flex: 1; min-width: 110px; border: 0; outline: 0; font: inherit; font-size: 13px; padding: 3px 5px; }
.attribute-add-value { padding: 2px 5px; }
.attribute-more { display: block; margin: 20px 0 0 118px; padding: 4px 0; border: 0; background: transparent; color: #ee553e; cursor: pointer; font: inherit; font-size: 13px; }
.attribute-custom-section { margin: 22px 0 0 118px; }
.attribute-custom-section h4 { margin-bottom: 10px; }
.attribute-custom-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(160px, 2fr) 28px; align-items: center; gap: 8px; margin-bottom: 8px; max-width: 650px; }
.attribute-empty { color: #9aa0a9; font-size: 12px; margin-bottom: 10px; }
@media (max-width: 900px) { .attribute-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .attribute-row { grid-template-columns: 80px minmax(0, 1fr); gap: 8px; } .attribute-more, .attribute-custom-section { margin-left: 88px; } }

/* 时间线 */
.timeline { margin-top: 4px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: #e2e8f0; }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-top: 4px; flex-shrink: 0; }
.tl-item.reject .tl-dot { background: var(--red); }
.tl-item.done .tl-dot { background: var(--green); }
.tl-body .t1 { font-size: 13.5px; }
.tl-body .t1 b { margin-right: 8px; }
.tl-body .t2 { font-size: 12px; color: var(--sub); margin-top: 3px; line-height: 1.6; }

/* ---- 弹窗 ---- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: #fff; border-radius: 14px; width: 520px; max-width: 96vw; max-height: 88vh; overflow: auto; padding: 26px 28px; }
.modal h3 { font-size: 16px; margin-bottom: 18px; }
.modal .modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal .block-note { font-size: 12.5px; background: #fef2f2; color: #b91c1c; border-radius: 8px; padding: 10px 13px; line-height: 1.7; margin-bottom: 14px; }
.modal .ok-note { font-size: 12.5px; background: #eff6ff; color: #1d4ed8; border-radius: 8px; padding: 10px 13px; line-height: 1.7; margin-bottom: 14px; }

/* ---- toast ---- */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #0f172a; color: #fff; padding: 11px 22px; border-radius: 99px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: fadeIn .2s;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }

/* ---- 设置页 ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { background: #eff6ff; color: #1d4ed8; border-radius: 99px; padding: 5px 13px; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.chip .x { cursor: pointer; color: #93c5fd; font-weight: 700; }
.chip .x:hover { color: var(--red); }
.rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rate-item { display: flex; align-items: center; gap: 8px; }
.rate-item label { width: 34px; font-size: 13px; color: var(--sub); }
.rate-item input { flex: 1; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 13px; }

.page-hint { font-size: 12.5px; color: var(--sub); margin-bottom: 14px; line-height: 1.7; }
