:root {
  --porcelain: #eef2f6;
  --sheet: #ffffff;
  --sheet-2: #f6f8fb;
  --ink: #17203a;
  --ink-2: #48526e;
  --ink-3: #636c88;
  --line: #d8dee8;
  --line-strong: #b7c0cf;
  --cobalt: #1e3f99;
  --cobalt-deep: #142c6e;
  --cobalt-soft: #e3e9f7;
  --turq: #0f7c75;
  --turq-soft: #dcf0ee;
  --saffron: #d58a1e;
  --saffron-ink: #8a4f06;
  --saffron-soft: #f8ecd9;
  --ok: #237a4b;
  --ok-soft: #dff1e6;
  --alert: #b42318;
  --alert-soft: #fbe4e1;
  --font: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
  --wide: 118%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

button {
  cursor: pointer;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.86em;
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
}

.skip:focus {
  top: 12px;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.icon {
  display: inline-flex;
  flex: none;
  width: 18px;
  height: 18px;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tone-cobalt { --tone: var(--cobalt); --tone-soft: var(--cobalt-soft); --tone-ink: var(--cobalt); }
.tone-ok { --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-ink: var(--ok); }
.tone-alert { --tone: var(--alert); --tone-soft: var(--alert-soft); --tone-ink: var(--alert); }
.tone-saffron { --tone: var(--saffron); --tone-soft: var(--saffron-soft); --tone-ink: var(--saffron-ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--cobalt);
  color: #fff;
}

.btn-primary:hover {
  background: var(--cobalt-deep);
}

.btn-quiet,
.btn-small {
  border-color: var(--line-strong);
  background: var(--sheet);
}

.btn-quiet:hover,
.btn-small:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.btn-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13.5px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--cobalt);
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.icon-btn {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
}

.icon-btn:hover {
  background: var(--sheet-2);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - 1240px) / 2));
  background: var(--cobalt-deep);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 16px;
  font-stretch: var(--wide);
  font-weight: 700;
  line-height: 1.2;
}

.brand span {
  display: block;
  color: #c3cdec;
  font-size: 13px;
}

.topbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-left: auto;
  color: #dbe2f5;
  font-size: 13.5px;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.conn-time {
  color: #a9b6de;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.dot.ok {
  background: #45c27f;
  box-shadow: 0 0 0 3px rgba(69, 194, 127, 0.22);
}

.topbar-sync {
  background: #fff;
  color: var(--cobalt-deep);
}

.topbar-sync:hover {
  background: var(--cobalt-soft);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 0 max(16px, calc((100vw - 1240px) / 2 - 8px));
  border-bottom: 1px solid var(--line);
  background: var(--sheet);
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 12px 14px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--cobalt);
}

.tab.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--cobalt);
  content: '';
}

.tab-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 10px;
  background: var(--cobalt);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.tab-count.warn {
  background: var(--saffron);
  color: #241400;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  outline: none;
}

.hero {
  display: grid;
  gap: 28px;
}

.hero-text h1,
.page-head h1 {
  font-stretch: var(--wide);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.hero-text h1 {
  max-width: 20ch;
  font-size: clamp(32px, 4.2vw, 52px);
}

.hero-text p {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 16.5px;
}

.lanes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) minmax(0, 1.08fr) minmax(120px, 170px) minmax(0, 1fr);
  align-items: center;
}

.node {
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--node, var(--cobalt));
  border-radius: 12px;
  background: var(--sheet);
}

.node-shopify {
  --node: var(--turq);
}

.node-etsy {
  --node: var(--saffron);
}

.node header {
  display: grid;
}

.node-name {
  font-size: 18px;
  font-stretch: var(--wide);
  font-weight: 700;
}

.node-store {
  color: var(--ink-3);
  font-size: 13px;
}

.node-big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 10px;
  font-size: 46px;
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.node-big span {
  color: var(--ink-2);
  font-size: 14px;
  font-stretch: 100%;
  font-weight: 500;
}

.node dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.node dt {
  color: var(--ink-2);
}

