/* Product import (product-import.html, js/product-import.js) */
.pi-back { display: inline-block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.pi-title { margin: 0 0 6px; }
.pi-lead { margin: 0 0 18px; max-width: 720px; }
.pi-panel[hidden] { display: none; }
.pi-panel h2 { margin: 0 0 6px; font-size: 18px; }
.pi-panel h3 { margin: 20px 0 4px; font-size: 15px; }

.pi-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; counter-reset: s; flex-wrap: wrap; }
.pi-steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.pi-steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); font-size: 12px; }
.pi-steps li.current { color: var(--accent); border-color: var(--accent); }
.pi-steps li.current::before { background: var(--accent); color: #fff; }
.pi-steps li.done::before { content: '✓'; background: var(--success); color: #fff; }

.pi-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pi-source {
  position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; font: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pi-source:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 10px 24px -16px rgba(16, 24, 40, .4); transform: translateY(-1px); }
.pi-source:disabled { opacity: .5; cursor: not-allowed; }
.pi-source strong { font-size: 15px; }
.pi-source small { color: var(--text-muted); line-height: 1.5; font-size: 13px; }
.pi-source-ic { font-size: 26px; }
.pi-ai-tag { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(241, 90, 44, .1); padding: 3px 8px; border-radius: 999px; }
.pi-ai-off { margin: 12px 0 0; font-size: 13px; }
.pi-help { margin-top: 16px; font-size: 13.5px; }
.pi-help summary { cursor: pointer; font-weight: 600; }
.pi-help ol { margin: 10px 0; padding-left: 20px; line-height: 1.6; }

.pi-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; margin: 10px 0 0; cursor: pointer; text-align: center;
  border: 2px dashed var(--border); border-radius: 12px; background: var(--bg); transition: border-color .15s, background .15s;
}
.pi-drop:hover, .pi-drop.over { border-color: var(--accent); background: rgba(241, 90, 44, .04); }
.pi-drop strong { font-size: 15px; }
.pi-drop small { color: var(--text-muted); font-size: 12.5px; }

.pi-map { display: grid; gap: 6px; margin-top: 10px; }
.pi-map-row { display: grid; grid-template-columns: 170px minmax(0, 260px) minmax(0, 1fr); gap: 12px; align-items: center; }
.pi-map-row label { margin: 0; font-weight: 600; font-size: 13.5px; }
.pi-map-row select { margin: 0; }
.pi-sample { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-req { color: var(--danger); }
.pi-defaults { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

.pi-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pi-actions a:hover { text-decoration: none; }
.pi-count { text-align: right; font-size: 12px; margin: 4px 0 0; }
#pi-text { width: 100%; font: inherit; }

.pi-progress { margin-top: 14px; }
.pi-progress[hidden] { display: none; }
.pi-progress > div { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.pi-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.pi-progress p { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }

.pi-review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pi-review-head p { margin: 0; }
.pi-all { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; margin: 0; }
.pi-all input { width: auto; margin: 0; }
.pi-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; max-height: 60vh; overflow-y: auto; }
.pi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pi-table th { position: sticky; top: 0; background: var(--bg); text-align: left; font-size: 12px; padding: 8px; z-index: 1; }
.pi-table td { padding: 6px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.pi-table input[type="text"], .pi-table select { margin: 0; padding: 6px 8px; font-size: 13px; min-width: 180px; }
.pi-table input[type="checkbox"] { width: auto; margin: 8px 0 0; }
.pi-table tr.off td { opacity: .45; }
.pi-table tr.bad:not(.off) { background: rgba(220, 38, 38, .04); }
.pi-table .nowrap { white-space: nowrap; padding-top: 12px; }
.pi-desc { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; max-width: 320px; }
.pi-notes { min-width: 160px; }
.pi-notes span { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.4; padding-top: 4px; }
.pi-notes span.bad { color: var(--danger); font-weight: 600; }
.pi-note { font-size: 12.5px; margin: 10px 0 0; }

.pi-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.pi-summary span { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--bg); }
.pi-summary .ok { background: rgba(22, 163, 74, .12); color: #166534; }
.pi-summary .warn { background: rgba(217, 119, 6, .12); color: #92400e; }
.pi-summary .bad { background: rgba(220, 38, 38, .1); color: #991b1b; }
.pi-result-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.pi-result-list li { font-size: 13px; padding: 8px 10px; border-left: 3px solid var(--border); margin-bottom: 6px; background: var(--bg); border-radius: 0 8px 8px 0; }
.pi-result-list li strong { display: block; }
.pi-result-list li small { display: block; color: var(--text-muted); word-break: break-all; }
.pi-result-list li.bad { border-left-color: var(--danger); }
.pi-result-list li.warn { border-left-color: #d97706; }
.pi-result-list:empty { display: none; }

@media (max-width: 760px) {
  .pi-sources, .pi-defaults { grid-template-columns: 1fr; }
  .pi-map-row { grid-template-columns: 1fr; gap: 4px; }
  .pi-map-row .pi-sample { margin-bottom: 8px; }
}
.pi-bulk { margin-top: 10px; max-width: 420px; }
.pi-bulk[hidden] { display: none; }
.pi-bulk select { margin: 0; }
.pi-drop-sm { padding: 14px 16px; margin-top: 12px; }
#pi-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.pi-count { text-align: left; }
