/* this gets exported as style.css and can be used for the default theming */
/* these are the necessary styles for React Flow, they get used by base.css and style.css */
.react-flow {
  direction: ltr;
}
.react-flow__container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.react-flow__pane {
  z-index: 1;
  cursor: -webkit-grab;
  cursor: grab;
}
.react-flow__pane.selection {
    cursor: pointer;
  }
.react-flow__pane.dragging {
    cursor: -webkit-grabbing;
    cursor: grabbing;
  }
.react-flow__viewport {
  transform-origin: 0 0;
  z-index: 2;
  pointer-events: none;
}
.react-flow__renderer {
  z-index: 4;
}
.react-flow__selection {
  z-index: 6;
}
.react-flow__nodesselection-rect:focus,
.react-flow__nodesselection-rect:focus-visible {
  outline: none;
}
.react-flow .react-flow__edges {
  pointer-events: none;
  overflow: visible;
}
.react-flow__edge-path,
.react-flow__connection-path {
  stroke: #b1b1b7;
  stroke-width: 1;
  fill: none;
}
.react-flow__edge {
  pointer-events: visibleStroke;
  cursor: pointer;
}
.react-flow__edge.animated path {
    stroke-dasharray: 5;
    -webkit-animation: dashdraw 0.5s linear infinite;
            animation: dashdraw 0.5s linear infinite;
  }
.react-flow__edge.animated path.react-flow__edge-interaction {
    stroke-dasharray: none;
    -webkit-animation: none;
            animation: none;
  }
.react-flow__edge.inactive {
    pointer-events: none;
  }
.react-flow__edge.selected,
  .react-flow__edge:focus,
  .react-flow__edge:focus-visible {
    outline: none;
  }
.react-flow__edge.selected .react-flow__edge-path,
  .react-flow__edge:focus .react-flow__edge-path,
  .react-flow__edge:focus-visible .react-flow__edge-path {
    stroke: #555;
  }
.react-flow__edge-textwrapper {
    pointer-events: all;
  }
.react-flow__edge-textbg {
    fill: white;
  }
.react-flow__edge .react-flow__edge-text {
    pointer-events: none;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
  }
.react-flow__connection {
  pointer-events: none;
}
.react-flow__connection .animated {
    stroke-dasharray: 5;
    -webkit-animation: dashdraw 0.5s linear infinite;
            animation: dashdraw 0.5s linear infinite;
  }
.react-flow__connectionline {
  z-index: 1001;
}
.react-flow__nodes {
  pointer-events: none;
  transform-origin: 0 0;
}
.react-flow__node {
  position: absolute;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: all;
  transform-origin: 0 0;
  box-sizing: border-box;
  cursor: -webkit-grab;
  cursor: grab;
}
.react-flow__node.dragging {
    cursor: -webkit-grabbing;
    cursor: grabbing;
  }
.react-flow__nodesselection {
  z-index: 3;
  transform-origin: left top;
  pointer-events: none;
}
.react-flow__nodesselection-rect {
    position: absolute;
    pointer-events: all;
    cursor: -webkit-grab;
    cursor: grab;
  }
.react-flow__handle {
  position: absolute;
  pointer-events: none;
  min-width: 5px;
  min-height: 5px;
  width: 6px;
  height: 6px;
  background: #1a192b;
  border: 1px solid white;
  border-radius: 100%;
}
.react-flow__handle.connectionindicator {
    pointer-events: all;
    cursor: crosshair;
  }
.react-flow__handle-bottom {
    top: auto;
    left: 50%;
    bottom: -4px;
    transform: translate(-50%, 0);
  }
.react-flow__handle-top {
    left: 50%;
    top: -4px;
    transform: translate(-50%, 0);
  }
.react-flow__handle-left {
    top: 50%;
    left: -4px;
    transform: translate(0, -50%);
  }
.react-flow__handle-right {
    right: -4px;
    top: 50%;
    transform: translate(0, -50%);
  }
.react-flow__edgeupdater {
  cursor: move;
  pointer-events: all;
}
.react-flow__panel {
  position: absolute;
  z-index: 5;
  margin: 15px;
}
.react-flow__panel.top {
    top: 0;
  }
.react-flow__panel.bottom {
    bottom: 0;
  }
.react-flow__panel.left {
    left: 0;
  }
.react-flow__panel.right {
    right: 0;
  }
.react-flow__panel.center {
    left: 50%;
    transform: translateX(-50%);
  }