.node dd {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.node-netsis {
  border: 0;
  border-top: 4px solid #6f8be0;
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 18px 40px -22px rgba(20, 44, 110, 0.7);
}

.node-netsis .node-store,
.node-netsis .node-big span,
.node-netsis dt {
  color: #c9d3f1;
}

.node-netsis dl div {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.pipe {
  display: grid;
  gap: 22px;
  padding: 0 10px;
}

.wire-row {
  display: grid;
  gap: 6px;
}

.wire {
  --c: var(--cobalt);
  position: relative;
  display: block;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--c) 0 7px, transparent 7px 12px);
}

.pipe-shopify .wire-row:first-child .wire {
  --c: var(--turq);
}

.pipe-etsy .wire-row:first-child .wire {
  --c: var(--saffron);
}

.wire.is-warn {
  --c: var(--saffron);
}

.wire::after {
  position: absolute;
  top: -5px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  content: '';
}

.wire.to-right::after {
  right: -2px;
  border-left: 9px solid var(--c);
}

.wire.to-left::after {
  left: -2px;
  border-right: 9px solid var(--c);
}

.is-intro .wire.to-right {
  animation: flow-right 1.1s linear 3;
}

.is-intro .wire.to-left {
  animation: flow-left 1.1s linear 3;
}

@keyframes flow-right {
  from { background-position: -24px 0; }
  to { background-position: 0 0; }
}

@keyframes flow-left {
  from { background-position: 24px 0; }
  to { background-position: 0 0; }
}

.wire-label {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}

.wire-label.warn {
  color: var(--saffron-ink);
  font-weight: 650;
}

.block {
  margin-top: 40px;
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.block-head h2 {
  font-size: 22px;
  font-stretch: var(--wide);
  font-weight: 700;
}

.block-note {
  color: var(--ink-3);
  font-size: 14px;
}

.issues {
  display: grid;
  gap: 10px;
}

.issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--tone);
  border-radius: 10px;
  background: var(--sheet);
}

.issue-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--tone-soft);
  color: var(--tone-ink);
}

.issue strong {
  display: block;
  font-weight: 650;
}

.issue p {
  color: var(--ink-2);
  font-size: 14px;
}

.empty {
  padding: 28px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--sheet);
  color: var(--ink-2);
  text-align: center;
}

.sheet .empty {
  border: 0;
}

.sheet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
}

.grid-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--sheet-2);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.grid-table th.num {
  text-align: right;
}

.grid-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.grid-table th:first-child,
.grid-table td:first-child {
  padding-left: 22px;
}

.grid-table th:last-child,
.grid-table td:last-child {
  padding-right: 22px;
}

.grid-table tbody tr:last-child td {
  border-bottom: 0;
}

.grid-table tbody tr {
  cursor: pointer;
  transition: background-color 0.12s;
}

.grid-table tbody tr:hover {
  background: #f4f7fb;
}

.grid-table tbody tr:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: -2px;
}

.o-ref,
.o-name,
.o-amount,
.p-name {
  display: block;
  font-weight: 600;
}

.o-ref {
  font-variant-numeric: tabular-nums;
}

.o-sub {
  display: block;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 400;
}

.p-code {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}

.ch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 8px;
  border-radius: 999px;
  background: var(--ch-soft);
  color: var(--ch-ink);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}

.ch::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ch);
  content: '';
}

