:root {
  --bg: #F5F5F5;
  --bg-top: #f7f4ef;
  --bg-elevated: #ebe6e0;

  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --panel-soft: #f6f2ed;
  --panel-glass: rgba(255, 255, 255, 0.62);

  --text: #2a2321;
  --text-soft: #5a4e49;
  --text-muted: #84766f;
  --text-faint: #a2938b;
  --text-on-dark: #f8f5f1;
  --text-on-dark-soft: rgba(248, 245, 241, 0.78);

  --primary-900: #6e2c31;
  --primary-800: #7b3338;
  --primary-700: #88373c;
  --primary-600: #984247;
  --primary-500: #a6464a;
  --primary-400: #bb6a67;

  --neutral-1: #f7f4ef;
  --neutral-2: #f4f1ec;
  --neutral-3: #ebe6e0;
  --neutral-4: #d8d0c8;
  --neutral-5: #b8ada5;

  --ok: #5f7d63;
  --ok-soft: rgba(95, 125, 99, 0.12);
  --warn: #a37a42;
  --warn-soft: rgba(163, 122, 66, 0.12);
  --err: #9e4348;
  --err-soft: rgba(158, 67, 72, 0.12);

  --border: rgba(97, 80, 73, 0.14);
  --border-strong: rgba(97, 80, 73, 0.24);
  --line: rgba(97, 80, 73, 0.1);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-none: none;
  --shadow-soft: 0 12px 30px rgba(93, 68, 60, 0.08);
  --shadow-card: 0 18px 45px rgba(93, 68, 60, 0.1);
  --ring: 0 0 0 3px rgba(136, 55, 60, 0.14);

  --accent: var(--primary-700);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-header {
  padding: 0rem 1.25rem 0rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--primary-700);
  color: var(--text-on-dark);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.page-header::before,
.page-header::after {
  display: none;
}

.header-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-header-wrap {
  gap: 0.9rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}

.brand-wordmark {
  margin: 0;
  font-family: "Avenir Next", "Avenir", "Segoe UI", sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.floating-info-overlay-btn {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px 0 0 0;
  background: rgba(136, 55, 60, 0.92);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 60;
}

.floating-info-overlay-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.floating-info-overlay-btn:hover {
  background: rgba(136, 55, 60, 1);
  transform: translateY(-1px);
}

.page-header h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.page-header p {
  margin: 0;
  color: var(--text-on-dark-soft);
}

.top-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.15rem;
  padding: 1.1rem;
  max-width: 1700px;
  margin: 0 auto;
}

.config-shell {
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.group-head h2,
.group-head h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.group-head p {
  margin: 0.35rem 0 1rem;
  color: var(--text-muted);
}

.panel-grid {
  display: grid;
  gap: 1rem;
}

.panel {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;

  position: relative;
}

.panel::before {
  display: none;
}

.connectors-panel {
  margin-bottom: 1.25rem;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

h3,
h4 {
  margin: 0 0 0.7rem;
}

h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4 {
  margin-top: 1rem;
  font-size: 0.93rem;
  color: var(--primary-700);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tab-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  backdrop-filter: blur(6px);
}

.tab-wrap.active {
  background: var(--primary-700);
  border-color: transparent;
}

.tab-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  border-radius: 999px;
}

.tab-btn.active {
  background: var(--primary-700);
  color: #fff;
  border-color: transparent;
}

.tab-wrap .tab-btn {
  border: none;
  background: transparent;
}

.tab-wrap.active .tab-btn {
  color: #fff;
}

.tab-delete {
  border: none;
  background: transparent;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.tab-wrap.active .tab-delete {
  color: #fff;
}

.grid {
  display: grid;
  gap: 0.85rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.full {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
}

.checkbox {
  flex-direction: row;
  align-items: center;
  margin-top: 1.7rem;
  gap: 0.55rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  font: inherit;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease,
    color 0.16s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(136, 55, 60, 0.24);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-700);
  box-shadow: var(--ring);
  background: #fff;
}

label.required-missing {
  color: var(--err);
}

input.required-missing,
select.required-missing,
textarea.required-missing {
  border-color: rgba(158, 67, 72, 0.34);
  background: #fff8f8;
}

input[readonly] {
  background: #efeee9;
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 82px;
  line-height: 1.45;
}

button {
  cursor: pointer;
  font-weight: 200;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button.primary {
  background: var(--primary-700);
  color: #fff;
  border-color: transparent;
}

button.primary:hover {
  background: var(--primary-600);
}

button.secondary {
  background: #ffffff;
  color: var(--primary-700);
  border-color: var(--border);
}

button.secondary:hover {
  background: #f8f4f1;
}

button.collapse-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border);
}

button.collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.94);
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #5d4c47;
  border-bottom: 2px solid #5d4c47;
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.2s ease;
}

.collapse-toggle.collapsed .chevron {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.file-import {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.76);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--primary-700);
  font-weight: 200;
}

.file-import:hover {
  background: rgba(255, 255, 255, 0.95);
}

.file-import-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(136, 55, 60, 0.08);
}

.file-import input {
  display: none;
}

