:root {
  color-scheme: light;
  --ink: #20251f;
  --muted: #747b72;
  --line: #e7e9e3;
  --canvas: #f5f6f2;
  --paper: #fff;
  --green: #315b43;
  --green-dark: #234531;
  --green-soft: #edf4ed;
  --amber: #916a25;
  --amber-soft: #fbf4e7;
  --red: #a2463f;
  --red-soft: #fbefed;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
.topbar { height: 64px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar__inner { width: min(1120px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -.02em; }
.brand__mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--green); font-family: Georgia, serif; font-size: 17px; }
.brand__muted { color: var(--muted); font-weight: 450; }
.topbar__caption { color: #939990; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.page-shell { width: min(1120px, calc(100% - 48px)); margin: 40px auto 80px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(27px, 4vw, 36px); font-weight: 620; letter-spacing: -.045em; line-height: 1.15; }
h2 { margin-bottom: 5px; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
h3 { margin-bottom: 5px; font-size: 13px; font-weight: 650; }
.subheading, .muted { color: var(--muted); }
.subheading { margin-bottom: 0; font-size: 14px; }
.workflow-guide { margin-bottom: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fdfefc; }
.workflow-guide__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.workflow-guide__heading .eyebrow { margin-bottom: 4px; }
.workflow-guide__heading h2 { margin: 0; }
.workflow-guide__meta { color: var(--muted); font-size: 11px; }
.workflow-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.workflow-steps li { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.workflow-step__number { width: 24px; height: 24px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 750; }
.workflow-steps h3 { margin-bottom: 4px; }
.workflow-steps p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.workflow-guide__note { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.workflow-guide__note a { font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 3px 12px rgb(32 37 31 / 3%); }
.card + .card, .section-block { margin-top: 18px; }
.card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.card__description { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.upload-card { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.4fr); align-items: center; gap: 32px; padding: 26px; }
.upload-card__intro { display: flex; align-items: flex-start; gap: 14px; }
.upload-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 20px; }
.upload-card__intro p { margin: 0; color: var(--muted); font-size: 13px; }
.upload-fields { display: grid; grid-template-columns: 1fr 1.3fr auto; align-items: end; gap: 12px; }
.field label, label { display: block; margin-bottom: 6px; color: #51584f; font-size: 12px; font-weight: 600; }
input[type="text"], select, input[type="file"] { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #dfe3db; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-size: 13px; }
input[type="file"] { padding: 7px; color: var(--muted); }
input:focus, select:focus { border-color: #72937a; outline: 3px solid rgb(49 91 67 / 10%); }
.button, input[type="submit"], button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: white; cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; }
.button:hover, input[type="submit"]:hover, button:hover { border-color: var(--green-dark); background: var(--green-dark); color: white; }
.button:disabled, input[type="submit"]:disabled, button:disabled { cursor: not-allowed; opacity: .48; }
.button--secondary { border-color: var(--line); background: white; color: #4e574d; }
.button--secondary:hover { border-color: #cbd2c8; background: #f8f9f6; color: var(--ink); }
.job-list { width: 100%; border-collapse: collapse; }
.job-list th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: #8a9087; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.job-list td { padding: 15px 14px; border-bottom: 1px solid #eff0ec; color: #555c53; font-size: 13px; }
.job-list tr:last-child td { border-bottom: 0; }
.job-name { color: var(--ink); font-weight: 630; }
.job-date { color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; background: #f0f1ee; color: #646b61; font-size: 11px; font-weight: 650; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-pill--ready_for_price_sync, .status-pill--prices_synced { background: var(--green-soft); color: var(--green); }
.status-pill--completed, .status-pill--products_synced { background: #eaf1ed; color: #3b6a50; }
.status-pill--failed { background: var(--red-soft); color: var(--red); }
.status-pill--awaiting_headers { background: var(--amber-soft); color: var(--amber); }
.empty-state { padding: 34px 16px; color: var(--muted); text-align: center; }
.empty-state__mark { width: 42px; height: 42px; margin: 0 auto 10px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: #9aa096; font-size: 18px; }
.flash { margin-bottom: 18px; padding: 12px 15px; border: 1px solid; border-radius: 9px; font-size: 13px; }
.flash--notice { border-color: #d5e4d6; background: #f0f7f0; color: var(--green-dark); }
.flash--alert { border-color: #eed5d1; background: var(--red-soft); color: var(--red); }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; color: #687166; font-size: 12px; font-weight: 600; }
.job-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.stat-card { padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.stat-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.stat-value { display: block; color: var(--ink); font-size: 17px; font-weight: 650; }
.file-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 15px 0 0; padding: 0; list-style: none; }
.file-link { min-height: 52px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 12px; font-weight: 600; }
.file-link:hover { border-color: #cbd8cc; background: #fafcf9; }
.file-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: #f2f4f0; color: var(--green); font-size: 10px; font-weight: 750; }
.step-label { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.step-label__number { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); font-size: 11px; letter-spacing: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
table.preview-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.preview-table th { padding: 10px 12px; background: #f7f8f5; color: #737a70; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.preview-table td { max-width: 260px; overflow: hidden; padding: 10px 12px; border-top: 1px solid #eff0ec; color: #4f564e; font-size: 12px; text-overflow: ellipsis; }
.mapping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.mapping-grid p { margin: 0; }
.stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stage-card { min-height: 180px; padding: 19px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.stage-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.stage-card p { min-height: 40px; margin-bottom: 15px; color: var(--muted); font-size: 12px; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.safe-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 17px; padding: 12px 13px; border: 1px solid #e9e4d5; border-radius: 9px; background: #fbf8f0; color: #756844; font-size: 12px; }
.safe-note strong { color: #66562f; }
@media (max-width: 760px) {
  .topbar__inner, .page-shell { width: min(100% - 32px, 620px); }
  .page-shell { margin-top: 26px; }
  .workflow-guide { padding: 18px; }
  .workflow-guide__heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .workflow-steps { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
  .topbar__caption { font-size: 9px; }
  .upload-card { grid-template-columns: 1fr; gap: 20px; }
  .upload-fields { grid-template-columns: 1fr; }
  .upload-fields .button { width: 100%; }
  .stats-row { grid-template-columns: 1fr; gap: 9px; }
  .stat-card { display: flex; align-items: center; justify-content: space-between; }
  .stat-label { margin: 0; }
  .mapping-grid, .stage-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .job-list th:nth-child(3), .job-list td:nth-child(3) { display: none; }
}
