/* 小面包拼豆 · 改图出库助手样式（沿用主站紫色渐变 + 白卡片 + 手机优先） */

.ob-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(20, 18, 30, .55); align-items: stretch; justify-content: center; }
.ob-overlay.ob-open { display: flex; }
.ob-panel-host { width: 100%; max-width: 760px; height: 100%; background: #f5f5f7; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 0 40px rgba(0,0,0,.25); }
@media (min-width: 800px) { .ob-panel-host { height: calc(100% - 40px); margin: 20px 0; border-radius: 18px; } }
#outbound-root { max-width: 760px; margin: 0 auto; background: #f5f5f7; min-height: 100vh; }

/* ========== 主站分栏模式：出库助手与「图片生成」同级 ==========
   仅作用于 index.html 里带 .ob-embedded 的容器；独立页 outbound.html 不受影响。 */
#outbound-root.ob-embedded {
  display: none;
  min-height: 0;
  padding-bottom: 24px;
}
body.ob-mode #outbound-root.ob-embedded { display: block; }
body.ob-mode .main-layout,
body.ob-mode .mobile-preview,
body.ob-mode .bottom-bar { display: none !important; }
body.ob-mode { padding-bottom: 0; }
/* 主站 header + mode-switcher 已吸顶，助手内部不再二次吸顶，避免互相遮挡 */
#outbound-root.ob-embedded .ob-topbar,
#outbound-root.ob-embedded .ob-tabs { position: static; }

.ob-entry-btn { background: rgba(255,255,255,.22); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; margin-left: 8px; white-space: nowrap; }
.ob-entry-btn:active { background: rgba(255,255,255,.35); }