.react-flow__attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.5);
  padding: 2px 3px;
  margin: 0;
}
.react-flow__attribution a {
    text-decoration: none;
    color: #999;
  }
@-webkit-keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
@keyframes dashdraw {
  from {
    stroke-dashoffset: 10;
  }
}
.react-flow__edgelabel-renderer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.react-flow__edge.updating .react-flow__edge-path {
      stroke: #777;
    }
.react-flow__edge-text {
    font-size: 10px;
  }
.react-flow__node.selectable:focus,
  .react-flow__node.selectable:focus-visible {
    outline: none;
  }
.react-flow__node-default,
.react-flow__node-input,
.react-flow__node-output,
.react-flow__node-group {
  padding: 10px;
  border-radius: 3px;
  width: 150px;
  font-size: 12px;
  color: #222;
  text-align: center;
  border-width: 1px;
  border-style: solid;
  border-color: #1a192b;
  background-color: white;
}
.react-flow__node-default.selectable:hover, .react-flow__node-input.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
      box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
    }
.react-flow__node-default.selectable.selected,
    .react-flow__node-default.selectable:focus,
    .react-flow__node-default.selectable:focus-visible,
    .react-flow__node-input.selectable.selected,
    .react-flow__node-input.selectable:focus,
    .react-flow__node-input.selectable:focus-visible,
    .react-flow__node-output.selectable.selected,
    .react-flow__node-output.selectable:focus,
    .react-flow__node-output.selectable:focus-visible,
    .react-flow__node-group.selectable.selected,
    .react-flow__node-group.selectable:focus,
    .react-flow__node-group.selectable:focus-visible {
      box-shadow: 0 0 0 0.5px #1a192b;
    }
.react-flow__node-group {
  background-color: rgba(240, 240, 240, 0.25);
}
.react-flow__nodesselection-rect,
.react-flow__selection {
  background: rgba(0, 89, 220, 0.08);
  border: 1px dotted rgba(0, 89, 220, 0.8);
}
.react-flow__nodesselection-rect:focus,
  .react-flow__nodesselection-rect:focus-visible,
  .react-flow__selection:focus,
  .react-flow__selection:focus-visible {
    outline: none;
  }
.react-flow__controls {
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
}
.react-flow__controls-button {
    border: none;
    background: #fefefe;
    border-bottom: 1px solid #eee;
    box-sizing: content-box;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    padding: 5px;
  }
.react-flow__controls-button:hover {
      background: #f4f4f4;
    }
.react-flow__controls-button svg {
      width: 100%;
      max-width: 12px;
      max-height: 12px;
    }
.react-flow__controls-button:disabled {
      pointer-events: none;
    }
.react-flow__controls-button:disabled svg {
        fill-opacity: 0.4;
      }
.react-flow__minimap {
  background-color: #fff;
}
.react-flow__minimap svg {
  display: block;
}
.react-flow__resize-control {
  position: absolute;
}
.react-flow__resize-control.left,
.react-flow__resize-control.right {
  cursor: ew-resize;
}
.react-flow__resize-control.top,
.react-flow__resize-control.bottom {
  cursor: ns-resize;
}
.react-flow__resize-control.top.left,
.react-flow__resize-control.bottom.right {
  cursor: nwse-resize;
}
.react-flow__resize-control.bottom.left,
.react-flow__resize-control.top.right {
  cursor: nesw-resize;
}
/* handle styles */
.react-flow__resize-control.handle {
  width: 4px;
  height: 4px;
  border: 1px solid #fff;
  border-radius: 1px;
  background-color: #3367d9;
  transform: translate(-50%, -50%);
}
.react-flow__resize-control.handle.left {
  left: 0;
  top: 50%;
}
.react-flow__resize-control.handle.right {
  left: 100%;
  top: 50%;
}
.react-flow__resize-control.handle.top {
  left: 50%;
  top: 0;
}
.react-flow__resize-control.handle.bottom {
  left: 50%;
  top: 100%;
}
.react-flow__resize-control.handle.top.left {
  left: 0;
}
.react-flow__resize-control.handle.bottom.left {
  left: 0;
}
.react-flow__resize-control.handle.top.right {
  left: 100%;
}
.react-flow__resize-control.handle.bottom.right {
  left: 100%;
}
/* line styles */
.react-flow__resize-control.line {
  border-color: #3367d9;
  border-width: 0;
  border-style: solid;
}
.react-flow__resize-control.line.left,
.react-flow__resize-control.line.right {
  width: 1px;
  transform: translate(-50%, 0);
  top: 0;
  height: 100%;
}
.react-flow__resize-control.line.left {
  left: 0;
  border-left-width: 1px;
}
.react-flow__resize-control.line.right {
  left: 100%;
  border-right-width: 1px;
}
.react-flow__resize-control.line.top,
.react-flow__resize-control.line.bottom {
  height: 1px;
  transform: translate(0, -50%);
  left: 0;
  width: 100%;
}
.react-flow__resize-control.line.top {
  top: 0;
  border-top-width: 1px;
}
.react-flow__resize-control.line.bottom {
  border-bottom-width: 1px;
  top: 100%;
}
/**
 * prism.js Dark theme for JavaScript, CSS and HTML
 * Based on the slides of the talk “/Reg(exp){2}lained/”
 * @author Lea Verou
 */