.ch-shopify { --ch: var(--turq); --ch-soft: var(--turq-soft); --ch-ink: #0b5b56; }
.ch-etsy { --ch: var(--saffron); --ch-soft: var(--saffron-soft); --ch-ink: var(--saffron-ink); }
.ch-netsis { --ch: var(--cobalt); --ch-soft: var(--cobalt-soft); --ch-ink: var(--cobalt); }

.prog {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.prog-dots {
  display: inline-flex;
  gap: 3px;
}

.prog-dots i {
  width: 14px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

.prog-dots i.on {
  background: var(--tone);
}

.prog-dots i.stop {
  background: var(--alert);
}

.prog-label {
  color: var(--tone-ink);
  font-size: 13.5px;
  font-weight: 650;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(32px, 3.6vw, 44px);
}

.page-head p {
  max-width: 64ch;
  margin-top: 8px;
  color: var(--ink-2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 14px;
  font-weight: 600;
}

.chip b {
  color: var(--ink-3);
  font-size: 12.5px;
}

.chip.is-on {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

.chip.is-on b {
  color: #c9d3f1;
}

.select select,
.search input,
.field input,
.field select {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--sheet);
  font-size: 14.5px;
}

.select select {
  padding: 0 32px 0 12px;
}

.search {
  position: relative;
  margin-left: auto;
}

.search .icon {
  position: absolute;
  top: 11px;
  left: 11px;
  color: var(--ink-3);
  pointer-events: none;
}

.search input {
  width: 280px;
  padding: 0 12px 0 38px;
}

.select select:focus,
.search input:focus,
.field input:focus,
.field select:focus {
  border-color: var(--cobalt);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 63, 153, 0.16);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 14px;
}

.legend-warn {
  color: var(--alert);
  font-weight: 650;
}

.qty {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.st {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.st-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.st-diff {
  background: var(--saffron-soft);
  color: var(--saffron-ink);
}

.st-alert {
  margin-left: 0;
  background: var(--alert-soft);
  color: var(--alert);
}

td .st-alert {
  margin-left: 8px;
}

.rules {
  display: grid;
  gap: 16px;
}

.rule-block {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
}

.rule-block h2 {
  margin-bottom: 14px;
  font-size: 18px;
  font-stretch: var(--wide);
  font-weight: 700;
}

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

.switch + .rule-grid {
  margin-top: 16px;
}

.field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.field-label code {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  padding: 0 12px;
}

.field input[readonly] {
  background: var(--sheet-2);
  color: var(--ink-2);
}

.field small {
  color: var(--ink-3);
  font-size: 13px;
}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.switch strong,
.radio strong {
  display: block;
  font-weight: 650;
}

.switch small,
.radio small {
  display: block;
  color: var(--ink-2);
  font-size: 13.5px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch i {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--line-strong);
  transition: background-color 0.15s;
}

.switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
  content: '';
}

.switch input:checked + i {
  background: var(--cobalt);
}

.switch input:checked + i::after {
  transform: translateX(18px);
}

.switch input:focus-visible + i {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

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

.radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.radio:has(input:checked) {
  border-color: var(--cobalt);
  background: var(--cobalt-soft);
}

.radio input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--cobalt);
}

.log li {
  display: grid;
  grid-template-columns: 84px auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}

.log li:last-child {
  border-bottom: 0;
}

.log time {
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.log-error {
  border-left-color: var(--alert) !important;
  background: #fff8f7;
}

.log-text {
  font-size: 14.5px;
}

.conn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.conn-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--node, var(--cobalt));
  border-radius: 12px;
  background: var(--sheet);
}

.conn-shopify {
  --node: var(--turq);
}

.conn-etsy {
  --node: var(--saffron);
}

.conn-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conn-card h2 {
  font-size: 20px;
  font-stretch: var(--wide);
  font-weight: 700;
}

.conn-ok {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 650;
}

.facts {
  display: grid;
  margin: 12px 0 16px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.facts dt {
  color: var(--ink-2);
}

.facts dd {
  font-weight: 600;
  text-align: right;
}

.scopes {
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 14px;
}

.scopes strong {
  display: block;
  color: var(--ink);
}

.conn-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 48, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.scrim.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  background: var(--sheet);
  box-shadow: -24px 0 48px -24px rgba(15, 23, 48, 0.4);
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.28s;
}

.drawer.open {
  visibility: visible;
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-kicker {
  color: var(--ink-3);
  font-size: 13.5px;
}

.drawer-head h2 {
  font-size: 28px;
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 30px;
}

.drawer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 26px;
  border-top: 1px solid var(--line);
}

.foot-note {
  margin-right: auto;
  color: var(--ink-2);
  font-size: 14px;
}

.d-summary {
  display: grid;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.d-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
}

.d-product {
  font-size: 19px;
  font-weight: 650;
}

.d-total {
  display: grid;
  font-size: 40px;
  font-stretch: var(--wide);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.05;
}

.d-total span {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 14px;
  font-stretch: 100%;
  font-weight: 500;
}

.d-block {
  padding-top: 22px;
}

.d-block h3 {
  margin-bottom: 12px;
  font-size: 16.5px;
  font-weight: 650;
}

.d-meta {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.path {
  display: grid;
}

.path li {
  position: relative;
  display: grid;
  padding: 0 0 14px 26px;
}

.path li::before {
  position: absolute;
  top: 5px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--sheet);
  content: '';
}

.path li::after {
  position: absolute;
  top: 19px;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: var(--line);
  content: '';
}

.path li:last-child::after {
  display: none;
}

.path li span {
  color: var(--ink-2);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.path .path-done::before {
  border-color: var(--cobalt);
  background: var(--cobalt);
}

.path .path-done::after {
  background: var(--cobalt);
}

.path .path-stop::before {
  border-color: var(--alert);
  background: var(--alert);
}

.path .path-stop span {
  color: var(--alert);
}

.path .path-todo strong {
  color: var(--ink-3);
}

.items {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.items th {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.items th.num {
  text-align: right;
}

.items td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.items td.num {
  padding-left: 12px;
}

.l-name {
  display: block;
  font-weight: 550;
}

.l-code {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}

.l-missing {
  display: block;
  color: var(--alert);
  font-size: 13px;
  font-weight: 600;
}

.is-unmapped td {
  background: #fff8f7;
}

.map-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.map-row select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--sheet);
  font-family: var(--mono);
  font-size: 12.5px;
}

.map-table {
  width: 100%;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 14px;
}

.map-caption {
  margin: 0 0 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.map-table th,
.map-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.map-table tr:last-child th,
.map-table tr:last-child td {
  border-bottom: 0;
}

.map-table tbody th {
  width: 38%;
  background: var(--sheet-2);
  font-weight: 500;
}

.map-table thead th {
  background: var(--sheet-2);
  font-weight: 500;
}

.map-table th code {
  color: var(--cobalt);
  font-size: 12px;
}

.map-table td small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
}

.map-table .num {
  text-align: right;
}

.map-lines {
  display: block;
  overflow-x: auto;
}

.map-lines td.mono {
  white-space: nowrap;
}

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

.toasts {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 16px 36px -16px rgba(15, 23, 48, 0.6);
  animation: toast-in 0.22s ease-out;
}

.toast .icon {
  margin-top: 2px;
  color: #7fe0a9;
}

.toast-info .icon {
  color: #a9bcf2;
}

.toast-warn .icon {
  color: #f6c271;
}

.toast strong {
  display: block;
  font-size: 14.5px;
}

.toast span {
  color: #d3d9ea;
  font-size: 13.5px;
}

.toast.leaving {
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .lanes {
    grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1.08fr) 110px minmax(0, 1fr);
  }

  .node {
    padding: 16px;
  }

  .node-big {
    font-size: 38px;
  }

  .conn-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .orders-table th:nth-child(5),
  .orders-table td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 12px 16px;
  }

  .topbar-status {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .topbar-sync {
    margin-left: auto;
  }

  .tabs {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    justify-content: space-around;
    gap: 0;
    padding: 0 4px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 0 -8px 24px -18px rgba(15, 23, 48, 0.5);
  }

  .tab {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 9px 2px 8px;
    font-size: 11px;
  }

  .tab span:not(.icon) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tab.active::after {
    top: -1px;
    bottom: auto;
    border-radius: 0 0 3px 3px;
  }

  .tab-count {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .page {
    padding: 24px 16px calc(96px + env(safe-area-inset-bottom));
  }

  .lanes {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }

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

  .wire-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 10px;
  }

  .wire {
    width: 2px;
    height: 36px;
    margin-left: 22px;
    background: repeating-linear-gradient(180deg, var(--c) 0 7px, transparent 7px 12px);
  }

  .wire::after {
    top: auto;
    left: -5px;
    border: 6px solid transparent;
  }

  .wire.to-right::after {
    right: auto;
    bottom: -4px;
    border-top: 9px solid var(--c);
    border-bottom: 0;
    border-left: 6px solid transparent;
  }

  .wire.to-left::after {
    top: -4px;
    left: -5px;
    border-right: 6px solid transparent;
    border-bottom: 9px solid var(--c);
    border-top: 0;
  }

  .wire-label {
    text-align: left;
  }

  @keyframes flow-right {
    from { background-position: 0 -24px; }
    to { background-position: 0 0; }
  }

  @keyframes flow-left {
    from { background-position: 0 24px; }
    to { background-position: 0 0; }
  }

  .toasts {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .brand span,
  .conn-time {
    display: none;
  }

  .topbar-sync {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13.5px;
  }

  .issue {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px;
  }

  .issue .btn {
    grid-column: 2;
    justify-self: start;
  }

  .search {
    width: 100%;
    margin-left: 0;
  }

  .search input {
    width: 100%;
  }

  .page-head .btn {
    width: 100%;
  }

  .grid-table thead {
    display: none;
  }

  .grid-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  .grid-table tbody tr:last-child {
    border-bottom: 0;
  }

  .grid-table td,
  .grid-table td:first-child,
  .grid-table td:last-child {
    padding: 0;
    border: 0;
  }

  .orders-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .orders-table td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .orders-table td:nth-child(2) .o-ref,
  .orders-table td:nth-child(2) .o-sub {
    display: inline;
    margin-left: 8px;
  }

  .orders-table td:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .orders-table td:nth-child(3) .o-name,
  .orders-table td:nth-child(3) .o-sub {
    display: inline;
  }

  .orders-table td:nth-child(3) .o-sub {
    margin-left: 6px;
  }

  .orders-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .orders-table td:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 2px;
  }

  .products-table td:nth-child(1) {
    grid-column: 1 / -1;
  }

  .products-table td:nth-child(n + 2) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    grid-column: 1 / -1;
    text-align: left;
  }

  .products-table td:nth-child(n + 2)::before {
    margin-right: auto;
    color: var(--ink-3);
    font-size: 13px;
    content: attr(data-label);
  }

  .products-table td:nth-child(5) {
    flex-wrap: wrap;
  }

  .products-table td:nth-child(5) .o-sub {
    display: inline;
  }

  .rule-block {
    padding: 18px 16px;
  }

  .rule-grid,
  .radio-group,
  .ship-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .log li {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 10px;
    padding: 12px 16px;
  }

  .log .log-text {
    grid-column: 1 / -1;
  }

  .drawer-head,
  .drawer-body,
  .drawer-foot {
    padding-right: 18px;
    padding-left: 18px;
  }

  .drawer-foot .btn {
    flex: 1;
  }

  .d-total {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.conn-auto {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
}

.conn-auto.is-full {
  border-color: #45c27f;
  background: rgba(69, 194, 127, 0.18);
}

.conn-auto:hover {
  background: rgba(255, 255, 255, 0.12);
}

.auto-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 28px;
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
}

.auto-strip.is-full {
  border-color: #b9dcc7;
  background: var(--ok-soft);
}

.auto-strip-text h2 {
  font-size: 19px;
  font-stretch: var(--wide);
  font-weight: 700;
}

.auto-strip-text p {
  max-width: 70ch;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.auto-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  grid-row: 2;
}

.auto-pills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sheet-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.auto-pills li i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.auto-pills li span {
  color: var(--ink-3);
  font-weight: 500;
}

.auto-pills li.on {
  border-color: #b9dcc7;
  background: var(--sheet);
  color: var(--ink);
}

.auto-pills li.on i {
  background: var(--ok);
}

.auto-pills li.on span {
  color: var(--ok);
}

.auto-strip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 18px;
  grid-column: 2;
  grid-row: 1;
}

.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #b9dcc7;
  border-radius: 8px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 14px;
  font-weight: 650;
}

