/* Stock Admin v2 — standalone styles */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
  background: #f4f4f5;
  color: #111;
  font-size: 15px;
  line-height: 1.5;
}
.sa-top {
  background: #1a2b4a;
  color: #fff;
  padding: 0.85rem 1.25rem;
}
.sa-brand {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sa-page {
  max-width: 1500px;
  margin: 1.25rem auto;
  padding: 0 1rem 5rem;
}

/* ── Login ─────────────────────────────────────── */
.sa-login-card {
  max-width: 380px;
  margin: 3rem auto;
  background: #fff;
  border-radius: 6px;
  padding: 1.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.sa-login-card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  color: #1a2b4a;
}
.sa-login-card label {
  display: block;
  margin-bottom: 1rem;
}
.sa-login-card label > span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.sa-login-card input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  font-family: inherit;
}
.sa-login-card input[type="password"]:focus {
  outline: none;
  border-color: #1a2b4a;
  box-shadow: 0 0 0 3px rgba(26,43,74,0.12);
}
.sa-login-card button {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #1a2b4a;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.sa-login-card button:hover { background: #0f1d36; }

/* ── Messages ──────────────────────────────────── */
.sa-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.sa-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-weight: 600;
  transition: opacity 0.5s;
}

/* ── Gender tabs ───────────────────────────────── */
.sa-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sa-tab {
  padding: 0.7rem 1rem;
  background: #fff;
  color: #1a2b4a;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.sa-tab.active {
  background: #1a2b4a;
  color: #fff;
  border-color: #1a2b4a;
}

