:root {
  color-scheme: light;
  --bg: #f3f6f2;
  --bg-start: #edf4ef;
  --panel: #ffffff;
  --panel-2: #eef2ef;
  --panel-3: #f8faf7;
  --text: #17201b;
  --muted: #617067;
  --border: #d9e1db;
  --accent: #0f766e;
  --accent-2: #134e4a;
  --accent-soft: #dff6ef;
  --brand: #7c2d12;
  --danger: #b42318;
  --warning: #a16207;
  --success: #15803d;
  --shadow: 0 16px 40px rgba(23, 32, 27, 0.08);
  --shadow-soft: 0 8px 20px rgba(23, 32, 27, 0.06);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1412;
  --bg-start: #111c18;
  --panel: #171f1b;
  --panel-2: #202a25;
  --panel-3: #131b18;
  --text: #edf3ef;
  --muted: #9dad9f;
  --border: #2e3b34;
  --accent: #2dd4bf;
  --accent-2: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.13);
  --brand: #9a3412;
  --danger: #f97066;
  --warning: #f4bf50;
  --success: #6ee7b7;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, var(--bg-start) 0, var(--bg) 320px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  max-width: 100vw;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  max-width: 100vw;
  padding: 18px 14px;
  background: color-mix(in srgb, var(--panel) 92%, var(--bg-start));
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 30px rgba(23, 32, 27, 0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #c8912f);
  box-shadow: var(--shadow-soft);
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a,
.ghost-button,
.icon-button,
.primary-button,
.danger-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav a {
  justify-content: flex-start;
  color: var(--muted);
  border-color: transparent;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--border);
}

.sidebar-footer {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
}

.content {
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  width: 100%;
  max-width: 100vw;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.2;
}

.topbar-actions,
.toolbar,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.action-spacer {
  margin-top: 18px;
}

.main {
  width: min(1280px, 100%);
  max-width: 100vw;
  margin: 0 auto;
  padding: 26px 28px 34px;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 86%, var(--panel-2));
}

.panel-header h2,
.compact-title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.panel-body {
  padding: 18px;
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.grid > * {
  min-width: 0;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.form-grid > .span-12 {
  grid-column: 1 / -1;
}

.metric {
  position: relative;
  min-height: 108px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.metric::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.65;
}

.metric strong {
  display: block;
  margin-top: 14px;
  font-size: 32px;
  line-height: 1;
}

.muted {
  color: var(--muted);
}

.section-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.overview-copy {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.overview-copy h2 {
  max-width: 720px;
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.overview-copy p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.import-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.45fr);
  gap: 14px;
  align-items: stretch;
}

.import-hero-copy,
.import-hero-metrics,
.workflow-band {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.import-hero-copy {
  padding: 26px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 64%, transparent), transparent 56%),
    var(--panel);
}

.import-hero-copy h2 {
  max-width: 760px;
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

.import-hero-copy p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.import-hero-metrics {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.import-hero-metrics > div {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.import-hero-metrics > div:last-child {
  border-bottom: 0;
}

.import-hero-metrics strong {
  color: var(--accent-2);
  font-size: 24px;
  line-height: 1;
}

.import-hero-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.workflow {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.workflow-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.workflow-band .workflow-step {
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.workflow-band .workflow-step:last-child {
  border-right: 0;
}

.step-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent-2);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
}

.workflow-step strong {
  display: block;
  margin-bottom: 2px;
}

.import-panel .panel-body {
  gap: 14px;
}

.upload-zone {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 132px;
  padding: 20px;
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--border));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 62%),
    var(--panel-3);
}

.upload-zone.is-dragging {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.upload-zone label {
  display: block;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.upload-zone p {
  margin: 0;
  color: var(--muted);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-summary {
  display: grid;
  gap: 10px;
  min-height: 46px;
  padding: 12px;
  color: var(--muted);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.file-summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.file-summary-main strong {
  color: var(--text);
}

.file-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.file-chip-list span {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 700;
}

.import-progress {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-3);
}

.progress-head,
.progress-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-2);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.progress-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-metrics strong {
  color: var(--text);
}

.import-results {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel-3);
}

.import-result-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-3);
}

.import-result-row.success {
  border-color: color-mix(in srgb, var(--success) 28%, var(--border));
}

.import-result-row.warning {
  border-color: color-mix(in srgb, var(--warning) 32%, var(--border));
}

.import-result-row.error {
  border-color: color-mix(in srgb, var(--danger) 32%, var(--border));
}