code[class*="language-"],
pre[class*="language-"] {
	color: white;
	background: none;
	text-shadow: 0 -.1em .2em black;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

pre[class*="language-"],
:not(pre) > code[class*="language-"] {
	background: hsl(30, 20%, 25%);
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
	border: .3em solid hsl(30, 20%, 40%);
	border-radius: .5em;
	box-shadow: 1px 1px .5em black inset;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .15em .2em .05em;
	border-radius: .3em;
	border: .13em solid hsl(30, 20%, 40%);
	box-shadow: 1px 1px .3em -.1em black inset;
	white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: hsl(30, 20%, 50%);
}

.token.punctuation {
	opacity: .7;
}

.token.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
	color: hsl(350, 40%, 70%);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: hsl(75, 70%, 60%);
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
	color: hsl(40, 90%, 60%);
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: hsl(350, 40%, 70%);
}

.token.regex,
.token.important {
	color: #e90;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

.token.deleted {
	color: red;
}
/* ============================================================
   xavvy — design tokens (modern, subtle, dual-mode)
   ------------------------------------------------------------
   Design language: near-monochrome, hairline borders, no
   gradients, no glow. Linear / Vercel / Raycast vocabulary.
   Both modes are first-class — neither is an afterthought.

   IMPORTANT — token compatibility:
   The legacy token names (--bg-primary, --text-primary, etc.)
   are referenced from ~80 components. We keep ALL of them to
   avoid breakage and only redefine their VALUES. New code
   should prefer the modern names (--bg, --panel, --text, etc).
   ============================================================ */

:root {
  /* ---- Modern tokens (light defaults) ---- */
  --bg:          #fafafa;
  --panel:       #ffffff;
  --panel-2:     #f4f4f5;
  --panel-hover: #efeff1;

  --border:        rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --text:        #0a0a0c;
  --text-soft:   #18181b;
  --muted:       #71717a;
  --dim:         #a1a1aa;

  --accent:       #5b5bd6;
  --accent-hover: #4f4fc4;
  --accent-fg:    #ffffff;
  --accent-soft:  rgba(91, 91, 214, 0.10);

  --success: #16a34a;
  --warning: #d97706;
  --error:   #dc2626;
  --info:    #0284c7;

  --success-soft: rgba(22, 163, 74, 0.10);
  --warning-soft: rgba(217, 119, 6, 0.10);
  --error-soft:   rgba(220, 38, 38, 0.10);
  --info-soft:    rgba(2, 132, 199, 0.10);

  --ring: 0 0 0 1px var(--accent);
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --elev-2: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --backdrop: rgba(0, 0, 0, 0.45);

  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 10px;

  /* ---- Legacy tokens (kept for ~80 files of references) ---- */
  --bg-primary:        var(--bg);
  --bg-secondary:      var(--panel);
  --bg-tertiary:       var(--panel-2);
  --bg-node:           var(--panel);
  --bg-input:          var(--panel);
  --bg-modal-overlay:  var(--backdrop);
  --bg-modal:          var(--panel);

  --text-primary:   var(--text);
  --text-secondary: var(--text-soft);
  --text-tertiary:  var(--muted);
  --text-inverse:   var(--accent-fg);

  --border-color:       var(--border);
  --border-color-hover: var(--border-strong);
  --border-node:        var(--border);

  --accent-color:        var(--accent);
  --primary-color:       var(--accent);
  --button-bg:           transparent;
  --button-hover-border: var(--border-strong);

  --shadow-color:  rgba(0, 0, 0, 0.04);
  --shadow-strong: rgba(0, 0, 0, 0.10);

  --success-color: var(--success);
  --error-color:   var(--error);
  --warning-color: var(--warning);
  --info-color:    var(--info);

  --scrollbar-track:       transparent;
  --scrollbar-thumb:       rgba(0, 0, 0, 0.18);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.32);

  /* ---- xavvy Forms Designer (separate slate palette, kept) ---- */
  --xfd-bg:           #f1f5f9;
  --xfd-panel:        #ffffff;
  --xfd-input:        #f8fafc;
  --xfd-subtle:       #e2e8f0;
  --xfd-border:       #cbd5e1;
  --xfd-border-hover: #94a3b8;
  --xfd-text:         #0f172a;
  --xfd-muted:        #475569;
  --xfd-dim:          #64748b;

  /* ---- Typography ---- */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  font-feature-settings: "cv11", "ss01";
  font-variant-numeric: tabular-nums;

  color-scheme: light;
  color: var(--text);
  background-color: var(--bg);

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme='light'] { color-scheme: light; }