.ob-app { min-height: 100%; }
.ob-topbar { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 5; }
.ob-title { font-size: 17px; font-weight: 600; }
.ob-topbar-right { display: flex; align-items: center; gap: 8px; }
.ob-topbar .ob-select { background: rgba(255,255,255,.95); border-color: transparent; max-width: 190px; }
.ob-icon-btn { background: transparent; border: 1px solid rgba(0,0,0,.08); color: #888; border-radius: 8px; width: 28px; height: 28px; line-height: 1; cursor: pointer; font-size: 13px; flex: none; }
.ob-icon-btn:hover { background: #f2f2f5; color: #333; }
.ob-topbar .ob-icon-btn { color: #fff; border-color: rgba(255,255,255,.5); }

.ob-tabs { display: flex; background: #fff; border-bottom: 1px solid #ececf0; position: sticky; top: 52px; z-index: 4; }
.ob-tab { flex: 1; padding: 12px 4px; font-size: 13px; color: #777; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; }
.ob-tab.active { color: #667eea; font-weight: 600; border-bottom-color: #667eea; }

.ob-body { padding: 14px; }
.ob-notice { display: none; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.ob-notice.show { display: block; }
.ob-notice.info { background: #eef2ff; color: #4051a8; }
.ob-notice.warn { background: #fff7e6; color: #96620a; }
.ob-notice.error { background: #ffeded; color: #b52d2d; }

.ob-card { background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ob-card-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ob-hint-inline { font-size: 12px; font-weight: 400; color: #999; }
.ob-tip { font-size: 12px; color: #999; line-height: 1.55; }
.ob-mb { margin-bottom: 10px; }
.ob-footnote { font-size: 12px; color: #aaa; line-height: 1.6; padding: 2px 6px 18px; }
.ob-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ob-block { display: block; width: 100%; margin-top: 12px; }
[hidden] { display: none !important; }

.ob-btn { background: #f0f0f4; color: #444; border: none; padding: 9px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: .15s; }
.ob-btn:hover { background: #e6e6ee; }
.ob-btn:disabled { opacity: .45; cursor: not-allowed; }
.ob-btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.ob-btn-primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, #667eea, #764ba2); }
.ob-btn-danger { background: #fff0f0; color: #c23b3b; }
.ob-btn-sm { padding: 6px 10px; font-size: 12px; }

.ob-input, .ob-select, .ob-textarea { width: 100%; padding: 9px 11px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; background: #fff; color: #333; font-family: inherit; }
.ob-textarea { resize: vertical; line-height: 1.6; }
.ob-input:focus, .ob-select:focus, .ob-textarea:focus { outline: none; border-color: #667eea; }
.ob-input-sm, .ob-select-sm { width: auto; min-width: 68px; padding: 6px 8px; font-size: 12px; }
.ob-input-qty { width: 76px; text-align: right; padding: 6px 8px; font-size: 13px; }
.ob-select-sm { max-width: 190px; }

.ob-subtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ob-subtab { flex: 1; padding: 7px 4px; border: 1px solid #e6e6ec; background: #fafafd; color: #777; border-radius: 8px; font-size: 12px; cursor: pointer; }
.ob-subtab.active { background: #eef2ff; color: #5a67c8; border-color: #c9d2ff; font-weight: 600; }
/* 色卡点选：字母系列分栏（横向滚动，系列与数量随当前品牌色卡动态计算） */
.ob-series-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; margin-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ob-series-tabs::-webkit-scrollbar { display: none; }
.ob-series { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid #e6e6ec; background: #fafafd; color: #777; border-radius: 999px; font-family: inherit; font-size: 12px; line-height: 1; white-space: nowrap; cursor: pointer; }
.ob-series i { flex: none; display: inline-block; width: 24px; height: 10px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); }
.ob-series em { font-style: normal; font-size: 10px; color: #aaa; background: #f0f0f4; border-radius: 999px; padding: 2px 5px; }
.ob-series.active { background: #eef2ff; color: #5a67c8; border-color: #c9d2ff; font-weight: 600; }
.ob-series.active em { background: #dfe5ff; color: #5a67c8; }

.ob-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; margin: 10px 0; padding: 2px; }
.ob-chip { border: 2px solid transparent; background: #f6f6f9; border-radius: 8px; padding: 4px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ob-chip > span { width: 100%; height: 22px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); display: block; }
.ob-chip small { font-size: 10px; color: #666; }
.ob-chip.on { border-color: #667eea; background: #eef2ff; }
.ob-chip.on small { color: #4a56b8; font-weight: 600; }

.ob-list { display: flex; flex-direction: column; gap: 6px; }
.ob-item { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid #f2f2f5; flex-wrap: wrap; }
.ob-item:last-child { border-bottom: none; }
.ob-item-main { flex: 1; min-width: 120px; font-size: 13px; line-height: 1.5; }
.ob-swatch { display: inline-block; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); vertical-align: middle; flex: none; }
.ob-swatch-empty { background: repeating-linear-gradient(45deg, #eee, #eee 4px, #ddd 4px, #ddd 8px); }
.ob-empty { padding: 18px 10px; text-align: center; color: #aaa; font-size: 13px; line-height: 1.6; }
.ob-tag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #f0f0f4; color: #777; white-space: nowrap; }
.ob-tag.ok { background: #e7f7ed; color: #1f8a4c; }
.ob-tag.warn { background: #fff3d9; color: #a06a00; }
.ob-tag.bad { background: #ffeaea; color: #c0392b; }
.ob-pill { display: inline-flex; align-items: center; gap: 4px; background: #f4f4f8; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #555; }

.ob-steps { display: flex; gap: 4px; margin-bottom: 12px; }
.ob-steps span { flex: 1; text-align: center; font-size: 11px; padding: 6px 2px; background: #fff; color: #aaa; border-radius: 8px; }
.ob-steps span.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; font-weight: 600; }
.ob-steps span.done { background: #eef2ff; color: #667eea; }

.ob-upload { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #cdd3ee; border-radius: 14px; padding: 26px 12px; cursor: pointer; color: #667eea; font-size: 14px; font-weight: 600; background: #fafaff; }
.ob-upload:hover { background: #f2f4ff; }
.ob-upload-icon { font-size: 34px; }
.ob-canvas-wrap { background: #2a2a30; border-radius: 12px; overflow: hidden; margin: 10px 0; line-height: 0; }
.ob-canvas-wrap canvas { width: 100%; height: auto; display: block; touch-action: none; }
.ob-grid-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #555; }
.ob-grid-controls label { display: inline-flex; align-items: center; gap: 5px; }
.ob-check { font-size: 12px; color: #666; }

.ob-anchor-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; background: #f7f8ff; padding: 10px; border-radius: 10px; }
.ob-anchor-picker { margin: 10px 0; }

.ob-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.ob-stat { background: #f6f6fa; border-radius: 10px; padding: 8px 12px; min-width: 72px; text-align: center; }
.ob-stat b { display: block; font-size: 18px; color: #444; line-height: 1.2; }
.ob-stat span { font-size: 11px; color: #999; }
.ob-stat.ok b { color: #1f8a4c; } .ob-stat.mid b { color: #d38b00; }
.ob-stat.low b { color: #d84a3a; } .ob-stat.gray b { color: #888; } .ob-stat.manual b { color: #667eea; }
.ob-calib-tag { align-self: center; font-size: 11px; color: #888; background: #f0f0f4; border-radius: 999px; padding: 4px 10px; }

.ob-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ob-table th { text-align: left; color: #999; font-weight: 500; font-size: 11px; padding: 6px 4px; border-bottom: 1px solid #eee; }
.ob-table td { padding: 8px 4px; border-bottom: 1px solid #f4f4f7; }
.ob-ok { color: #1f8a4c; } .ob-bad { color: #c0392b; }

.ob-draft { margin-top: 14px; padding: 12px; background: #f8f8fb; border-radius: 12px; }
.ob-draft.pending { background: #fff8e9; border: 1px solid #f3d99a; }
.ob-draft.confirmed { background: #ecf9f1; border: 1px solid #b9e6cb; }
.ob-draft-head { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ob-warn-line { background: #fff3f3; color: #a33; font-size: 12px; padding: 8px 10px; border-radius: 8px; margin: 8px 0; line-height: 1.5; }

.ob-review { border: 1px solid #ececf2; border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.ob-review.selected { border-color: #667eea; box-shadow: 0 0 0 2px rgba(102,126,234,.15); }
.ob-review-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.ob-cands { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ob-cand { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e2ea; background: #fafafd; border-radius: 8px; padding: 5px 8px; font-size: 12px; cursor: pointer; color: #444; }
.ob-cand:hover { border-color: #667eea; background: #eef2ff; }
.ob-cand small { color: #999; }
.ob-review-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.ob-record { border: 1px solid #ececf2; border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.ob-record .ob-row { margin-top: 6px; }

.ob-thresholds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ob-th-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #666; background: #f8f8fb; padding: 6px 9px; border-radius: 8px; }
.ob-th-field .ob-input { width: 82px; text-align: right; padding: 5px 7px; }


/* ========== 20261115e 手机端补充 ========== */
/* 拍照 / 相册双入口：原来带 capture="environment" 只能调相机，没法进相册 */
.ob-upload-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-upload-duo .ob-upload { padding: 18px 8px; }
.ob-upload-duo .ob-upload-icon { font-size: 28px; }

/* 手选色号：紧凑确认区，替代一长串「待确认」逐条列表 */
.ob-picked-bar {
  margin: 10px 0 4px; padding: 10px;
  background: #f7f8ff; border: 1px solid #e3e7fb; border-radius: 12px;
}
.ob-picked-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ob-picked-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; min-height: 34px;
  border: 1px solid #cdd3ee; border-radius: 999px;
  background: #fff; color: #333; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.ob-picked-chip i { font-style: normal; color: #9aa0b8; font-size: 14px; }
.ob-voice-fallback { padding: 4px 0; }