.auto-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(35, 122, 75, 0.18);
}

.auto-block {
  margin-bottom: 16px;
}

.auto-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 6px;
}

.auto-head h2 {
  margin-bottom: 4px;
}

.auto-head p {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 14px;
}

.auto-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.auto-count {
  color: var(--ink-2);
  font-size: 14px;
}

.auto-count strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.auto-list {
  border-top: 1px solid var(--line);
}

.auto-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 8px 24px;
  border-bottom: 1px solid var(--line);
}

.auto-row .switch {
  grid-column: 1 / -1;
  padding: 14px 0;
  border-bottom: 0;
}

.auto-row:has(.auto-interval) .switch {
  grid-column: 1;
}

.auto-row .switch small {
  max-width: 64ch;
}

.auto-interval {
  display: grid;
  gap: 4px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.auto-interval select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 14px;
}

.auto-interval select:disabled {
  color: var(--ink-3);
  opacity: 0.6;
}

.auto-row.is-on strong::after {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 650;
  vertical-align: 1px;
  content: 'Otomatik';
}

.auto-block .d-meta {
  margin-top: 12px;
}

.rule-grid + .radio-group {
  margin-top: 16px;
}

.rules-foot {
  display: flex;
  justify-content: flex-end;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--cobalt-deep);
  color: #fff;
  animation: intro-failsafe 0.01s linear 6s forwards;
}

