.sync-page {
  --app-accent: #54e0ba;
  --app-accent-rgb: 84, 224, 186;
  --app-accent-ink: #031914;
  --app-bg: #07120f;
  --app-sidebar: #0c1c18;
  --app-panel: #11241f;
  --app-panel-strong: #17312a;
}

.sync-map {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: radial-gradient(circle at center, rgba(var(--app-accent-rgb), 0.12), transparent 50%), var(--app-bg);
}

.sync-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sync-map line {
  stroke: rgba(var(--app-accent-rgb), 0.5);
  stroke-dasharray: 8 7;
  stroke-width: 2;
}

.sync-hub,
.sync-node {
  position: absolute;
  z-index: 2;
  width: min(25%, 165px);
  min-width: 120px;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  padding: 12px;
  background: var(--app-panel-strong);
  color: var(--app-text);
  text-align: left;
}

.sync-node { cursor: pointer; }
.sync-node[hidden] { display: none; }
.sync-node strong,
.sync-hub small { display: block; }
.sync-hub { top: 50%; left: 50%; border-color: var(--app-accent); text-align: center; transform: translate(-50%, -50%); font-weight: 850; }
.sync-hub small { color: var(--app-muted); font-size: 0.7rem; }
.node-erp { top: 7%; left: 5%; }
.node-crm { top: 5%; left: 50%; transform: translateX(-50%); }
.node-store { top: 7%; right: 5%; }
.node-api { bottom: 7%; left: 5%; }
.node-db { bottom: 5%; left: 50%; transform: translateX(-50%); }
.node-csv { right: 5%; bottom: 7%; }

.sync-detail { align-self: start; border-top: 3px solid var(--app-accent); }
.sync-run { width: 100%; margin: 22px 0 8px; }
.sync-error { margin-top: 10px; border-left: 3px solid #ff8f8f; padding: 10px 12px; background: rgba(255, 100, 100, 0.08); }
.sync-error p { margin: 5px 0 0; color: var(--app-muted); }
.sync-secondary { margin-top: 18px; }
.sync-queue { display: grid; gap: 15px; margin: 20px 0 0; padding: 0; list-style: none; }
.sync-queue li { border-top: 1px solid var(--app-border); padding-top: 13px; }
.sync-queue div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.sync-queue span { color: var(--app-muted); font-size: 0.8rem; }
.sync-queue progress { width: 100%; margin-top: 8px; accent-color: var(--app-accent); }
.sync-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

@media (max-width: 680px) {
  .sync-map { min-height: auto; display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .sync-map svg,
  .sync-hub { display: none; }
  .sync-node { position: static; width: 100%; transform: none; }
}