[data-theme='dark'] {
  color-scheme: dark;

  --bg:          #0a0a0c;
  --panel:       #101013;
  --panel-2:     #16161a;
  --panel-hover: #1c1c21;

  --border:        rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text:      #e8e8ec;
  --text-soft: #d4d4d8;
  --muted:     #8b8b94;
  --dim:       #5a5a63;

  --accent:       #7c7cff;
  --accent-hover: #9999ff;
  --accent-fg:    #0a0a0c;
  --accent-soft:  rgba(124, 124, 255, 0.14);

  --success: #4ade80;
  --warning: #fbbf24;
  --error:   #f87171;
  --info:    #60a5fa;

  --success-soft: rgba(74, 222, 128, 0.12);
  --warning-soft: rgba(251, 191, 36, 0.12);
  --error-soft:   rgba(248, 113, 113, 0.12);
  --info-soft:    rgba(96, 165, 250, 0.12);

  --elev-1: none;
  --elev-2: 0 8px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --backdrop: rgba(0, 0, 0, 0.65);

  --shadow-color:  rgba(0, 0, 0, 0.3);
  --shadow-strong: rgba(0, 0, 0, 0.5);

  --scrollbar-track:       transparent;
  --scrollbar-thumb:       rgba(255, 255, 255, 0.10);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.18);

  /* xavvy Forms Designer — slate palette retained */
  --xfd-bg:           #0f172a;
  --xfd-panel:        #1e293b;
  --xfd-input:        #0f172a;
  --xfd-subtle:       rgba(15, 23, 42, 0.3);
  --xfd-border:       #334155;
  --xfd-border-hover: #475569;
  --xfd-text:         #f1f5f9;
  --xfd-muted:        #94a3b8;
  --xfd-dim:          #64748b;
}

/* ---- Global resets ---- */
* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
}

#root {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1 { font-size: 24px; line-height: 1.2; font-weight: 600; margin: 0; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 600; margin: 0; }
h3 { font-size: 14px; line-height: 1.4; font-weight: 600; margin: 0; }

code, pre {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 12.5px;
}

::selection { background: var(--accent-soft); color: var(--text); }

/* ---- Scrollbars (subtle, blend into surface) ---- */
::-webkit-scrollbar       { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: content-box; }

/* ============================================================
   Base components — buttons, inputs, modals, cards, badges
   ============================================================ */

/* ---- Default button (used by bare <button>s) ----
   The Vite template default was chunky (8px radius, 0.6em padding,
   accent-on-hover border). New default is quieter: 1px hairline,
   transparent fill, subtle hover. Existing call sites keep working
   but inherit the new look. */