/* ── Sub-cat accordion ─────────────────────────── */
details.sa-subcat {
  background: #fff;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
}
details.sa-subcat[open] {
  border: 1px solid #e5e7eb;
}
.sa-subcat-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sa-subcat-summary::-webkit-details-marker { display: none; }
.sa-subcat-name {
  flex: 1;
  font-weight: 600;
  color: #111;
}
.sa-subcat-meta {
  margin-right: 0.5rem;
}
.sa-updated {
  font-size: 0.78rem;
  color: #666;
  background: #f0f0f0;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
}
.sa-updated-empty { color: #aaa; }

/* ── Toggle circles (green +, red −) ───────────── */
.sa-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sa-toggle .sa-tog-plus,
.sa-toggle .sa-tog-minus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  font-family: Arial, sans-serif;
}
.sa-toggle .sa-tog-plus  { background: #15803d; }
.sa-toggle .sa-tog-minus { background: #c8102e; display: none; }
details[open] > summary .sa-toggle .sa-tog-plus  { display: none; }
details[open] > summary .sa-toggle .sa-tog-minus { display: inline-flex; }

/* ── Sub-cat body ──────────────────────────────── */
.sa-subcat-body {
  padding: 0.6rem 0.85rem 0.85rem;
  border-top: 1px solid #ececec;
  background: #fafafb;
}

/* ── Product (colour) accordion inside sub-cat ─── */
details.sa-product {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.sa-product-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sa-product-summary::-webkit-details-marker { display: none; }
.sa-product-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}
.sa-product-summary .sa-updated {
  margin-right: 0.25rem;
}
.sa-disabled { opacity: 0.55; }
.sa-tag {
  display: inline-block;
  font-size: 0.7rem;
  background: #fef3c7;
  color: #92400e;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.4rem;
}

.sa-product-body {
  padding: 0.5rem 0.85rem 0.75rem;
  border-top: 1px solid #ececec;
  background: #fafafb;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  max-width: 380px;
}

/* Inline product (no variants) */
.sa-product-inline {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem;
}

/* ── Variant rows ──────────────────────────────── */
.sa-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: #f7f7f8;
  border-radius: 4px;
}
.sa-vname {
  flex: 1;
  font-size: 0.9rem;
}
.sa-input {
  width: 80px;
  padding: 0.4rem 0.5rem;
  font-size: 0.92rem;
  text-align: center;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 600;
  background: #fff;
}
.sa-input:focus {
  outline: none;
  border-color: #1a2b4a;
  box-shadow: 0 0 0 2px rgba(26,43,74,0.12);
}
.sa-input.sa-changed {
  background: #fff8c5;
  border-color: #d4a72c;
}

/* ── Per-cat action bar (Save inside sub-cat) ──── */
.sa-cat-actions {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #d4d4d8;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sa-cat-changes {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  color: #444;
}
.sa-cat-save {
  padding: 0.6rem 1.25rem;
  background: #c8102e;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.sa-cat-save:hover { background: #a30d23; }
.sa-cat-save:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* ── Mobile ────────────────────────────────────── */
@media (max-width: 640px) {
  .sa-page { padding: 0 0.6rem 5rem; }
  .sa-subcat-summary { padding: 0.7rem 0.75rem; gap: 0.5rem; }
  .sa-subcat-name { font-size: 0.95rem; }
  .sa-updated { font-size: 0.72rem; }
  .sa-product-body { padding: 0.5rem 0.6rem 0.7rem; max-width: 100%; }
  .sa-cat-save { padding: 0.55rem 0.85rem; font-size: 0.85rem; }
  .sa-cat-changes { font-size: 0.82rem; }
}

/* ════════════════════════════════════════════════════════════════
 *  Import flow styles
 * ════════════════════════════════════════════════════════════════ */

.sa-toolbar {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sa-secondary-btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: #fff;
  color: #1a2b4a;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.sa-secondary-btn:hover { background: #f7f7f8; }

.sa-primary-btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  background: #c8102e;
  color: #fff;
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.sa-primary-btn:hover { background: #a30d23; }
.sa-primary-btn[disabled] { background: #94a3b8; cursor: not-allowed; }

.sa-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sa-card-h {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2b4a;
}
.sa-card-meta { margin: 0; font-size: 0.92rem; color: #444; }
.sa-muted { color: #777; }

.sa-file-input {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: 1px dashed #d4d4d8;
  border-radius: 4px;
  font-family: inherit;
}

/* ── Styled file picker (label-wrapped native input) ─────── */
.sa-file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  cursor: pointer;
}
.sa-file-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.sa-file-button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  background: #1a2b4a;
  color: #fff;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.sa-file-label:hover .sa-file-button { background: #243a66; }
.sa-file-label:focus-within .sa-file-button {
  outline: 2px solid #c8102e;
  outline-offset: 2px;
}
.sa-file-name {
  font-size: 0.92rem;
  color: #777;
  word-break: break-all;
}
.sa-file-name-picked {
  color: #1a2b4a;
  font-weight: 600;
}

.sa-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Section bands (Cant match / Matched dividers) ───────── */
.sa-section-band {
  margin: 1.1rem 0 0.55rem;
  padding: 0.7rem 0.95rem;
  border-radius: 5px;
}
.sa-section-band-h {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.sa-section-band-sub {
  font-size: 0.82rem;
  margin-top: 0.15rem;
  opacity: 0.85;
}
.sa-section-band-warn {
  background: #fef3c7;
  border-left: 4px solid #d4a72c;
  color: #78350f;
}
.sa-section-band-calm {
  background: #eef2ff;
  border-left: 4px solid #1a2b4a;
  color: #1e3a8a;
}
.sa-section-band-missing {
  background: #f5f3ff;
  border-left: 4px solid #6d28d9;
  color: #4c1d95;
}

.sa-cat-header-missing {
  background: #6d28d9;
}
.sa-cat-header-missing .sa-cat-header-count {
  color: rgba(255,255,255,0.78);
}

/* Grid of "missing" product cards */
.sa-missing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}
.sa-missing-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 0.55rem 0.7rem 0.7rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, transform 0.08s;
}
.sa-missing-card:hover {
  border-color: #6d28d9;
  transform: translateY(-1px);
}
.sa-missing-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #f7f7f8;
  margin-bottom: 0.5rem;
}
.sa-missing-card .sa-thumb-noimg {
  height: 130px;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}
.sa-missing-cap { padding: 0; }
.sa-missing-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1a2b4a;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sa-missing-meta {
  font-size: 0.78rem;
  color: #555;
}
.sa-missing-meta strong {
  color: #1a2b4a;
  font-weight: 700;
}

/* ── Category sub-header (within matched section) ─────────── */
.sa-cat-header {
  margin: 1.1rem 0 0.5rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #1a2b4a;
  border-radius: 4px;
}
.sa-cat-header:first-of-type { margin-top: 0.7rem; }
.sa-cat-header-count {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  margin-left: 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ── Review row (TRIED + CAN'T) ───────────────────────────── */
.sa-import-row {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  margin-bottom: 0.45rem;
  overflow: hidden;
}
.sa-import-row.sa-staged {
  border-color: #a7f3d0;
  background: #f0fdf4;
}
.sa-import-row.sa-skipped {
  opacity: 0.55;
}

/* Saved rows: hide the form body, show only the head one-liner */
.sa-import-row.sa-staged .sa-import-body-wrap { display: none; }
.sa-import-row.sa-staged.sa-row-expanded .sa-import-body-wrap { display: flex; }

/* Body-wrap: thumb on left, form on right (expanded rows only) */
.sa-import-body-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  padding: 0.5rem 0.65rem 0.55rem;
}
.sa-row-thumb {
  flex: 0 0 150px;
  width: 150px;
  height: 150px;
  border-radius: 4px;
  overflow: hidden;
  background: #f7f7f8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: box-shadow 0.12s;
}
a.sa-row-thumb {
  cursor: pointer;
}
a.sa-row-thumb:hover {
  box-shadow: 0 0 0 2px #c8102e;
}
a.sa-row-thumb::after {
  content: '↗';
  position: absolute;
  top: 4px;
  right: 5px;
  background: rgba(26, 43, 74, 0.85);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.12s;
  pointer-events: none;
}
a.sa-row-thumb:hover::after { opacity: 1; }
.sa-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sa-row-thumb .sa-thumb-noimg {
  font-size: 0.78rem;
  color: #888;
}

/* The form section now sits to the right of the thumb */
.sa-import-form {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}

/* +/− toggle button (only appears on staged rows) */
.sa-row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  margin-right: 0.45rem;
  padding: 0;
  background: #fff;
  border: 1px solid #1a2b4a;
  border-radius: 4px;
  color: #1a2b4a;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.sa-row-toggle:hover { background: #1a2b4a; color: #fff; }
.sa-import-row.sa-staged .sa-import-head { padding-bottom: 0.45rem; }

.sa-import-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem 0.35rem;
  background: #fafafb;
  border-bottom: 1px solid #ececec;
}
.sa-import-head-text { flex: 1; min-width: 0; }
.sa-import-excel {
  font-size: 0.92rem;
  line-height: 1.3;
  color: #1a2b4a;
}
.sa-import-pred-line {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #555;
  margin-top: 1px;
  padding-left: 1.7em;
  word-break: break-word;
}
.sa-import-status { white-space: nowrap; flex-shrink: 0; }

.sa-tag-icon {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.sa-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.12rem 0.42rem;
  border-radius: 99px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f0f0f0;
  color: #444;
}
.sa-tag-staged  { background: #ecfdf5; color: #065f46; }
.sa-tag-matched { background: #eff6ff; color: #1e40af; }
.sa-tag-cant    { background: #fef3c7; color: #92400e; }
.sa-tag-skip    { background: #f3f4f6; color: #6b7280; }

/* ── Thumbnail strip (unmatched rows only) ───────────────── */
.sa-thumb-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.4rem 0.1rem 0.5rem;
  margin: 0 0 0.55rem 0;
  scrollbar-width: thin;
}
.sa-thumb-strip::-webkit-scrollbar { height: 6px; }
.sa-thumb-strip::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 3px;
}
.sa-thumb {
  flex: 0 0 auto;
  width: 150px;
  border: 2px solid #e5e7eb;
  border-radius: 5px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.12s, transform 0.08s;
  display: flex;
  flex-direction: column;
}
.sa-thumb:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}
.sa-thumb.sa-thumb-sel {
  border-color: #c8102e;
  box-shadow: 0 0 0 2px #fee2e2;
}
.sa-thumb.sa-thumb-used {
  border-color: #d4a72c;
}
.sa-thumb.sa-thumb-used:hover {
  border-color: #a87f1f;
}
.sa-thumb-used-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #d4a72c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  pointer-events: none;
}
.sa-thumb { position: relative; }
.sa-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #f7f7f8;
}
.sa-thumb-noimg {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f8;
  color: #888;
  font-size: 0.85rem;
}
.sa-thumb-cap {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.3;
  padding: 0.45rem 0.5rem;
  color: #2a2a2a;
}

.sa-product-select {
  width: 100%;
  padding: 0.4rem 0.55rem;
  margin: 0 0 0.5rem 0;
  font-size: 0.92rem;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
}

.sa-import-qty-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  margin-bottom: 0.6rem;
}
.sa-import-qty-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.85rem;
  background: #fff;
  border: 1px solid #d4d4d8;
  border-radius: 5px;
  cursor: text;
  min-width: 5.5em;
}
.sa-import-qty-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2b4a;
  font-variant-numeric: tabular-nums;
  min-width: 1.8em;
  text-align: right;
  border-right: 1px solid #ececec;
  padding-right: 0.55rem;
}
.sa-import-qty-input {
  width: 3.2em;
  padding: 0.25rem 0.3rem;
  font-size: 1.1rem;
  text-align: center;
  border: 0;
  border-radius: 0;
  font-family: inherit;
  font-weight: 600;
  background: transparent;
  color: #1a2b4a;
}
.sa-import-qty-input:focus {
  outline: none;
  background: #fef9c3;
}
.sa-was-empty {
  background: #fff8c5;
  border-color: #d4a72c;
}
.sa-empty-flag {
  font-size: 1.05rem;
  color: #92400e;
  font-weight: 700;
  margin-left: -0.2rem;
}

