/* Isolated Phase 2 styles. No prototype classes or global selectors. */
#app.live-app {
  --live-purple: #4c1292;
  --live-ink: #282333;
  --live-muted: #6e667b;
  --live-line: #e4ddea;
  --live-soft: #f3edf9;
  color: var(--live-ink);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 14px;
  background: #f8f7fb;
  min-height: 100vh;
  line-height: 1.5;
}
.live-app *, .live-app *::before, .live-app *::after { box-sizing: border-box; }
.live-app h1, .live-app h2, .live-app h3, .live-app h4, .live-app p { margin: 0; }
.live-app h1 { font-size: clamp(24px, 2.7vw, 32px); letter-spacing: -.8px; line-height: 1.2; font-weight: 650; }
.live-app h2 { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.live-app h3 { font-size: 16px; font-weight: 650; }
.live-app h4 { font-size: 14px; }
.live-app button, .live-app input, .live-app select, .live-app textarea { font: inherit; }
.live-app button, .live-app a, .live-app summary { -webkit-tap-highlight-color: transparent; }
.live-app :is(button, a, input, textarea, select, summary):focus-visible { outline: 3px solid #9664d2; outline-offset: 3px; }
.live-app button:disabled, .live-app fieldset:disabled button { opacity: .55; cursor: not-allowed; }
.live-app fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.live-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.live-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 30px 20px 24px; background: white; border-right: 1px solid var(--live-line); overflow-y: auto; }
.live-brand { display: flex; align-items: center; gap: 9px; font-size: 21px; letter-spacing: -.7px; }
.live-brand-mark { display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 36px; border-radius: 11px; color: white; background: var(--live-purple); font-weight: 700; font-size: 24px; }
.live-sidebar nav { display: grid; gap: 7px; margin-top: 43px; }
.live-sidebar nav a { display: block; border-radius: 9px; padding: 12px 15px; color: var(--live-muted); font-weight: 600; text-decoration: none; }
.live-sidebar nav a:hover, .live-sidebar nav a[aria-current] { color: var(--live-purple); background: var(--live-soft); }
.live-sidebar-note { border: 1px solid var(--live-line); border-radius: 12px; padding: 16px 13px; margin-top: auto; }
.live-sidebar-note p { font-size: 12px; color: var(--live-muted); margin-top: 10px; }
.live-account { display: grid; gap: 6px; padding-top: 24px; overflow-wrap: anywhere; }
.live-account span { color: var(--live-muted); font-size: 12px; }
.live-account .live-button { margin-top: 7px; justify-self: start; }
.live-main { min-width: 0; }
.live-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 28px 36px 24px; border-bottom: 1px solid var(--live-line); background: white; }
.live-eyebrow { color: var(--live-purple); font-size: 10px; font-weight: 750; letter-spacing: 1.6px; margin-bottom: 8px !important; }
.live-save-status { color: var(--live-muted); font-size: 12px; margin-top: 9px !important; }
.live-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.live-app .live-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 39px; padding: 9px 13px; border: 1px solid #d9cfe5; border-radius: 8px; background: white; color: var(--live-ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: normal; }
.live-app .live-button:hover:not(:disabled) { background: #f8f4fc; border-color: #af91ce; }
.live-app .live-primary { color: white; background: var(--live-purple); border-color: var(--live-purple); }
.live-app .live-primary:hover:not(:disabled) { color: white; background: #6423ac; border-color: #6423ac; }
.live-content { max-width: 1480px; margin: 0 auto; padding: 24px 36px 34px; }
.live-tabs { display: flex; gap: 26px; overflow-x: auto; border-bottom: 1px solid var(--live-line); margin-bottom: 27px; }
.live-tabs button { background: transparent; color: var(--live-muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 0 14px; font-weight: 650; white-space: nowrap; }
.live-tabs button[aria-current] { color: var(--live-purple); border-color: var(--live-purple); }
.live-tabs button:hover { background: transparent; color: var(--live-purple); }
.live-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 19px; }
.live-section-heading p { color: var(--live-muted); font-size: 13px; margin-top: 5px; }
.live-section-heading > div { min-width: 0; }
.live-section-label { margin-bottom: 14px !important; }
.live-panel { min-width: 0; background: white; border: 1px solid var(--live-line); border-radius: 13px; box-shadow: 0 5px 18px #33204204; overflow-wrap: anywhere; }
.live-pad { padding: 22px; }
.live-pad > h2 { margin-bottom: 18px; }
.live-pad > p + .live-button, .live-pad > p + p { margin-top: 12px; }
.live-split { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.live-list { padding: 9px; }
.live-list-item { width: 100%; text-align: left; display: grid; gap: 5px; border: 1px solid transparent; padding: 15px 12px; background: white; margin: 3px 0; border-radius: 8px; overflow-wrap: anywhere; }
.live-list-item strong { font-size: 14px; }
.live-list-item span { color: var(--live-muted); font-size: 12px; font-weight: 400; }
.live-list-item.is-selected, .live-node.is-selected { border-color: #b99ad9; background: var(--live-soft); }
.live-field { display: grid; gap: 7px; margin-bottom: 19px; min-width: 0; font-size: 13px; font-weight: 550; }
.live-field input, .live-field textarea, .live-field select { min-width: 0; width: 100%; border: 1px solid #dcd3e6; border-radius: 8px; background: #fff; color: var(--live-ink); padding: 10px 11px; font-size: 14px; font-weight: 400; }
.live-field textarea { resize: vertical; min-height: 94px; line-height: 1.6; }
.live-field .live-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; tab-size: 2; }
.live-field small { color: var(--live-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.live-checkbox { display: flex; flex-direction: row; align-items: center; gap: 9px; }
.live-checkbox input { width: auto; }
.live-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.live-empty { color: var(--live-muted); text-align: center; padding: 35px 20px; font-size: 14px; }
.live-muted { color: var(--live-muted); font-size: 12px; margin: 11px 0 !important; }
.live-note { color: #694583; background: #f7f1fc; border-radius: 8px; padding: 12px 14px; font-size: 12px; margin: 14px 0 !important; }
.live-badge { display: inline-block; color: #694188; background: var(--live-soft); font-size: 11px; font-weight: 650; border-radius: 6px; padding: 5px 8px; max-width: 100%; overflow-wrap: anywhere; }
.live-message { border: 1px solid; padding: 14px 16px; border-radius: 9px; margin-bottom: 18px; font-size: 13px; overflow-wrap: anywhere; }
.live-message p { margin: 7px 0 12px; }
.live-message h2 { font-size: 16px; }
.live-message .live-button { margin-top: 5px; }
.live-error { background: #fff3f2; border-color: #e8b8b3; color: #922d28; }
.live-success { background: #eef9f2; border-color: #bbdfc6; color: #266941; }
.live-warning { background: #fff7e8; border-color: #ead19e; color: #795414; }
.live-notice { background: #f5f0fb; border-color: #dcd0ec; color: #654485; }
.live-palette { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.live-builder { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 22px; align-items: start; }
.live-graph { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 23px; background: radial-gradient(#dfd5ec 1px, transparent 1px) 0 0 / 15px 15px, #fcfaff; border-block: 1px solid var(--live-line); }
.live-node { padding: 15px; border: 1px solid #d9c8e9; border-radius: 9px; background: white; min-height: 87px; display: grid; gap: 6px; text-align: left; overflow-wrap: anywhere; }
.live-node span { font-size: 10px; font-weight: 600; color: var(--live-purple); text-transform: uppercase; letter-spacing: .8px; }
.live-node strong { font-size: 13px; }
.live-edges { padding: 0; margin: 12px 0 19px; list-style: none; }
.live-edges li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee8f3; font-size: 12px; }
.live-edges .live-button { font-size: 11px; min-height: 30px; padding: 5px 8px; }
.live-edge-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 13px; align-items: end; }
.live-edge-form > .live-button { justify-self: start; }
.live-schedules { margin-top: 24px; }
.live-schedule { padding: 20px 0; border-top: 1px solid var(--live-line); }
.live-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-right: auto; }
.live-check input { accent-color: var(--live-purple); width: 17px; height: 17px; }
.live-stack { display: grid; gap: 16px; }
.live-app details { margin-top: 15px; }
.live-app summary { cursor: pointer; color: var(--live-purple); font-size: 13px; font-weight: 600; padding: 6px 0; }
.live-output { white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 420px; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; color: #e4dbea; background: #292034; border-radius: 8px; padding: 16px; margin: 9px 0 0; }
.live-connection-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.live-url { color: var(--live-muted); font-size: 12px; overflow-wrap: anywhere; margin-bottom: 15px !important; }
.live-panel > .live-actions { margin-top: 16px; }
.live-panel > .live-message { margin-top: 16px; margin-bottom: 0; }
.live-inventory { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--live-line); }
.live-inventory ul { padding-left: 20px; }
.live-inventory li { padding: 5px 0; }
.live-inventory small { display: block; color: var(--live-muted); }
.live-table-wrap { overflow-x: auto; }
.live-table { width: 100%; border-collapse: collapse; }
.live-table th { padding: 14px 18px; background: #f9f6fc; text-align: left; font-size: 12px; color: var(--live-muted); white-space: nowrap; }
.live-table td { padding: 14px 18px; border-top: 1px solid var(--live-line); vertical-align: top; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.live-footer { color: var(--live-muted); font-size: 11px; margin-top: 25px !important; }
.live-auth { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 20% 0, #e9dcf8, transparent 60%), #f7f5fb; padding: 30px 18px; }
.live-auth-card { width: min(100%, 440px); border: 1px solid #e0d3ec; background: #fff; border-radius: 18px; box-shadow: 0 16px 65px #4224670d; padding: 32px; }
.live-auth-card > .live-brand-mark { margin-bottom: 24px; }
.live-auth-card h1 { font-size: 27px; line-height: 1.25; }
.live-auth-card form { margin-top: 25px; }
.live-auth-card form .live-button { width: 100%; }
.live-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1150px) {
  .live-shell { grid-template-columns: 185px minmax(0, 1fr); }
  .live-sidebar { padding: 24px 13px; }
  .live-brand { font-size: 18px; }
  .live-header { padding: 24px; align-items: flex-start; }
  .live-header > .live-actions { max-width: 170px; }
  .live-content { padding: 23px; }
  .live-builder, .live-connection-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .live-shell { display: block; }
  .live-sidebar { position: static; height: auto; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; border-right: 0; border-bottom: 1px solid var(--live-line); }
  .live-brand { margin-right: auto; }
  .live-sidebar nav { display: flex; margin: 0; gap: 2px; }
  .live-sidebar nav a { padding: 9px 10px; font-size: 12px; }
  .live-sidebar-note { display: none; }
  .live-account { padding: 0; width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  .live-account strong { font-size: 12px; }
  .live-account span { font-size: 11px; }
  .live-account .live-button { margin: 0 0 0 auto; padding: 5px 9px; min-height: 31px; font-size: 11px; }
  .live-header { flex-wrap: wrap; gap: 17px; padding: 24px 18px 20px; }
  .live-header > .live-actions { max-width: none; width: 100%; }
  .live-header > .live-actions .live-primary { flex: 1; }
  .live-content { padding: 18px; }
  .live-split, .live-two-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .live-split { gap: 17px; }
  .live-list { max-height: 245px; overflow-y: auto; }
  .live-section-heading { flex-wrap: wrap; align-items: flex-start; }
  .live-pad { padding: 18px; }
  .live-graph { padding: 18px; }
  .live-tabs { gap: 24px; }
  .live-auth-card { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-app * { scroll-behavior: auto !important; transition: none !important; }
}
/* Restored Phase 1 shell with a native visual authoring canvas. */
.phase-one { background:#f7f8fc; color:#25243a; }
.phase-one .icon {width:20px;height:20px;flex-shrink:0}
.phase-one .brand img {width:34px;height:34px}
.phase-one h1 {font-size:30px;letter-spacing:-1px}
.phase-one h2 {font-size:17px;margin:0}
.phase-one h3 {font-size:14px;margin:0}
.phase-one .content {max-width:1600px}
.phase-one .restore-gap {margin-top:20px}
.phase-one .restore-savebar {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;color:#78768b;font-size:12px}
.phase-one .tabs {overflow-x:auto;white-space:nowrap}
.phase-one .tab {background:none;border:0;border-bottom:2px solid transparent;border-radius:0;cursor:pointer}
.phase-one .tab.active {border-color:#7561ca;color:#6950bb}
.phase-one .restore-overlay {position:fixed;inset:0;background:#24213b55;z-index:100;display:flex;justify-content:flex-end}
.phase-one .restore-overlay .drawer {position:relative;inset:auto;display:block;width:min(600px,100%);height:100vh;background:#fff;overflow:auto;box-shadow:-12px 0 40px #25243a20}
.phase-one .drawer-header {display:flex;justify-content:space-between;align-items:center;padding:24px;border-bottom:1px solid #e9e7ef}
.phase-one .drawer-body {padding:24px}
.phase-one .flow-toolbar {display:flex;align-items:center;gap:20px;padding:16px;background:#fff;border:1px solid #e6e4ee;border-radius:14px 14px 0 0}
.phase-one .flow-toolbar .live-field {margin:0;flex:1;max-width:380px}
.phase-one .flow-workbench {display:grid;grid-template-columns:170px minmax(260px,1fr) 270px;border:1px solid #e6e4ee;min-height:560px;background:#fff;border-radius:0 0 14px 14px;overflow:hidden}
.phase-one .flow-palette {padding:18px 12px;border-right:1px solid #e6e4ee}
.phase-one .flow-palette-item {display:flex;gap:8px;align-items:center;background:white;border:1px solid #e9e7ef;border-radius:9px;padding:10px;width:100%;margin:9px 0;color:#45415a;cursor:pointer;text-align:left;font-size:12px}
.phase-one .flow-palette-item>span:last-child {margin-left:auto}
.phase-one .flow-type-dot {display:flex;color:#7561ca}
.phase-one .flow-center {min-width:0;display:flex;flex-direction:column}
.phase-one .flow-canvas-bar,.phase-one .flow-canvas-footer {padding:12px;font-size:11px;display:flex;gap:12px;align-items:center;justify-content:space-between;border-bottom:1px solid #eeecf4;min-height:46px}
.phase-one .flow-canvas-footer {border-top:1px solid #eeecf4;border-bottom:0;flex-wrap:wrap}
.phase-one .flow-viewport {height:480px;overflow:auto;background-color:#f9f8fc;background-image:radial-gradient(#d9d5e5 1px,transparent 1px);background-size:20px 20px}
.phase-one .flow-surface {position:relative;transform-origin:top left}
.phase-one .flow-edges {position:absolute;inset:0;pointer-events:none;overflow:visible}
.phase-one .flow-edges path {fill:none;stroke:#a39abc;stroke-width:2}
.phase-one .flow-edges marker path {fill:#a39abc;stroke:none}
.phase-one .flow-node {position:absolute;width:220px;min-height:120px;background:#fff;border:1px solid #ded9ec;border-radius:12px;box-shadow:0 4px 12px #3630480c}
.phase-one .flow-node.selected {border:2px solid #8870d5;box-shadow:0 0 0 3px #886ed515}
.phase-one .flow-node-select {display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;width:100%;padding:16px;background:none;border:0;cursor:grab;touch-action:none;color:inherit}
.phase-one .flow-node-type {display:flex;align-items:center;gap:8px;font-size:11px;color:#786495;width:100%}
.phase-one .flow-node-type small {margin-left:auto}
.phase-one .flow-node strong {font-size:13px;overflow-wrap:anywhere}
.phase-one .flow-node .subtle {font-size:10px}
.phase-one .flow-port {position:absolute;top:53px;width:14px;height:14px;border:2px solid #8c77ba;background:#fff;border-radius:50%;padding:0;cursor:crosshair;touch-action:none}
.phase-one .flow-port::before {content:'';position:absolute;top:-10px;bottom:-10px}
.phase-one .flow-port.input {left:-8px}.phase-one .flow-port.input::before {left:-10px;right:-2px}
.phase-one .flow-port.output {right:-8px}.phase-one .flow-port.output::before {right:-10px;left:-2px}
.phase-one .flow-port.armed {background:#8c77ba;box-shadow:0 0 0 5px #8c77ba22}
.phase-one .flow-port:hover {box-shadow:0 0 0 4px #8c77ba33}
.phase-one .flow-connect-preview {fill:none;stroke:#8c77ba;stroke-width:2;stroke-dasharray:5 4;pointer-events:none}
.phase-one .flow-inspector {padding:18px;border-left:1px solid #e6e4ee;max-height:590px;overflow:auto}
.phase-one .flow-inspector .live-pad {padding:0;border:0;box-shadow:none}
.phase-one .flow-inspector .live-two-columns {display:block}
.phase-one .flow-connections,.phase-one .flow-run-dock {margin-top:18px}
.phase-one .flow-connections summary {cursor:pointer;font-size:13px}
.phase-one .integration[hidden] {display:none}
.phase-one .sidebar>.live-button {margin:12px 0}
.phase-one .builder-content .stats {display:none}
@media(max-width:1200px){.phase-one .flow-workbench{grid-template-columns:145px minmax(220px,1fr)}.phase-one .flow-inspector{grid-column:1/-1;border-left:0;border-top:1px solid #e6e4ee;max-height:none}.phase-one .flow-inspector .live-two-columns{display:grid}}
.phase-one .flow-viewport {position:relative}
.phase-one .flow-node.running {border-color:var(--accent);box-shadow:0 0 0 3px #7139c122}
.phase-one .flow-node.done {border-color:#bbdfc6;box-shadow:0 0 0 2px #bbdfc633}
.phase-one .flow-node.has-error {border-color:#e8b8b3}
.phase-one .node-error {display:block;margin-top:6px;padding:4px 8px;background:#fff3f2;color:#922d28;border-radius:6px;font-size:11px}
.phase-one .flow-minimap {position:absolute;right:10px;bottom:10px;background:#ffffffcc;border:1px solid var(--line);border-radius:6px;overflow:hidden;pointer-events:none}
.phase-one .flow-minimap-node {position:absolute;background:var(--accent);opacity:.35;border-radius:2px}
.phase-one .flow-palette-search {margin-bottom:10px}
.phase-one button.nav-link {border:0;background:none;font:inherit;text-align:left;cursor:pointer;width:100%}
.phase-one .nav-label + .nav-link {margin-top:2px}

/* Node-type color system — each step type gets one fixed accent, carried from the
   "Add a step" palette onto its canvas card and into the Step Settings badge, so the
   canvas is scannable by color instead of requiring every label to be read. */
.phase-one .flow-type-dot.type-trigger,.phase-one .flow-node-type.type-trigger,.phase-one .live-badge.type-trigger{color:#1c9c6b}
.phase-one .flow-type-dot.type-agent,.phase-one .flow-node-type.type-agent,.phase-one .live-badge.type-agent{color:#7139c1}
.phase-one .flow-type-dot.type-tool,.phase-one .flow-node-type.type-tool,.phase-one .live-badge.type-tool{color:#0f8a9e}
.phase-one .flow-type-dot.type-vector,.phase-one .flow-node-type.type-vector,.phase-one .live-badge.type-vector{color:#4a5fd1}
.phase-one .flow-type-dot.type-code,.phase-one .flow-node-type.type-code,.phase-one .live-badge.type-code{color:#c47a1f}
.phase-one .flow-type-dot.type-sql,.phase-one .flow-node-type.type-sql,.phase-one .live-badge.type-sql{color:#0f8a9e}
.phase-one .flow-type-dot.type-approval,.phase-one .flow-node-type.type-approval,.phase-one .live-badge.type-approval{color:#c23b86}
.phase-one .flow-type-dot.type-output,.phase-one .flow-node-type.type-output,.phase-one .live-badge.type-output{color:#2766c7}
.phase-one .flow-node-type.type-llm,.phase-one .live-badge.type-llm{color:#7139c1}
.phase-one .live-badge.type-trigger{background:#e8f8f0}
.phase-one .live-badge.type-agent{background:#f2ecfc}
.phase-one .live-badge.type-tool,.phase-one .live-badge.type-sql{background:#e6f6f8}
.phase-one .live-badge.type-vector{background:#edf0fc}
.phase-one .live-badge.type-code{background:#fcf0e0}
.phase-one .live-badge.type-approval{background:#fbe8f1}
.phase-one .live-badge.type-output{background:#e8f1fc}
.phase-one .flow-node.type-trigger{border-left:4px solid #1c9c6b}
.phase-one .flow-node.type-agent{border-left:4px solid #7139c1}
.phase-one .flow-node.type-tool{border-left:4px solid #0f8a9e}
.phase-one .flow-node.type-vector{border-left:4px solid #4a5fd1}
.phase-one .flow-node.type-code{border-left:4px solid #c47a1f}
.phase-one .flow-node.type-sql{border-left:4px solid #0f8a9e}
.phase-one .flow-node.type-approval{border-left:4px solid #c23b86}
.phase-one .flow-node.type-output{border-left:4px solid #2766c7}
.phase-one .flow-node.type-llm{border-left:4px solid #7139c1}

/* Sidebar section color accents — distinct icon tints so sections read as separate
   groups at a glance, with a single consistent accent tying the four admin-only
   sections together (reinforcing the existing ADMIN divider, not duplicating it). */
.phase-one .nav-link{gap:11px}
.phase-one .nav-icon{display:inline-flex;flex-shrink:0}
.phase-one .nav-icon .icon{width:18px;height:18px}
.phase-one .nav-link.sect-overview .nav-icon{color:#475569}
.phase-one .nav-link.sect-builder .nav-icon{color:#2766c7}
.phase-one .nav-link.sect-agents .nav-icon{color:#7139c1}
.phase-one .nav-link.sect-schedules .nav-icon{color:#c47a1f}
.phase-one .nav-link.sect-finance .nav-icon{color:#0f9d58}
.phase-one .nav-link.sect-data .nav-icon{color:#0f8a9e}
.phase-one .nav-link.sect-history .nav-icon{color:#6b6475}
.phase-one .nav-link.sect-admin .nav-icon{color:#b45309}
.phase-one .nav-link.active .nav-icon{color:inherit}

/* Panel separation — a few high-traffic panels get a colored top accent so a page of
   stacked white cards doesn't read as one undifferentiated surface. */
.phase-one .tab-finance-trading .panel:first-of-type{border-top:3px solid #0f9d58}
.phase-one .tab-data-memory .panel.panel-body:first-of-type,.phase-one .tab-data-memory .test-grid .panel-body:first-child{border-top:3px solid #0f8a9e}
.phase-one .flow-run-dock{border-top:3px solid #2766c7}
.phase-one .page-heading.compact{margin-bottom:18px}
.phase-one .page-heading.compact h1{font-size:24px}
.phase-one .restore-full-row{grid-column:1/-1}
.phase-one td.fin-merchant{white-space:normal;max-width:220px;word-break:break-word}
.phase-one [data-sql-query]{width:100%;box-sizing:border-box;border:1px solid var(--live-line,#e4ddea);border-radius:8px;padding:11px 12px;font-family:ui-monospace,monospace;font-size:13px;resize:vertical}
.phase-one .workflow-switch-list{display:flex;flex-direction:column}
.phase-one .workflow-switch-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 22px;border-top:1px solid var(--live-line,#e4ddea)}
.phase-one .workflow-switch-row.active{background:var(--live-soft,#f3edf9)}
.phase-one .workflow-switch-list .workflow-switch-row:first-child{border-top:0}

/* Floating chat widget -- fixed to the bottom-right corner on every page, above everything else. */
.phase-one .chat-fab{position:fixed;right:24px;bottom:24px;z-index:40;width:52px;height:52px;border-radius:50%;border:none;background:#c0266b;color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(0,0,0,.22);cursor:pointer}
.phase-one .chat-fab .icon{width:24px;height:24px}
.phase-one .chat-fab:hover{background:#a81f5c}
.phase-one .chat-panel{position:fixed;right:24px;bottom:24px;z-index:40;width:380px;max-width:calc(100vw - 32px);max-height:min(640px,calc(100vh - 48px));display:flex;flex-direction:column;background:#fff;border-radius:14px;box-shadow:0 12px 36px rgba(0,0,0,.28);border:1px solid var(--live-line,#e4ddea);overflow:hidden}
.phase-one .chat-panel-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--live-line,#e4ddea)}
.phase-one .chat-panel-header h2{margin:0;font-size:16px}
.phase-one .chat-panel-header .live-button{padding:4px 10px}
.phase-one .chat-thread{flex:1;display:flex;flex-direction:column;gap:12px;overflow-y:auto;padding:14px 16px}
.phase-one .chat-msg{max-width:85%;padding:9px 13px;border-radius:12px;border:1px solid var(--live-line,#e4ddea)}
.phase-one .chat-msg.user{align-self:flex-end;background:var(--live-soft,#f3edf9)}
.phase-one .chat-msg.assistant{align-self:flex-start;background:#fff}
.phase-one .chat-msg-role{font-size:11px;text-transform:uppercase;letter-spacing:.04em;opacity:.6;margin-bottom:4px}
.phase-one .chat-msg-body{white-space:pre-wrap;word-break:break-word;font-size:14px}
.phase-one .chat-approval{padding:12px 16px;border-top:3px solid #c0266b;background:var(--live-soft,#f3edf9)}
.phase-one .chat-approval h3{margin-top:0;font-size:14px}
.phase-one .chat-input-row{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-top:1px solid var(--live-line,#e4ddea)}
.phase-one .chat-input-row textarea{width:100%;box-sizing:border-box;border:1px solid var(--live-line,#e4ddea);border-radius:8px;padding:9px 11px;font-family:inherit;font-size:14px;resize:vertical}
@media(max-width:480px){.phase-one .chat-panel{right:16px;left:16px;width:auto}.phase-one .chat-fab{right:16px;bottom:16px}}

@media(max-width:700px){.phase-one .flow-workbench{grid-template-columns:1fr}.phase-one .flow-palette{display:flex;flex-wrap:wrap;gap:6px}.phase-one .flow-palette-item{width:auto;margin:0}.phase-one .flow-palette>p{display:none}.phase-one .flow-palette>h3{width:100%}.phase-one .flow-toolbar,.phase-one .restore-savebar{flex-wrap:wrap}.phase-one .flow-viewport{height:400px}}

/* Keep every nav item (incl. ADMIN > Connections) reachable on short screens. */
@media(min-width:701px){.sidebar{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}}
