:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --line: #e5e7eb;
  --line-soft: #f0f1f3;
  --text: #1f2328;
  --muted: #6b7280;
  --dim: #9ca3af;
  --accent: #d4380d;
  --accent-soft: #fff1ec;
  --ok: #0f7b3f;
  --warn: #b45309;
  --gold: #efd06a;
  --gold-soft: #fbf4d6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

a { color: inherit; text-decoration: none; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.brand span { color: var(--accent); }

.tabs { display: flex; gap: 4px; }
.tabs a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}
.tabs a:hover { background: var(--line-soft); color: var(--text); }
.tabs a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.root { color: var(--dim); font-size: 12px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 顶部右侧那一组：重建 / 更新主图 / 数据根（2026-11-16 老板要放到右边） */
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-right .root { max-width: 26vw; }

main { padding: 20px; max-width: 1500px; margin: 0 auto; }
.loading { color: var(--muted); padding: 40px; text-align: center; }

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 24px 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }

.sub { color: var(--muted); font-size: 12px; }

.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--accent); }
.crumbs span::before { content: "/"; margin-right: 6px; color: var(--dim); }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 20px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 104px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* 五个店五列：列头固定在列顶，每列自己往下滚（2026-11-16 老板定） */
.board-wrap { flex: 1; min-height: 0; margin-top: 8px; overflow: hidden; }

/* 首页固定一屏：表头区在上，店铺板占满剩下高度，横向滚动条压在页面最底下 */
#app.app-board {
  height: calc(100vh - 53px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 14px;
}
#app.app-board .stats { margin: 8px 0 6px; gap: 10px; }
#app.app-board .stat { padding: 6px 12px; min-width: 96px; }
#app.app-board .stat b { font-size: 17px; }
#app.app-board h1 { margin-bottom: 2px; }