.sa-skip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #444;
  cursor: pointer;
}

.sa-import-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.sa-import-row-actions .sa-primary-btn {
  padding: 0.4rem 0.95rem;
  font-size: 0.88rem;
}

/* ── Confirm page rows ───────────────────────────────────── */
.sa-confirm-row {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.4rem;
}
.sa-confirm-row.sa-skipped { opacity: 0.55; background: #f9f9f9; }
.sa-confirm-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sa-confirm-label  { flex: 1; font-size: 0.92rem; min-width: 240px; }
.sa-confirm-status { font-size: 0.88rem; color: #555; }
.sa-confirm-qtys {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.sa-confirm-qty {
  background: #f7f7f8;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.sa-confirm-qty.sa-was-empty {
  background: #fff8c5;
}
.sa-confirm-qty em {
  color: #92400e;
  margin-left: 0.2rem;
  font-style: normal;
}

/* ── Backup table (restore page) ─────────────────────────── */
.sa-backup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sa-backup-table th {
  background: #f7f7f8;
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  border-bottom: 1px solid #e5e7eb;
}
.sa-backup-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #ececec;
  vertical-align: top;
}
.sa-backup-table tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  .sa-import-pred { display: none; }
  .sa-import-body-wrap { flex-direction: column; gap: 0.55rem; }
  .sa-row-thumb { width: 100%; flex-basis: auto; height: 180px; }
  .sa-import-qty-cell { padding: 0.25rem 0.5rem 0.25rem 0.6rem; min-width: 4.5em; }
  .sa-import-qty-label { font-size: 0.95rem; min-width: 1.4em; padding-right: 0.4rem; }
  .sa-import-qty-input { width: 2.5em; font-size: 0.95rem; }
  .sa-thumb { width: 110px; }
  .sa-thumb img, .sa-thumb-noimg { height: 110px; }
  .sa-thumb-cap { font-size: 0.7rem; padding: 0.35rem 0.4rem; }
  .sa-confirm-qtys { font-size: 0.78rem; }
  .sa-backup-table { font-size: 0.82rem; }
  .sa-backup-table td input[type="text"] { width: 5em !important; }
}
