/* ============================================================
   flows.css — KOS Flows
   Self-contained — same design system as the dashboard pages.
   ============================================================ */

:root {
  --bg-primary: #f8f9fc; --bg-card: #ffffff; --bg-hover: #fafbfc;
  --bg-input: #fafbfc; --bg-input-focus: #ffffff;
  --text-primary: #1a1d29; --text-secondary: #6b7280; --text-muted: #9ca3af;
  --border-color: #e5e7eb; --border-light: #f3f4f6;
  --accent-blue: #3b82f6; --accent-blue-light: #eff6ff;
  --accent-green: #10b981; --accent-green-light: #d1fae5;
  --accent-yellow: #f59e0b; --accent-yellow-light: #fef3c7;
  --accent-purple: #8b5cf6; --accent-purple-light: #ede9fe;
  --accent-red: #ef4444; --accent-red-light: #fee2e2;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --flow-line: #94a3b8; --flow-line-ai: #a78bfa;
}

.dark-mode {
  --bg-primary: #0f1117; --bg-card: #1a1d2b; --bg-hover: #222636;
  --bg-input: #222636; --bg-input-focus: #2a2e3f;
  --text-primary: #e8eaf0; --text-secondary: #9ca3b4; --text-muted: #6b7280;
  --border-color: #2e3348; --border-light: #252939;
  --accent-blue: #5b9cf6; --accent-blue-light: rgba(59,130,246,.15);
  --accent-green: #34d399; --accent-green-light: rgba(16,185,129,.15);
  --accent-yellow: #fbbf24; --accent-yellow-light: rgba(245,158,11,.15);
  --accent-purple: #a78bfa; --accent-purple-light: rgba(139,92,246,.15);
  --accent-red: #f87171; --accent-red-light: rgba(239,68,68,.15);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  --flow-line: #4b5563; --flow-line-ai: #8b5cf6;
}

* { box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; transition: background .3s, color .3s; }
.main-wrapper { margin-left: 320px; min-height: 100vh; background: var(--bg-primary); }
.dashboard-container { padding: 24px 32px; max-width: 1500px; margin: 0 auto; }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dashboard-title { display: flex; align-items: center; gap: 12px; }
.dashboard-title h1 { font-family: 'DM Sans', sans-serif; font-size: 1.75rem; font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.dashboard-title h1 i { color: var(--accent-purple); }
.dashboard-title p { font-size: .875rem; color: var(--text-secondary); margin: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.btn-back-link {
  width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-secondary); display: inline-flex; align-items: center;
  justify-content: center; text-decoration: none; transition: all .2s;
}
.btn-back-link:hover { background: var(--bg-hover); color: var(--text-primary); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--border-color); background: var(--bg-card); border-radius: var(--radius-md);
  color: var(--text-secondary); cursor: pointer; transition: all .2s; font-size: 1rem;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--accent-yellow); border-color: var(--accent-yellow); }
.theme-toggle .fa-sun { display: none; } .theme-toggle .fa-moon { display: inline; }
.dark-mode .theme-toggle .fa-sun { display: inline; } .dark-mode .theme-toggle .fa-moon { display: none; }

.btn-primary-action {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); color: #fff; border: none;
  border-radius: var(--radius-md); font-weight: 600; font-size: .875rem; cursor: pointer;
  transition: all .2s; box-shadow: 0 2px 8px rgba(139,92,246,.35); font-family: inherit;
}
.btn-primary-action:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,92,246,.45); }

.support-note {
  display: flex; gap: 10px; padding: 12px 16px; margin-bottom: 20px; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); background: var(--bg-card); color: var(--text-secondary); font-size: .78rem; line-height: 1.6;
}
.support-note i { color: var(--accent-purple); flex-shrink: 0; margin-top: 2px; }

/* ===== HUB GRID ===== */
.flows-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.flow-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: all .2s; overflow: hidden;
}
.flow-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-purple); }
.flow-card-main { display: flex; gap: 14px; padding: 18px; text-decoration: none; color: inherit; }
.flow-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--accent-purple-light); color: var(--accent-purple);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.flow-card-body h3 { font-size: .95rem; font-weight: 700; margin: 0 0 3px; }
.flow-card-body p { font-size: .74rem; color: var(--text-muted); margin: 0 0 8px; }
.node-type-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.node-type-chip { padding: 2px 8px; border-radius: 999px; background: var(--bg-hover); border: 1px solid var(--border-light); font-size: .64rem; color: var(--text-secondary); }
.flow-card .btn-icon-sm { position: absolute; top: 14px; right: 14px; }

