/* Shopify BG Remove — minimal, legible internal-tool styling. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1d2330;
  --muted: #6b7280;
  --line: #e3e6ea;
  --brand: #2f6df6;
  --ok: #138a52;
  --okbg: #e7f6ee;
  --work: #b25e09;
  --workbg: #fdf0e1;
  --bad: #c0392b;
  --badbg: #fdecea;
  --info: #1c40b0;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; font-size: .9em; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: #11161f; color: #fff;
}
.topbar .brand { color: #fff; font-weight: 700; font-size: 16px; }
.topbar .tag { color: #9aa4b2; font-size: 13px; }
.jobline { padding: 8px 24px 0; color: var(--muted); font-size: 13px; }

.steps { display: flex; gap: 8px; padding: 12px 24px; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600;
}
.step .n {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: #e8ebf0; color: var(--muted); font-size: 12px;
}
.step.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.step.active .n { background: rgba(255,255,255,.25); color: #fff; }
.step:hover { text-decoration: none; }

.wrap { max-width: 980px; margin: 8px auto 64px; padding: 0 24px; }
h1 { font-size: 24px; margin: 16px 0 8px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
.lead { color: #333; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 600; cursor: pointer; font-size: 14px;
}
.btn:hover { text-decoration: none; border-color: #c8ccd3; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { background: var(--badbg); border-color: #f3c3bd; color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; max-width: 620px; margin: 14px 0;
}
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type=file], .field input[type=url], .field input[type=text] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
.check { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; }
.inline-restart { margin-top: 10px; }

.alert { padding: 12px 16px; border-radius: 10px; margin: 14px 0; }
.alert.ok   { background: var(--okbg); color: var(--ok); }
.alert.err  { background: var(--badbg); color: var(--bad); }
.alert.info { background: #e8eefc; color: #1c40b0; }

.dash { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.metric {
  flex: 1 1 160px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; text-align: center;
}
.metric .num { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; }
.metric span:last-child { color: var(--muted); font-size: 12px; }
.metric.ok   { border-color: #bfe6cf; }
.metric.work { border-color: #f3d6ad; }
.metric.bad  { border-color: #f3c3bd; }

table.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.grid th, table.grid td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
table.grid th { background: #f0f2f5; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.grid tr:last-child td { border-bottom: 0; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef1f5; color: var(--muted); }
.pill.s-transparent { background: var(--okbg); color: var(--ok); }
.pill.s-processed   { background: #e8eefc; color: #1c40b0; }
.pill.s-downloaded  { background: var(--workbg); color: var(--work); }
.pill.s-failed      { background: var(--badbg); color: var(--bad); }
.pill.s-pending     { background: #eef1f5; color: var(--muted); }
.pill.s-exported, .pill.s-validated, .pill.s-imported, .pill.s-processing { background: #e8eefc; color: #1c40b0; }

/* Progress bar */
.progress { position: relative; height: 26px; background: #e8ebf0; border-radius: 999px; overflow: hidden; margin: 16px 0; max-width: 620px; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); transition: width .3s ease; }
.progress .bar-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #11161f; }

/* Image list (lightweight — no inline images; click a row to view) */
table.imglist { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 12px 0; }
table.imglist th, table.imglist td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
table.imglist th { background: #f0f2f5; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.imglist tbody tr { cursor: pointer; }
table.imglist tbody tr:hover { background: #f3f6ff; }
table.imglist tbody tr:last-child td { border-bottom: 0; }
table.imglist td.src { color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Thumbnail grid */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 12px 0; }
.thumb { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.thumb:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(47,109,246,.15); }
.thumb img { display: block; width: 100%; height: 120px; object-fit: contain; background:
  conic-gradient(#e9ecf1 25%, #fff 0 50%, #e9ecf1 0 75%, #fff 0) 0 0 / 18px 18px; }
.thumb .ph { height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 12px; background: #f0f2f5; }
.thumb figcaption { padding: 7px; text-align: center; border-top: 1px solid var(--line); }

/* Before/after modal */
.modal { position: fixed; inset: 0; background: rgba(10,14,22,.6); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--card); border-radius: 14px; max-width: 720px; width: 100%; max-height: 92vh; overflow: auto; padding: 20px; position: relative; }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal h3 { margin: 0 32px 12px 0; font-size: 18px; }

.checker, .ba { background: conic-gradient(#dfe3e9 25%, #fff 0 50%, #dfe3e9 0 75%, #fff 0) 0 0 / 22px 22px; }
.single-img { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto; border-radius: 8px; }

/* Wipe slider */
.ba { position: relative; width: 100%; max-width: 640px; margin: 0 auto; border-radius: 8px; overflow: hidden; user-select: none; }
.ba .ba-img { display: block; width: 100%; height: auto; }
.ba .ba-after { position: relative; z-index: 1; }
.ba .ba-before { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; z-index: 2; }
.ba .ba-before img { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; }
.ba .ba-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); z-index: 3; transform: translateX(-1px); pointer-events: none; }
.ba .ba-divider::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #11161f; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.3); font-size: 14px; }
.ba .ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; }
.ba-tags { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 2px 0; font-weight: 700; }

.meta { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 16px 0 0; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; word-break: break-all; }

.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 24px; border-top: 1px solid var(--line); }