.import-result-row strong,
.import-result-row span:not(.status) {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-result-row span:not(.status) {
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shopify-filter-grid {
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(220px, 1.3fr);
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.unit-input input,
.unit-input select {
  min-width: 0;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
}

.check-line input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.check-line:has(input:disabled) {
  color: var(--muted);
  opacity: 0.7;
}

.image-upload-results {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

#image-upload-dialog input[type="file"] {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

#image-upload-dialog input[type="file"]::file-selector-button {
  margin-right: 10px;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.upload-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.upload-result-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}

.upload-result-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.upload-result-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-result-grid strong {
  font-size: 22px;
  line-height: 1;
}

.upload-result-grid.compact strong {
  font-size: 18px;
}

.ignored-list {
  display: grid;
  gap: 8px;
}

.ignored-list h3 {
  margin: 0;
  font-size: 14px;
}

.ignored-list ul {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ignored-list li {
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ignored-list li strong,
.ignored-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ignored-list li span {
  color: var(--muted);
  font-size: 12px;
}

.primary-button {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 25%, transparent);
}

.secondary-button {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--border);
}

.ghost-button,
.icon-button {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.danger-button {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
}

.status.valid,
.status.connected {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 16%, transparent);
}

.status.invalid,
.status.error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.status.warning {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, transparent);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  table-layout: fixed;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th:nth-child(1) {
  width: 4%;
}

th:nth-child(2) {
  width: 12%;
}

th:nth-child(3) {
  width: 16%;
}

th:nth-child(4) {
  width: 17%;
}

th:nth-child(5) {
  width: 8%;
}

th:nth-child(6) {
  width: 15%;
}

th:nth-child(7) {
  width: 8%;
}

th:nth-child(8) {
  width: 11%;
}

th:nth-child(9) {
  width: 9%;
}

.table-wrap .secondary-button,
.table-wrap .danger-button,
.table-wrap .primary-button,
.table-wrap .ghost-button {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  white-space: normal;
}

.table-wrap td:last-child .secondary-button {
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background-color 0.16s ease;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

.sku {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.product-title {
  max-width: 280px;
  font-weight: 750;
}

.cell-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 700;
}

.mini-pill.warning {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, transparent);
}

.mini-pill.success {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.error-summary {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.row-check {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.stack {
  display: grid;
  gap: 14px;
}

.notice {
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.notice.show {
  display: block;
}

.notice.error {
  border-color: color-mix(in srgb, var(--danger) 44%, var(--border));
  color: var(--danger);
}

.notice.success {
  border-color: color-mix(in srgb, var(--success) 44%, var(--border));
  color: var(--success);
}

.modal {
  width: min(880px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.48);
}

.modal-card {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 88%, var(--panel-2));
}

.modal-header h2,
.modal-header p {
  margin: 0;
}

.modal-header h2 {
  font-size: 19px;
  line-height: 1.15;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.modal-body {
  overflow: auto;
  padding: 16px;
}

.modal-body.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.modal-body .field-wide {
  grid-column: span 2;
}

.modal-body .field-full {
  grid-column: 1 / -1;
}

.modal-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
}

.legal-page {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 32px 20px;
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow-x: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-footer {
    position: static;
    margin-top: 12px;
  }

  .nav {
    display: flex;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .main {
    padding: 16px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar,
  .topbar-actions,
  .button-row {
    width: 100%;
  }

  .toolbar > *,
  .topbar-actions > *,
  .button-row > * {
    flex: 1 1 auto;
  }

  .overview-card {
    grid-template-columns: 1fr;
  }

  .import-hero,
  .workflow-band {
    grid-template-columns: 1fr;
  }

  .workflow-band .workflow-step {
    border-width: 0 0 1px 0;
  }

  .workflow-band .workflow-step:last-child {
    border-bottom: 0;
  }

  .upload-zone {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .upload-zone .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .upload-icon {
    width: 44px;
    height: 44px;
  }

  .overview-copy h2 {
    font-size: 24px;
  }

  .span-3,
  .span-4,
  .span-6,
  .span-8,
  .span-12 {
    grid-column: span 12;
  }

  .shopify-filter-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-body.form-grid {
    grid-template-columns: 1fr;
  }

  .modal-body .field-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px;
  }

  .sidebar {
    padding: 14px;
  }

  .brand {
    padding-bottom: 12px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar-actions,
  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-actions > *,
  .toolbar > * {
    width: 100%;
    white-space: normal;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .nav a {
    justify-content: center;
    min-width: 0;
  }

  .metric {
    min-height: 94px;
  }

  .metric strong {
    font-size: 28px;
  }

  .panel-body,
  .modal-body {
    padding: 14px;
  }

  .modal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .modal-footer {
    padding: 14px;
  }
}