button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
button:hover {
  background-color: var(--panel-hover);
  border-color: var(--border-strong);
}
button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--accent);
}
button:disabled,
button[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- .btn class system (opt-in, recommended for new code) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: transparent;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { background-color: var(--panel-hover); border-color: var(--border-strong); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }

.btn.sm  { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.lg  { height: 36px; padding: 0 16px; font-size: 14px; }

.btn.primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.btn.primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.ghost {
  border-color: transparent;
  background-color: transparent;
}
.btn.ghost:hover { background-color: var(--panel-hover); border-color: transparent; }

.btn.danger {
  background-color: var(--error);
  border-color: var(--error);
  color: #fff;
}
.btn.danger:hover { filter: brightness(1.08); }

.btn.success {
  background-color: var(--success);
  border-color: var(--success);
  color: #fff;
}
.btn.success:hover { filter: brightness(1.08); }

/* ---- Inputs / textareas / selects (opt-in) ---- */
.input,
.select,
.textarea {
  display: block;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.textarea {
  height: auto;
  min-height: 72px;
  padding: 8px 10px;
  resize: vertical;
}
.select { appearance: none; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Card / panel surfaces ---- */
.card {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-1);
}

.card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body { padding: 16px; }

/* ---- Modal shell (consistent recipe across the app) ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background-color: var(--backdrop);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-panel {
  background-color: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ---- Badges (status pills) ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--panel-2);
  color: var(--text-soft);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge.success { background-color: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.warning { background-color: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.error   { background-color: var(--error-soft);   color: var(--error);   border-color: transparent; }
.badge.info    { background-color: var(--info-soft);    color: var(--info);    border-color: transparent; }
.badge.accent  { background-color: var(--accent-soft);  color: var(--accent);  border-color: transparent; }

/* ---- Status dots (compact run status indicator) ---- */
.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: var(--muted);
  flex-shrink: 0;
}
.dot.success { background-color: var(--success); }
.dot.warning { background-color: var(--warning); }
.dot.error   { background-color: var(--error); }
.dot.info    { background-color: var(--info); }
.dot.running { background-color: var(--info); animation: dotPulse 1.4s ease-in-out infinite; }

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ---- Section headers (small caps inside drawers/panels) ---- */
.section-head {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ---- Utility classes ---- */
.muted { color: var(--muted); }
.dim   { color: var(--dim); }
.kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background-color: var(--panel-2);
  color: var(--muted);
}

/* ============================================================
   ReactFlow theme overrides — quieter chrome
   ============================================================ */
.react-flow__controls {
  background-color: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--elev-1) !important;
}
.react-flow__controls-button {
  background-color: var(--panel) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--muted) !important;
  width: 26px !important; height: 26px !important;
}
.react-flow__controls-button:hover {
  background-color: var(--panel-hover) !important;
  color: var(--text) !important;
}
.react-flow__controls-button svg {
  fill: currentColor !important;
  max-width: 12px; max-height: 12px;
}
.react-flow__minimap {
  background-color: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.react-flow__attribution { background: transparent !important; }
.react-flow__attribution a { color: var(--dim) !important; font-size: 10px; }
.react-flow__edge-path { stroke-width: 1.5; }

.sidebar-node-card:focus,
.sidebar-node-card:focus-visible { outline: none; }

/* ---- Running-node pulse (subtle warning ring) ---- */
@keyframes xavvyNodeRunningPulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 var(--warning-soft); }
  55%  { transform: scale(1.01); box-shadow: 0 0 0 5px transparent; }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 transparent; }
}

/* ---- ReactFlow node selected state — 1px accent ring, no glow ---- */
.react-flow__node.selected > div,
.react-flow__node:focus > div {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent), var(--elev-1) !important;
  border-color: var(--accent) !important;
}

@media (prefers-reduced-motion: reduce) {
  .react-flow__node *, .dot.running { animation: none !important; }
}

/* ---- Workflow History row hover ---- */
.history-row:hover { background-color: var(--panel-2) !important; }

/* ============================================================
   Code editor styles (react-simple-code-editor + Prism)
   Theme-aware: GitHub Light syntax in light, Catppuccin Mocha
   in dark. The container background is set inline in
   components/CodeEditor.jsx (always dark for IDE feel —
   intentional). CM6 surfaces theme themselves.
   ============================================================ */
.code-editor-textarea,
.code-editor-pre {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  white-space: pre !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
.code-editor-textarea {
  outline: none !important;
  color: #cdd6f4 !important;
  caret-color: #fff !important;
}
.code-editor-textarea::placeholder { color: var(--dim) !important; }
.code-editor-pre { color: #cdd6f4 !important; }

/* Dark / default — Catppuccin Mocha */
.code-editor-pre .token.comment     { color: #6c7086; }
.code-editor-pre .token.keyword     { color: #cba6f7; }
.code-editor-pre .token.string      { color: #a6e3a1; }
.code-editor-pre .token.number      { color: #fab387; }
.code-editor-pre .token.function    { color: #89b4fa; }
.code-editor-pre .token.operator    { color: #89dceb; }
.code-editor-pre .token.builtin     { color: #f9e2af; }
.code-editor-pre .token.boolean     { color: #fab387; }
.code-editor-pre .token.punctuation { color: #9399b2; }