.actions {
  margin: 0.6rem 0 0.95rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.status {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 600;
}

.status.ok {
  border-color: rgba(95, 125, 99, 0.2);
  background: var(--ok-soft);
  color: var(--ok);
}

.status.warn {
  border-color: rgba(163, 122, 66, 0.2);
  background: var(--warn-soft);
  color: var(--warn);
}

.status.err {
  border-color: rgba(158, 67, 72, 0.2);
  background: var(--err-soft);
  color: var(--err);
}

.terminal {
  margin: 0;
  min-height: 180px;
  max-height: 460px;
  overflow: auto;
  padding: 0.9rem;
  border-radius: 14px;
  background: #f7f4ef;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #413632;
}

.panel-body.collapsed {
  display: none;
}

.hint {
  margin: 1 0 0.8rem;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--primary-700);
  background: rgba(136, 55, 60, 0.06);
  color: var(--text-soft);
  border-radius: 10px;
}

.hint.subtle {
  background: rgba(107, 92, 85, 0.05);
  border-left-color: rgba(136, 55, 60, 0.28);
}

.hidden {
  display: none !important;
}

.job-shell {
  margin: 0 1rem 1rem;
  max-width: 1700px;
}

.loading {
  margin: 0 0 0.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(136, 55, 60, 0.14);
  border-radius: 12px;
  background: rgba(136, 55, 60, 0.05);
  color: var(--primary-700);
  font-size: 0.85rem;
  font-weight: 600;
}

.loading-bar {
  margin-top: 0.45rem;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(107, 92, 85, 0.1);
  overflow: hidden;
}

.loading-bar span {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary-700);
  animation: loading-slide 1.2s ease-in-out infinite;
}

@keyframes loading-slide {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(320%);
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.checkbox-dropdown {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.42rem 0.6rem;
  background: rgba(255, 255, 255, 0.88);
}

.checkbox-dropdown summary {
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 600;
}

.checkbox-list {
  display: grid;
  gap: 0.35rem;
  max-height: 180px;
  overflow: auto;
  padding-top: 0.55rem;
}

.checkbox-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-weight: 500;
}

#root {
  height: calc(100vh - 78px);
}

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr 380px;
  height: 100%;
  min-height: 0;
  gap: 0;
}

.left-panel,
.right-panel {
  border: none;
  border-radius: 24px;
  margin: 1rem;
  padding: 1rem;
  overflow: auto;
  min-height: 0;
  position: relative;
}

.left-panel {
  background: var(--neutral-4);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  margin: 1rem;
  margin-right: 0;
  padding: 1rem;
  overflow: auto;
  min-height: 0;
  position: relative;
  box-shadow: var(--shadow-card);
}

.left-panel::before {
  display: none;
}