.intro-inner {
  width: min(640px, 100%);
}

.intro-brand {
  display: grid;
  animation: intro-fade 0.4s ease-out both;
}

.intro-brand strong {
  font-size: clamp(26px, 5vw, 38px);
  font-stretch: var(--wide);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.intro-brand span {
  margin-top: 4px;
  color: #a9b6de;
  font-size: 15px;
}

.intro-map {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
  align-items: center;
  margin: 46px 0 30px;
}

.i-node {
  padding: 10px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-stretch: var(--wide);
  font-weight: 700;
  opacity: 0;
  animation: intro-node 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}

.i-shopify {
  border-top: 4px solid var(--turq);
  animation-delay: 0.2s;
}

.i-etsy {
  border-top: 4px solid var(--saffron);
  animation-delay: 0.32s;
}

.i-netsis {
  animation: intro-node 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.1s forwards, intro-netsis 0.35s ease-out 1.25s forwards;
}

.i-line {
  position: relative;
  height: 2px;
  margin: 0 10px;
  background: rgba(255, 255, 255, 0.14);
}

.i-line::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--c) 0 7px, transparent 7px 12px);
  transform: scaleX(0);
  content: '';
  animation: intro-line 0.7s cubic-bezier(0.6, 0, 0.3, 1) 0.55s forwards;
}