.flows-empty { grid-column: 1/-1; padding: 60px 20px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border-color); border-radius: var(--radius-lg); }
.flows-empty i { font-size: 2.4rem; opacity: .4; margin-bottom: 10px; display: block; }
.flows-empty p { font-size: .95rem; font-weight: 600; color: var(--text-secondary); margin: 0 0 4px; }

/* ===== DETAIL LAYOUT ===== */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.panel-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: .85rem; font-weight: 700; }
.panel-header i { color: var(--accent-purple); margin-right: 4px; }
.panel-body { padding: 16px; }

/* ===== CANVAS TOOLBAR ===== */
.canvas-toolbar { display: flex; align-items: center; gap: 4px; }
.canvas-tool-btn {
  width: 28px; height: 28px; border: 1px solid var(--border-color); background: var(--bg-card);
  border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; font-size: .7rem;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.canvas-tool-btn:hover { background: var(--bg-hover); color: var(--accent-purple); border-color: var(--accent-purple); }
.canvas-zoom-label { font-size: .7rem; font-weight: 700; color: var(--text-muted); width: 38px; text-align: center; }

.canvas-panel { min-height: 560px; display: flex; flex-direction: column; }
.flow-canvas-wrap {
  flex: 1; position: relative; overflow: hidden; background: var(--bg-primary); min-height: 500px;
  cursor: crosshair; background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 22px 22px;
}
.flow-viewport { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.flow-connections-svg { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
.flow-canvas { position: relative; }

.canvas-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-muted);
  font-size: .68rem; font-weight: 600; pointer-events: none; box-shadow: var(--shadow-sm);
}

.flow-node {
  /* Must match NODE_H in flow-detail.js — connector lines and the port
     dot are both positioned off that constant, so the actual box has to
     be that exact height or the two drift apart (line hits the node
     edge off-center from the dot). Content is vertically centered inside
     via align-items, same as before this was a fixed height. */
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 64px; box-sizing: border-box;
  background: var(--bg-card); border: 1.5px solid var(--border-color); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
  cursor: grab; user-select: none;
}
.flow-node.dragging { cursor: grabbing; box-shadow: var(--shadow-lg); z-index: 5; border-color: var(--accent-purple); }
.flow-node-icon { width: 30px; height: 30px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.flow-node.k-trigger .flow-node-icon { background: var(--accent-green-light); color: var(--accent-green); }
.flow-node.k-agent .flow-node-icon   { background: var(--accent-purple-light); color: var(--accent-purple); }
.flow-node.k-ai-sub .flow-node-icon  { background: var(--accent-purple-light); color: var(--accent-purple); opacity: .7; }
.flow-node.k-branch .flow-node-icon  { background: var(--accent-yellow-light); color: var(--accent-yellow); }
.flow-node.k-http .flow-node-icon    { background: var(--accent-blue-light); color: var(--accent-blue); }
.flow-node.k-code .flow-node-icon    { background: var(--accent-blue-light); color: var(--accent-blue); }
.flow-node.k-generic .flow-node-icon { background: var(--bg-hover); color: var(--text-muted); }

.flow-node-name { display: block; font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.flow-node-type { display: block; font-size: .62rem; color: var(--text-muted); }

/* Sticky notes — pure annotation, not part of the execution graph (see
   STICKY_NOTE_TYPE in flow-detail.js): no icon, no port, just text. */
.flow-node.k-note {
  background: var(--accent-yellow-light); border-color: var(--accent-yellow);
  align-items: flex-start; padding: 10px 12px;
}
.dark-mode .flow-node.k-note { background: rgba(245, 158, 11, .12); }
.flow-node-note-text {
  font-size: .72rem; line-height: 1.5; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap; word-break: break-word;
}

.flow-node.ran-ok    { border-color: var(--accent-green); box-shadow: 0 0 0 3px var(--accent-green-light); }
.flow-node.ran-error { border-color: var(--accent-red);   box-shadow: 0 0 0 3px var(--accent-red-light); }
.flow-node.selected  { border-color: var(--accent-blue);  box-shadow: 0 0 0 3px var(--accent-blue-light); }

.node-port {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 11px; height: 11px; border-radius: 50%; background: var(--bg-card);
  border: 2px solid var(--flow-line); cursor: crosshair; transition: all .15s; z-index: 2;
}
.node-port:hover { border-color: var(--accent-blue); background: var(--accent-blue-light); transform: translateY(-50%) scale(1.3); }
.flow-canvas-wrap.connecting { cursor: crosshair; }
.temp-conn-line { fill: none; stroke: var(--accent-blue); stroke-width: 2; stroke-dasharray: 5,4; pointer-events: none; }

.canvas-tool-btn.btn-danger { color: var(--accent-red); border-color: var(--accent-red-light); }
.canvas-tool-btn.btn-danger:hover { background: var(--accent-red-light); border-color: var(--accent-red); }

.selection-box {
  position: absolute; display: none; border: 1.5px dashed var(--accent-blue);
  background: var(--accent-blue-light); opacity: .5; pointer-events: none; z-index: 4;
}
.flow-canvas-wrap.space-pan, .flow-canvas-wrap.panning { cursor: grab; }
.flow-canvas-wrap.panning { cursor: grabbing; }

.node-editor-error { margin-top: 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-red-light); color: var(--accent-red); font-size: .78rem; }

.node-editor-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.editor-tab {
  padding: 6px 16px; border: 1px solid var(--border-color); background: var(--bg-card);
  border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.editor-tab:hover { background: var(--bg-hover); }
.editor-tab.active { background: var(--accent-purple); border-color: var(--accent-purple); color: #fff; }

.form-static { padding: 9px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-hover); color: var(--text-secondary); font-size: .8rem; }
.gs-column-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.gs-column-row .form-input { margin: 0; }
.gs-column-row .gs-col-name { flex: 0 0 34%; }
.gs-column-row .gs-col-value { flex: 1; }

.node-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.node-picker-section {
  grid-column: 1 / -1; margin: 8px 0 2px; font-size: .68rem; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em;
}
.node-picker-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 10px;
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-card);
  color: var(--text-primary); cursor: pointer; text-align: left; font-family: inherit; transition: all .15s;
}
.node-picker-item:hover { border-color: var(--accent-purple); background: var(--accent-purple-light); }
.node-picker-icon {
  width: 30px; height: 30px; border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; background: var(--bg-hover); color: var(--accent-purple); flex-shrink: 0;
}
.node-picker-item strong { display: block; font-size: .78rem; line-height: 1.2; }
.node-picker-item small { display: block; margin-top: 2px; font-size: .64rem; color: var(--text-muted); }

/* ===== RUN PANEL ===== */
.run-panel { display: flex; flex-direction: column; gap: 16px; }

.run-status-badge {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: .74rem;
  font-weight: 700; margin-bottom: 12px;
}
.run-status-badge.idle      { background: var(--bg-hover); color: var(--text-muted); }
.run-status-badge.running   { background: var(--accent-blue-light); color: var(--accent-blue); }
.run-status-badge.succeeded { background: var(--accent-green-light); color: var(--accent-green); }
.run-status-badge.failed    { background: var(--accent-red-light); color: var(--accent-red); }

.run-steps { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.run-step { border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.run-step.error { border-color: var(--accent-red); }
.run-step-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-size: .78rem; font-weight: 600; }
.run-step.success .run-step-head i { color: var(--accent-green); }
.run-step.error .run-step-head i   { color: var(--accent-red); }
.run-step-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-step-ms { font-size: .68rem; color: var(--text-muted); }
.run-step-detail { padding: 8px 10px; border-top: 1px solid var(--border-light); background: var(--bg-input); }
.run-step-error { color: var(--accent-red); font-size: .74rem; margin-bottom: 6px; }
.run-step-io pre { font-size: .68rem; white-space: pre-wrap; word-break: break-word; margin: 4px 0 0; color: var(--text-secondary); max-height: 180px; overflow-y: auto; }

.run-steps-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: .8rem; }

.run-history { padding: 6px; max-height: 260px; overflow-y: auto; }
.run-history-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.run-history-item:hover { background: var(--bg-hover); }
.run-history-status { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .64rem; flex-shrink: 0; }
.run-history-status.succeeded { background: var(--accent-green-light); color: var(--accent-green); }
.run-history-status.failed    { background: var(--accent-red-light); color: var(--accent-red); }
.run-history-status.running   { background: var(--accent-blue-light); color: var(--accent-blue); }
.run-history-time { font-size: .76rem; color: var(--text-secondary); }

/* ===== MODAL (import) ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 20px; }
.modal-box { width: 100%; max-width: 520px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 14px; border-bottom: 1px solid var(--border-color); }
.modal-header h2 { font-family: 'DM Sans', sans-serif; font-size: 1.05rem; font-weight: 700; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.modal-header h2 i { color: var(--accent-purple); }
.modal-header p { font-size: .78rem; color: var(--text-secondary); margin: 0; }
.modal-body { padding: 18px 20px; max-height: 60vh; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-color); background: var(--bg-hover); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .76rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.form-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text-primary); font-size: .85rem; font-family: inherit; }
.form-input:focus { outline: none; border-color: var(--accent-purple); background: var(--bg-input-focus); box-shadow: 0 0 0 2px var(--accent-purple-light); }
textarea.form-input { font-family: 'JetBrains Mono', monospace; font-size: .76rem; resize: vertical; }

.upload-zone { border: 2px dashed var(--border-color); border-radius: var(--radius-md); padding: 22px 16px; text-align: center; cursor: pointer; color: var(--text-muted); transition: all .15s; }
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent-purple); background: var(--accent-purple-light); color: var(--accent-purple); }
.upload-zone i { font-size: 1.6rem; margin-bottom: 6px; display: block; }
.upload-zone p { margin: 0; font-size: .8rem; font-weight: 600; }

.or-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--text-muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

.btn-cancel { padding: 9px 20px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500; color: var(--text-secondary); cursor: pointer; font-family: inherit; }
.btn-cancel:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-confirm { display: inline-flex; align-items: center; gap: 7px; padding: 9px 22px; background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); border: none; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600; color: #fff; cursor: pointer; font-family: inherit; }
.btn-confirm:hover { box-shadow: 0 4px 12px rgba(139,92,246,.4); }
.btn-confirm:disabled { opacity: .6; cursor: not-allowed; }

.btn-icon-sm { width: 30px; height: 30px; border: 1px solid var(--border-color); background: var(--bg-card); border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; color: var(--text-secondary); }
.btn-icon-sm:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon-sm.btn-danger:hover { background: var(--accent-red-light); border-color: var(--accent-red); color: var(--accent-red); }

.notification { position: fixed; top: 20px; right: 20px; padding: 13px 20px; border-radius: var(--radius-md); font-weight: 600; font-size: .85rem; display: flex; align-items: center; gap: 9px; z-index: 4000; box-shadow: var(--shadow-lg); max-width: 420px; }
.notification.success { background: var(--accent-green); color: #fff; }
.notification.error { background: var(--accent-red); color: #fff; }

@media (max-width: 1000px) {
  .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .main-wrapper { margin-left: 0; }
  .dashboard-container { padding: 14px 16px; }
  .dashboard-header { flex-direction: column; gap: 14px; align-items: flex-start; }
}

.chat-input-hint { display: block; margin-top: 8px; font-size: .7rem; color: var(--text-muted); }
.chat-input-hint code { background: var(--bg-hover); padding: 1px 5px; border-radius: 4px; }

/* ===== SETTINGS PAGE ===== */
.settings-layout { display: flex; flex-direction: column; gap: 16px; max-width: 620px; }
.settings-hint { font-size: .8rem; color: var(--text-secondary); line-height: 1.6; margin: 0 0 16px; }

.cred-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.cred-status.ok { background: var(--accent-green-light); color: var(--accent-green); }
.cred-status.missing { background: var(--accent-yellow-light); color: var(--accent-yellow); }

.field-status { float: right; display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; text-transform: none; }
.field-status.ok { color: var(--accent-green); }
.field-status.missing { color: var(--text-muted); }

.settings-howto { margin-top: 16px; }
.settings-howto ol { margin: 12px 0 0; padding-left: 20px; font-size: .8rem; color: var(--text-secondary); line-height: 1.9; }
.settings-howto code { background: var(--bg-hover); padding: 1px 5px; border-radius: 4px; font-size: .74rem; }
.settings-howto a { color: var(--accent-purple); }

/* Code/JSON editing areas inside the node form editor — monospace so
   braces and indentation line up. */
.node-editor-tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.editor-tab {
  padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border-color);
  background: var(--bg-hover); color: var(--text-secondary); cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600;
}
.editor-tab.active { background: var(--accent-purple); color: #fff; border-color: transparent; }
.form-input.code-area {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.5;
}