.right-panel {
  background: #f6f2ed;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 24px;
  margin: 1rem;
  margin-left: 0;
  padding: 1rem;
  overflow: auto;
  min-height: 0;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.right-panel::before {
  display: none;
}

.left-panel h2,
.left-panel h3,
.right-panel h2,
.right-panel h3 {
  letter-spacing: -0.01em;
}

.left-panel h2,
.left-panel h3,
.right-panel h2,
.right-panel h3 {
  color: var(--text);
}

.left-panel label,
.right-panel label {
  color: var(--text-soft);
}

.left-panel input,
.left-panel select,
.left-panel textarea {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(97, 80, 73, 0.12);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.left-panel input::placeholder,
.left-panel textarea::placeholder {
  color: rgba(85, 75, 71, 0.48);
}

.left-panel input:focus,
.left-panel select:focus,
.left-panel textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(187, 79, 79, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.left-panel button {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(97, 80, 73, 0.12);
  color: var(--text);
}

.left-panel button:hover {
  background: rgba(255, 255, 255, 0.94);
}

.left-panel pre {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(97, 80, 73, 0.1);
  color: var(--text);
}

.right-panel input,
.right-panel select,
.right-panel textarea {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(97, 80, 73, 0.12);
  color: var(--text);
}

.right-panel input::placeholder,
.right-panel textarea::placeholder {
  color: var(--text-faint);
}

.right-panel input:focus,
.right-panel select:focus,
.right-panel textarea:focus {
  border-color: var(--primary-700);
  box-shadow: var(--ring);
  background: #fff;
}

.right-panel button {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(97, 80, 73, 0.12);
  color: var(--text);
}

.right-panel button:hover {
  background: #fff;
}

.right-panel pre {
  background: #f7f4ef;
  border-color: rgba(97, 80, 73, 0.1);
  color: #413632;
}

.right-panel .result-actions {
  border-top: 1px solid rgba(97, 80, 73, 0.12);
}

.job-toolbar {
  border: 1px solid rgba(97, 80, 73, 0.12);
  border-radius: 16px;
  padding: 0.6rem;
  margin-bottom: 0.85rem;
  backdrop-filter: blur(10px);
}

.job-toolbar.header {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.job-toolbar.header #projectSelect,
.job-toolbar.header #jobSelect {
  min-width: 200px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border-color: rgba(97, 80, 73, 0.12);
}

.job-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  min-width: 420px;
}

.job-btn,
.job-actions button,
.job-actions .file-import {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.job-actions .file-import {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border-color: rgba(97, 80, 73, 0.12);
}

.canvas-controls {
  position: sticky;
  top: 0.75rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.75rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(97, 80, 73, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.canvas-controls button {
  width: 34px;
  height: 30px;
  padding: 0;
}

.canvas-controls .zoom-reset {
  width: 56px;
  font-size: 0.78rem;
}

.zoom-value {
  font-size: 0.78rem;
  color: var(--text-soft);
  min-width: 44px;
  text-align: right;
  font-weight: 650;
}

.preview-toggle-btn {
  width: auto;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid var(--border);
}

.preview-toggle-btn.is-active {
  background: var(--primary-700);
  color: var(--text-on-dark);
  border-color: rgba(255, 255, 255, 0.95);
}

.result-actions {
  margin: 0 0 0.95rem;
  padding: 0.8rem;
  border: 1px solid rgba(136, 55, 60, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);

}

.result-actions h3 {
  margin: 0 0 0.3rem;
}

.result-actions p {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.canvas-wrap {
  position: relative;
  margin: 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: auto;
  background: var(--bg);
  box-shadow: var(--shadow-soft);
  min-height: 0;
}

.canvas {
  position: relative;
  min-width: 2800px;
  min-height: 1800px;
}

.canvas-inner {
  position: relative;
  width: 2800px;
  height: 1800px;
}

.edge-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.node-card {
  min-width: 300px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.95rem;
  background: #fcfaf7;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.node-card:hover {
  border-color: rgba(136, 55, 60, 0.22);
}

.floating {
  position: absolute;
  cursor: move;
  z-index: 2;
}

.node-ports {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.port {
  width: 34px;
  height: 24px;
  padding: 0;
  margin: 0 0 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-700);
  border: 1px solid rgba(97, 80, 73, 0.12);
}

.port:hover {
  border-color: rgba(136, 55, 60, 0.28);
  color: var(--primary-900);
}

.port.placeholder {
  border: 1px dashed rgba(147, 136, 128, 0.32);
  background: transparent;
}

.node-title {
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
  color: var(--primary-700);
  letter-spacing: -0.01em;
}


.node-id-chip {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(136, 55, 60, 0.1);
  color: var(--primary-800);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.node-card label {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.node-card input,
.node-card select,
.node-card textarea {
  margin-top: 0;
  font-size: 0.82rem;
}

.node-card textarea {
  min-height: 90px;
}

.node-delete-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(97, 80, 73, 0.14);
  background: #faf8f5;
  color: #7b6d67;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
}

.node-delete-icon:hover {
  border-color: rgba(158, 67, 72, 0.24);
  color: var(--err);
  background: #fff6f6;
}

.node-group {
  margin: 0.75rem 0;
  border: 1px solid rgba(97, 80, 73, 0.1);
  border-radius: 16px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}

.node-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-700);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.mapper-box {
  border: 1px solid rgba(97, 80, 73, 0.12);
  border-radius: 14px;
  background: #f8f5f1;
  padding: 0.65rem;
  margin-bottom: 0.55rem;
}

.mapper-head {
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  color: var(--primary-700);
}

.mapper-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 92px 88px 32px;
  gap: 0.3rem;
  align-items: center;
  margin-bottom: 0.32rem;
}

.mapper-row span {
  color: var(--text-muted);
  font-weight: 700;
}

.schema-toolbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.schema-toolbar button {
  margin: 0;
  padding: 6px 4px;
  font-size: 12px;
}

.schema-builder-inline {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.edge-delete {
  position: absolute;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(136, 55, 60, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-700);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transform: translateY(-8px);
}

.edge-delete:hover {
  color: var(--err);
  border-color: rgba(158, 67, 72, 0.24);
  background: #fff7f7;
}

pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(97, 80, 73, 0.12);
  background: #f7f4ef;
  padding: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.83rem;
  line-height: 1.5;
}

.connector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.node-preview {
  min-height: 120px;
  max-height: 220px;
}

.preview-box {
  min-height: 260px;
}


.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(42, 35, 33, 0.25);
  backdrop-filter: blur(1px);
}

.guide-overlay-hint {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.guide-bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(97, 80, 73, 0.18);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  box-shadow: var(--shadow-soft);
}

.guide-bubble strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.83rem;
  color: var(--primary-700);
}

.guide-bubble p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.35;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 28, 28, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.popup-window {
  width: min(1200px, 92vw);
  height: min(86vh, 860px);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  border: 1px solid rgba(97, 80, 73, 0.12);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

#popupFrame {
  width: 100%;
  height: 100%;
  border: none;
}

.small {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(136, 55, 60, 0.08);
  color: var(--primary-700);
  border-radius: 8px;
  padding: 0.12rem 0.38rem;
}

::selection {
  background: rgba(136, 55, 60, 0.16);
}

@media (max-width: 1200px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .job-toolbar.header {
    flex-wrap: wrap;
  }

  .job-actions {
    min-width: 0;
    width: 100%;
  }
}