.i-left {
  --c: var(--turq);
}

.i-left::after {
  transform-origin: left center;
}

.i-right {
  --c: var(--saffron);
}

.i-right::after {
  transform-origin: right center;
}

.intro-status {
  color: #c3cdec;
  font-size: 14.5px;
  animation: intro-fade 0.4s ease-out 0.2s both;
}

.intro-status::after {
  display: inline-block;
  width: 1.2em;
  text-align: left;
  content: '';
  animation: intro-dots 1.2s steps(4, end) infinite;
}

body.is-loading .topbar,
body.is-loading .tabs,
body.is-loading .page {
  opacity: 0;
  animation: intro-failsafe-app 0.01s linear 6s forwards;
}

body.is-ready .intro {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}

body.is-ready .intro-inner {
  transform: scale(0.97);
  transition: transform 0.5s ease;
}

body.is-ready .topbar,
body.is-ready .tabs,
body.is-ready .page {
  animation: app-in 0.5s ease-out 0.15s both;
}

@keyframes intro-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes intro-node {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-netsis {
  to {
    border-color: #fff;
    background: #fff;
    color: var(--cobalt-deep);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.14);
  }
}

@keyframes intro-line {
  to {
    transform: scaleX(1);
  }
}

@keyframes intro-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

@keyframes intro-failsafe {
  to {
    visibility: hidden;
    opacity: 0;
  }
}

@keyframes intro-failsafe-app {
  to {
    opacity: 1;
  }
}

@keyframes app-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .auto-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .auto-strip-actions {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .conn-auto {
    margin-left: auto;
  }

  .auto-strip {
    padding: 16px;
  }

  .auto-row,
  .auto-row:has(.auto-interval) .switch {
    grid-template-columns: minmax(0, 1fr);
    grid-column: 1;
  }

  .auto-interval {
    padding-bottom: 14px;
  }

  .auto-mode,
  .auto-mode .btn {
    width: 100%;
  }

  .rules-foot .btn {
    width: 100%;
  }

  .i-node {
    padding: 8px 10px;
    font-size: 13px;
  }

  .i-line {
    margin: 0 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro {
    display: none;
  }

  body.is-loading .topbar,
  body.is-loading .tabs,
  body.is-loading .page {
    opacity: 1;
  }
}

.demo-credit {
  margin-top: 32px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.demo-credit a {
  color: inherit;
  font-weight: 650;
}

.noscript {
  max-width: 640px;
  margin: 48px auto;
  padding: 0 16px;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}