.store-board {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}
.store-col {
  /* 一屏默认两列，剩下的横向拖 */
  flex: 0 0 calc((100% - 16px) / 2);
  max-width: 780px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 每列一个色条 + 浅底，区分店铺 */
  --accent: #94a3b8;
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.store-col:nth-child(1) { --accent: #3b6fd4; } /* 逐速 */
.store-col:nth-child(2) { --accent: #d97706; } /* 帛先生 */
.store-col:nth-child(3) { --accent: #7c3aed; } /* 圣致 */
.store-col:nth-child(4) { --accent: #e11d48; } /* 抖音中汇 */
.store-col:nth-child(5) { --accent: #0d9488; } /* 抖音逐速 */
.store-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 2px;
  flex: 0 0 auto;
  background: #f7f8fa;
}
.col-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* 每列自己滚：滚逐速不影响帛先生（2026-11-16 老板定） */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
}
.col-body::-webkit-scrollbar { width: 10px; }
.col-body::-webkit-scrollbar-track { background: var(--line-soft); border-radius: 8px; }
.col-body::-webkit-scrollbar-thumb { background: #cfd4da; border-radius: 8px; }
.col-body::-webkit-scrollbar-thumb:hover { background: #b3b9c0; }
.col-body > .card { width: 100%; }
.store-board::-webkit-scrollbar { height: 10px; }
.store-board::-webkit-scrollbar-track { background: var(--line-soft); border-radius: 8px; }
.store-board::-webkit-scrollbar-thumb { background: #cfd4da; border-radius: 8px; }
.store-board::-webkit-scrollbar-thumb:hover { background: #b3b9c0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .12s, transform .12s;
}
.card:hover { border-color: #d0d5dd; transform: translateY(-1px); }
.card .name { font-weight: 600; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.card .name .card-stat { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.card .meta { color: var(--muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.card .cover { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.card .cover img, .cover-ph { aspect-ratio: 1/1; width: 100%; object-fit: cover; border-radius: 6px; background: var(--line-soft); }

.tag {
  display: inline-block;
  font-size: 11px;
  line-height: 1.6;
  padding: 0 7px;
  border-radius: 20px;
  background: var(--line-soft);
  color: var(--muted);
  white-space: nowrap;
}
.tag.store { background: #eef2ff; color: #3538cd; }
.tag.li { background: #ecfdf3; color: var(--ok); }
.tag.nolink { background: #fffaeb; color: var(--warn); }

table.grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* 必须是 visible：overflow:hidden 会让 sticky 表头失效（原来是为了裁圆角，2026-11-16 改） */
  overflow: visible;
  box-shadow: var(--shadow);
}
table.grid th, table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
table.grid th { background: #fafbfc; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
/* 表头跟着页面滚动钉在顶部（.top 那一条高 53px，钉在它下面）2026-11-16 老板要的 */
table.grid thead th {
  position: sticky;
  top: 53px;
  z-index: 6;
  background: #fafbfc;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
}
/* 批次列表：列宽定死，最后一列（选图）才拿得到固定宽度、里面那排图才能真正横向滚动（2026-11-16） */
table.batch-grid { table-layout: fixed; }
table.batch-grid th:nth-child(1), table.batch-grid td:nth-child(1) { width: 210px; }
table.batch-grid th:nth-child(2), table.batch-grid td:nth-child(2),
table.batch-grid th:nth-child(3), table.batch-grid td:nth-child(3) { width: 76px; }
table.batch-grid th:nth-child(4), table.batch-grid td:nth-child(4),
table.batch-grid th:nth-child(5), table.batch-grid td:nth-child(5) { width: 96px; }
table.batch-grid td.style-name { min-width: 0; word-break: break-all; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: #fcfcfd; }
/* 手动「选用上新」但还没上表的行：浅绿底，一眼能区分 */
table.grid tbody tr.manual-row { background: #f2fbf5; }
table.grid tbody tr.manual-row:hover { background: #e9f8ef; }
table.grid tbody tr.manual-row.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
table.grid tbody tr.manual-row img { cursor: zoom-in; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.style-name { font-weight: 600; min-width: 130px; }
td.style-name a:hover { color: var(--accent); }
.small { font-size: 12px; color: var(--muted); }

.strip { display: flex; gap: 8px; flex-wrap: wrap; }

/* 批次列表里的选图横排：图 → 图片id → 上架id；已上架的排前面、底色变绿（2026-11-16 老板定） */
.strip-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
/* 横向滚动条常显、加粗，能直接拖着往右拉（2026-11-16 老板要的）
   注意：别写 scrollbar-width/scrollbar-color —— 一写就让 Chromium 走「细滚动条」，
   会覆盖下面的 ::-webkit-scrollbar 样式，变成几乎抓不住的一条线 */
.strip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 6px;
  cursor: grab;
}
.strip-row.dragging { cursor: grabbing; user-select: none; }
.strip-row.dragging .tile { pointer-events: none; }
.strip-row::-webkit-scrollbar { height: 14px; }
.strip-row::-webkit-scrollbar-track { background: #eef1f4; border-radius: 7px; }
.strip-row::-webkit-scrollbar-thumb {
  background: #b0bac4;
  border: 3px solid #eef1f4;
  border-radius: 7px;
}
.strip-row::-webkit-scrollbar-thumb:hover { background: #8f9aa6; }
.strip-row::-webkit-scrollbar-thumb:active { background: #75808c; }
.tile { flex: 0 0 auto; width: 84px; padding: 4px; border-radius: 8px; text-align: center; }
/* 状态底色：已上架=深绿，手动「选用上新」=绿，手动「弃用」=深灰（2026-11-16 老板定） */
.tile.state-listed { background: #1f6b3a; }
.tile.state-use { background: #c9f0d7; box-shadow: inset 0 0 0 2px #2f9e5a; }
.tile.state-drop { background: #4a4f55; opacity: .85; }
/* 批次页：表里已填图片id、但还没上架id 的图 = 已选定、还没生成链接，标浅绿（2026-11-16 老板定） */
.tile.pending { background: #c9f0d7; box-shadow: inset 0 0 0 2px #2f9e5a; }
.tile.sel, figure.thumb.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.thumb.state-listed img { box-shadow: inset 0 0 0 3px #1f6b3a; }
.thumb.state-use img { box-shadow: inset 0 0 0 3px #2f9e5a; }
.thumb.state-drop img { opacity: .55; box-shadow: inset 0 0 0 3px #4a4f55; }
/* 选图标记的两个按钮 */
.mark-bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.mark-bar .sel-id { font-family: Consolas, monospace; }
button.mini { font-size: 12px; padding: 3px 10px; border: 1px solid #c3cad2; background: #fff; border-radius: 6px; cursor: pointer; }
button.mini:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
/* 没选中图的时候按钮是禁用的，但别淡成看不见——黄底上更要白底+深一点的灰字（2026-11-17 老板要的） */
button.mini:disabled { opacity: 1; background: #fff; border-color: #c3cad2; color: #7c8794; cursor: not-allowed; }
button.mini.on { background: #2f9e5a; border-color: #2f9e5a; color: #fff; }
.tile img { display: block; margin: 0 auto; width: 76px; height: 76px; object-fit: cover; border-radius: 6px; background: var(--line-soft); cursor: zoom-in; -webkit-user-drag: none; }
/* 图片id 写全、可换行；点一下复制（老板要拿它去填上新表） */
.tile .tid { margin-top: 4px; font-size: 10.5px; line-height: 1.25; color: #333; white-space: normal; word-break: break-all; cursor: copy; }
.tile .tid:hover { color: var(--accent); }
/* 顶上那条 = 谁选的（2026-11-17 老板定）：两边都选了红、单纯 AI 推荐蓝、他只标的不动。
   不另加色带：直接把格子原本的顶边（padding 那 4px）染成颜色，所以只有一条，不是两条。 */
.tile.pick-both { background-image: linear-gradient(#c81e1e, #c81e1e); background-size: 100% 4px; background-repeat: no-repeat; background-position: left top; }
.tile.pick-ai { background-image: linear-gradient(#1d4ed8, #1d4ed8); background-size: 100% 4px; background-repeat: no-repeat; background-position: left top; }
/* 字统一：深底（已上架深绿、弃用深灰）白字，浅底（浅绿、优质黄）灰字，不再按选图状态变色 */
.tile .tlink { font-size: 11px; font-weight: 600; line-height: 1.3; color: #333; word-break: break-all; }
.tile.state-listed .tid, .tile.state-listed .tlink,
.tile.state-drop .tid, .tile.state-drop .tlink { color: #fff; }
.tile.quality .tid, .tile.quality .tlink { color: #333; }
[data-copy] { cursor: copy; }
.tile-more { align-self: center; }
figure.thumb {
  margin: 0;
  width: 84px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: zoom-in;
}
figure.thumb img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line-soft);
  border: 1px solid transparent;
}
/* 图和名字上不画框（2026-11-17 老板定）：老板选不再描绿框，AI 推荐也不再描淡蓝框，
   能出现在这儿的本来就都是标了「主图」的，靠名字颜色区分就够了 */
/* 款详情那排图：顶上那条同理，用 3px 顶边，不加额外色块 */
figure.thumb.pick-ai { border-top: 3px solid #1d4ed8; }
figure.thumb.pick-both { border-top: 3px solid #c81e1e; }
figure.thumb figcaption {
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
}
figure.thumb figcaption.hit { color: #555; font-weight: 600; }
/* 款详情「上架数据」里的图片id：跟格子顶上那条对应，双选红、AI 单选蓝（2026-11-17 老板定） */
.idname.ai { color: #1d4ed8; font-weight: 700; }
.idname.both { color: #c81e1e; font-weight: 700; }

.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); margin: 6px 0 0; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.legend .l-ai { background: #1d4ed8; }
.legend .l-both { background: #c81e1e; }

.detail-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-head .grow { flex: 1; min-width: 240px; }

.row-imgs { display: flex; gap: 6px; flex-wrap: wrap; }
.row-imgs img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; cursor: zoom-in; }

pre.record {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.7 "Consolas", "Microsoft YaHei", monospace;
  max-height: 460px;
  overflow: auto;
}

details > summary { cursor: pointer; color: var(--accent); font-size: 13px; margin: 10px 0; }

.empty { color: var(--muted); padding: 40px; text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

.refgroup { margin-bottom: 26px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; background: var(--line-soft); cursor: zoom-in; }
.gallery figcaption { font-size: 10px; color: var(--muted); margin-top: 2px; word-break: break-all; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 4vh 4vw;
}
.overlay[hidden] { display: none; }
.overlay img { max-width: 92vw; max-height: 92vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

form.task { display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
form.task label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
form.task input, form.task select, form.task textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
form.task textarea { min-height: 64px; resize: vertical; }
button {
  font: inherit;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { filter: brightness(1.06); }
button.ghost { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }

.taskrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.taskrow:last-child { border-bottom: none; }
.taskrow .t-main { flex: 1; min-width: 0; }
.taskrow .t-title { font-weight: 600; margin-bottom: 2px; }
.taskrow .t-meta { font-size: 12px; color: var(--muted); }

pre.order {
  background: #0f1115;
  color: #e6e8eb;
  padding: 14px;
  border-radius: 8px;
  font: 12px/1.6 "Consolas", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px;
  overflow: auto;
}

.badge { font-size: 11px; padding: 1px 8px; border-radius: 20px; background: var(--line-soft); color: var(--muted); }
.badge.pending { background: #fff7e6; color: #ad6800; }
.badge.running { background: #e6f4ff; color: #0958d9; }
.badge.done { background: #ecfdf3; color: var(--ok); }
.badge.error { background: #fff1f0; color: #cf1322; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.spacer { flex: 1; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 8px 16px; }
  .root { display: none; }
  main { padding: 12px; }
  figure.thumb, figure.thumb img { width: 68px; }
  figure.thumb img { height: 68px; }
}

/* 还没接的店：虚线占位卡 */
.col-body > .card.ghost {
  border: 1px dashed var(--line);
  background: transparent;
  box-shadow: none;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  width: 100%;
}
.col-body > .card.ghost .name { color: var(--dim); font-weight: 600; }
.col-body > .card.ghost .meta { color: var(--dim); font-size: 12px; line-height: 1.6; }

/* 到期只剩缩略图的 */
figure.thumb.expired img { opacity: .8; filter: grayscale(.15); }
figure.thumb .expired-tag { color: var(--warn); font-weight: 600; }

/* 批次页右上角的操作按钮 */
.actions { display: flex; gap: 8px; align-items: center; }
.store-title { justify-content: space-between; }
.store-title .new-batch { font-size: 12px; padding: 3px 10px; border-radius: 20px; color: var(--muted); }
.store-title .new-batch:hover { color: var(--accent); border-color: var(--accent); }

/* 弹窗 */
.overlay.modal { align-items: flex-start; padding-top: 8vh; background: rgba(15, 18, 22, .55); }
.modal-box {
  background: #fff; border-radius: 14px; padding: 18px 20px 16px;
  width: min(620px, 92vw); max-height: 80vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  display: flex; flex-direction: column; gap: 10px;
}
.modal-box h3 { margin: 0 0 4px; font-size: 16px; }
.modal-box label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.modal-box input, .modal-box textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%;
}
.modal-box textarea { min-height: 60px; resize: vertical; }
.modal-box .row { display: flex; gap: 8px; }
.modal-box .row input { flex: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* 文件夹浏览器 */
.browse[hidden] { display: none; }
.browse {
  border: 1px solid var(--line); border-radius: 10px; max-height: 220px; overflow: auto;
  padding: 8px; display: flex; flex-direction: column; gap: 4px; background: #fafbfc;
}
.browse-head { display: flex; gap: 8px; align-items: center; position: sticky; top: -8px; background: #fafbfc; padding: 4px 0; }
.browse-head .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browse-item { text-align: left; border: none; background: transparent; padding: 4px 6px; border-radius: 6px; font-size: 12px; color: var(--text); }
.browse-item:hover { background: #eef2f7; }

/* 右下角提示 */
.toast {
  position: fixed; right: 20px; bottom: 24px; z-index: 300;
  background: #1f2328; color: #fff; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; max-width: 420px; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: none; }
.toast.err { background: #cf1322; }

/* 表格数据更新 */
.drop-zone {
  margin: 14px 0 12px; padding: 34px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--panel);
  transition: border-color .15s, background .15s;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone.busy { opacity: .6; pointer-events: none; }
.drop-icon { font-size: 32px; line-height: 1; color: var(--muted); }
.drop-title { margin-top: 8px; font-size: 15px; font-weight: 600; }
.t-row { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.t-row input {
  flex: 1; font: inherit; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.t-status { min-height: 20px; margin: 10px 0 6px; font-size: 12.5px; }
.tbl-list {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.tbl-list th, .tbl-list td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 13px; }
.tbl-list tr:last-child td { border-bottom: none; }
.tbl-list tr.on { background: #f4fbf6; }
.tbl-list th { font-size: 11.5px; color: var(--muted); font-weight: 600; background: #f7f9fb; }
.tbl-list .num { text-align: right; }

/* 优质主图：金黄底 + 深棕字（2026-11-17 老板定）——原来是浅黄，跟优质行那层浅黄底分不出来；
   换深橙又跟顶上那条红色分不开，所以取金黄：跟浅黄背景、红条、蓝条都拉得开，深棕字对比度也够 */
.tile.quality { background: #eab308; }
.tile.quality .tid, .tile.quality .tlink { color: #3f2f00; }
figure.thumb.quality { background: #fdf6dd; box-shadow: inset 0 0 0 2px #eab308; }
/* 优质行：淡黄底色、不加边框（2026-11-17 老板定，批次页和款详情同一套）；
   黄底是格子底色，图片和顶上那条红/蓝都在它上面，不会被盖住 */
table.grid tr.quality td { background: var(--gold-soft); }
table.grid tr.quality:hover td { background: #f8eec2; }
/* 选图那格：整格淡黄，缩略图滚动区白底；左右各 8px 用「白边框」做隔断——
   边框不在滚动内容里，所以左右滑动时也一直有一条白边把图和黄色隔开（2026-11-17 老板定） */
table.grid.batch-grid tr.quality td:last-child .strip-row {
  background: #fff; border-radius: 6px; border-left: 4px solid #fff; border-right: 4px solid #fff;
  padding: 4px 0 9px; margin: 0 -4px;
}
h1.quality-h { background: var(--gold-soft); border-radius: 8px; padding: 2px 10px; display: inline-block; }
.qtag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--gold); color: #4a3a00; margin-left: 6px; vertical-align: 1px; }

/* 数据分析 */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; font-size: 15px; }
.panel h2 .small { font-weight: 400; }
.analysis-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; }
.th-input { width: 92px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.delta-up { color: var(--ok); font-weight: 600; }
.delta-down { color: #cf1322; font-weight: 600; }
.delta-zero { color: var(--dim); }
.ai-box { white-space: pre-wrap; background: #fbfcfd; border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.task-acts { display: flex; gap: 6px; flex-shrink: 0; }

/* 分析卡片：图 + 款 + 数据 + 看法 */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr)); gap: 12px; }
.acard { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.acard.is-quality { border-color: #d8b34a; background: #fffdf5; }
.acard-pic { flex: 0 0 112px; width: 112px; }
.acard-pic img { width: 112px; height: 112px; object-fit: cover; border-radius: 8px; background: var(--line-soft); cursor: zoom-in; }
.acard-ph { width: 112px; height: 112px; border-radius: 8px; background: #f3f4f6; color: var(--dim); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.acard-body { flex: 1; min-width: 0; }
.acard-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acard-name { font-weight: 600; }
.acard-meta { margin-top: 5px; font-size: 12px; color: var(--muted); }
.acard-note { margin-top: 8px; font-size: 12.5px; line-height: 1.65; color: #333; background: #fbfcfd; border-left: 3px solid var(--gold); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.acard-note.muted { color: var(--dim); background: transparent; border-left-color: var(--line); }
.acard-nums { margin-top: 4px; font-size: 13px; color: var(--text); }
.sheet-tabs { display: flex; gap: 6px; margin: 14px 0 4px; }
.sheet-tabs button { font: inherit; font-size: 13px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.sheet-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* 登录框 + 当前用户（2026-11-17 加账号体系） */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.login-box {
  width: 330px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.login-box h1 { font-size: 18px; margin: 0 0 2px; }
.login-box h1 span { color: var(--accent); }
.login-box input { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.login-err { min-height: 16px; font-size: 12px; color: #cf1322; }
.login-box button.primary { width: 100%; padding: 9px; font-size: 14px; }
.who { font-size: 12px; color: var(--muted); white-space: nowrap; }