/* Multi-product upload and crawl queue */
.upload-page-head { display:flex; justify-content:space-between; gap:24px; margin-bottom:26px; }
.upload-page-head .page-sub { max-width:850px; line-height:1.65; }
.upload-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.7fr); gap:18px; align-items:start; }
.upload-panel,.upload-explainer,.upload-job-card,.upload-no-jobs { background:var(--panel); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow-sm); }
.upload-panel { padding:24px; }
.upload-explainer { padding:22px; position:sticky; top:92px; }
.upload-panel-title { font:700 13px/1.2 Inter,sans-serif; letter-spacing:.01em; color:var(--soft); }
.mt24 { margin-top:24px; }
.market-switch { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:13px; }
.market-switch button { text-align:left; border:1px solid var(--line2); background:var(--panel2); color:var(--text); border-radius:14px; padding:15px; transition:.16s ease; }
.market-switch button:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.market-switch button.active { border-color:var(--acc); box-shadow:0 0 0 1px rgba(49,94,251,.22),inset 0 0 24px rgba(49,94,251,.08); }
.market-switch span { display:block; font:700 14px Inter,sans-serif; margin-bottom:5px; }
.market-switch small { display:block; color:var(--dim); font-size:11.5px; line-height:1.45; }
.upload-dropzone { margin-top:13px; min-height:190px; border:1px dashed #AAB7CA; border-radius:16px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:22px; text-align:center; background:linear-gradient(180deg,#F7F9FF,#FBFCFF); cursor:pointer; }
.upload-dropzone:hover { border-color:var(--acc); background:rgba(49,94,251,.06); }
.upload-dropzone input { display:none; }
.upload-drop-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:rgba(49,94,251,.13); color:var(--link); font-size:28px; line-height:1; }
.upload-dropzone strong { font:700 15px Inter,sans-serif; }
.upload-dropzone>span:last-child { color:var(--dim); font-size:12px; }
.upload-selected { display:flex; flex-wrap:wrap; gap:7px; margin:10px 0; }
.upload-selected span { border:1px solid var(--line2); background:var(--panel2); color:var(--soft); border-radius:999px; padding:6px 9px; font-size:10.5px; }
.upload-panel textarea { width:100%; resize:vertical; margin-top:12px; background:var(--panel2); color:var(--text); border:1px solid var(--line2); border-radius:12px; padding:12px; outline:none; }
.upload-panel textarea:focus { border-color:var(--acc); }
.upload-submit { width:100%; margin-top:12px; }
.upload-step { display:grid; grid-template-columns:35px 1fr; gap:10px; align-items:start; padding:16px 0; border-bottom:1px solid var(--line3); }
.upload-step:last-child { border-bottom:0; }
.upload-step b { font:700 11px Inter,sans-serif; color:var(--acc); }
.upload-step span { color:var(--dim); font-size:12px; line-height:1.55; }
.upload-list-head { display:flex; align-items:end; justify-content:space-between; gap:18px; margin:34px 0 13px; }
.upload-list-head h2 { font:700 20px Inter,sans-serif; }
.upload-list-head p { margin-top:5px; color:var(--dim); font-size:12px; }
.upload-list-head>span { font:600 10px Inter,sans-serif; color:var(--faint); letter-spacing:.08em; text-transform:uppercase; }
.upload-job-card { overflow:hidden; margin-bottom:12px; }
.upload-job-head { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:17px 18px; border-bottom:1px solid var(--line3); }
.upload-job-title { font:700 14px Inter,sans-serif; }
.upload-job-meta { margin-top:5px; color:var(--dim2); font:500 10px Inter,sans-serif; letter-spacing:.02em; }
.upload-job-badges { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.upload-market-badge,.upload-status { display:inline-flex; align-items:center; white-space:nowrap; border-radius:999px; padding:6px 9px; font:700 9.5px Inter,sans-serif; letter-spacing:.06em; }
.upload-market-badge.local { color:var(--acc); background:rgba(49,94,251,.09); border:1px solid rgba(49,94,251,.28); }
.upload-market-badge.international { color:#6941C6; background:#F4F0FF; border:1px solid #D9CCFA; }
.upload-status { border:1px solid var(--line2); color:var(--dim); }
.upload-status.queued,.upload-status.detecting { color:var(--amber); border-color:rgba(251,191,36,.28); background:rgba(251,191,36,.08); }
.upload-status.crawling { color:var(--link); border-color:rgba(49,94,251,.3); background:rgba(49,94,251,.09); }
.upload-status.done { color:var(--green); border-color:rgba(20,125,84,.3); background:rgba(20,125,84,.08); }
.upload-status.failed { color:var(--red); border-color:rgba(193,57,57,.3); background:rgba(193,57,57,.08); }
.upload-product-row { display:grid; grid-template-columns:30px minmax(180px,1fr) auto auto; gap:13px; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line3); }
.upload-product-row:last-child { border-bottom:0; }
.upload-product-index { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; background:var(--panel2); color:var(--faint); font:700 10px Inter,sans-serif; }
.upload-product-name { font-weight:650; font-size:13px; }
.upload-product-meta { margin-top:4px; color:var(--dim2); font-size:10.5px; line-height:1.4; }
.upload-product-error { margin-top:5px; color:var(--red); font-size:10.5px; }
.upload-product-results { display:flex; align-items:center; justify-content:flex-end; gap:10px; color:var(--dim); font-size:11px; }
.upload-product-results strong { color:var(--text); }
.upload-product-results a { font-size:12px; }
.upload-empty-row,.upload-no-jobs { padding:28px; color:var(--dim); font-size:12px; }
@media (max-width:980px) { .upload-layout{grid-template-columns:1fr}.upload-explainer{position:static}.upload-product-row{grid-template-columns:30px 1fr auto}.upload-product-results{grid-column:2/4;justify-content:flex-start;flex-wrap:wrap}.upload-job-head{align-items:flex-start;flex-direction:column}.upload-job-badges{justify-content:flex-start} }
@media (max-width:620px) { .market-switch{grid-template-columns:1fr}.upload-panel{padding:16px}.upload-product-row{grid-template-columns:26px 1fr}.upload-product-row>.upload-status{grid-column:2}.upload-product-results{grid-column:2}.upload-job-head{padding:15px}.upload-product-row{padding:13px 15px} }

:is(.market-switch small, .upload-selected span, .upload-step b, .upload-list-head > span,
  .upload-job-meta, .upload-market-badge, .upload-status, .upload-product-index,
  .upload-product-meta, .upload-product-error, .upload-product-results) { font-size:12px; }
.upload-submit { min-height:44px; }

/* Unified research workspace and photo dialog. */
.research-views { margin: 18px 0; max-width: 440px; }
.research-views button { flex: 1; min-height: 44px; }
#research-photo-form .upload-panel { padding: 0; border: 0; box-shadow: none; }
#research-photo-form select { display: block; width: 100%; margin-top: 8px; min-height: 44px; }
#research-activity .upload-empty-row a { display: inline-block; margin: 4px 0; }
#research-activity .upload-status.running { color: var(--link); }
#research-results-pane[hidden], #research-activity-pane[hidden] { display: none; }
@media (max-width: 620px) { .research-views { display: flex; width: 100%; } }

#research-new-dialog { margin: auto; overflow-y: auto; }
#research-photo-form .upload-dropzone { position: relative; min-height: 150px; }
#research-photo-form .upload-dropzone input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
#research-photo-form .upload-dropzone:focus-within { outline: 2px solid var(--acc); outline-offset: 3px; }
#research-photo-form select { padding: 10px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); color: var(--text); }
