.flow-studio-page { overflow: hidden; }
.flow-studio-page .app-shell { display: block; }
.flow-studio-page .sidebar { display: none; }
.flow-studio-page .main-area { height: 100vh; overflow: hidden; background: #eef2ef; }
.flow-studio-page .topbar { display: none; }
.flow-studio-page .page { width: 100%; height: 100vh; margin: 0; padding: 0; overflow: hidden; }
.flow-studio-page .page > .flash { position: fixed; z-index: 120; top: 14px; left: 50%; width: min(560px, calc(100% - 36px)); transform: translateX(-50%); box-shadow: 0 20px 55px rgba(16,37,33,.18); }

.flow-studio {
    --flow-green: #2f9f83;
    --flow-green-deep: #14725b;
    --flow-canvas: #f6f8f7;
    --flow-panel: #ffffff;
    --flow-border: #dce5e1;
    --flow-shadow: 0 18px 48px rgba(28,53,45,.12);
    display: flex;
    height: 100vh;
    min-height: 650px;
    flex-direction: column;
    color: #1c2926;
    background: var(--flow-canvas);
}
.flow-studio button, .flow-studio input, .flow-studio textarea, .flow-studio select { font: inherit; }
.flow-studio-bar {
    position: relative;
    z-index: 50;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--flow-border);
    background: rgba(255,255,255,.95);
    box-shadow: 0 5px 24px rgba(24,57,47,.06);
}
.flow-studio-title, .flow-studio-actions { display: flex; align-items: center; gap: 12px; }
.flow-studio-title h2 { max-width: 400px; overflow: hidden; margin: 0; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.flow-studio-title .eyebrow { margin-bottom: 2px; font-size: .6rem; }
.flow-back {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--flow-border);
    border-radius: 13px;
    background: #fff;
    color: #4b615b;
    font-size: 1.2rem;
}
.flow-live-badge {
    border: 1px solid #dbe2df;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f5f7f6;
    color: #71827d;
    font-size: .62rem;
    font-weight: 850;
}
.flow-live-badge.is-active { border-color: #bfe7d8; background: #eaf9f3; color: #167457; }
.flow-ai-button { border-color: #d7b8e9; background: linear-gradient(145deg, #fff4fc, #f1ebff); color: #8f3f89; }
.flow-ai-button:hover { border-color: #bc82d3; box-shadow: 0 8px 24px rgba(143,63,137,.14); }
.flow-status-button.success { border-color: #238768; background: linear-gradient(145deg, #3aae8c, #218066); color: #fff; }
.flow-status-button.is-active { border-color: #e6b9b9; color: #aa4444; }
.flow-save-state { min-width: 108px; color: #71827d; font-size: .66rem; text-align: right; }
.flow-save-state.is-saving { color: #a26821; }
.flow-save-state.is-saved { color: #197557; }
.flow-save-state.is-error { color: #bd4141; }

.flow-studio-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: 242px minmax(460px, 1fr) 326px;
}
.flow-library, .flow-inspector {
    position: relative;
    z-index: 30;
    min-width: 0;
    overflow: auto;
    background: rgba(255,255,255,.97);
}
.flow-library { display: flex; flex-direction: column; border-right: 1px solid var(--flow-border); }
.flow-inspector { border-left: 1px solid var(--flow-border); }
.flow-library-section { padding: 18px; border-bottom: 1px solid #edf1ef; }
.flow-library-section.grow { min-height: 0; flex: 1; overflow: auto; }
.flow-library select { width: 100%; border: 1px solid var(--flow-border); border-radius: 12px; padding: 10px 11px; outline: none; background: #f9fbfa; font-size: .72rem; }
.flow-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.flow-library-heading strong { display: block; font-size: .77rem; }
.flow-library-heading .eyebrow { margin-bottom: 2px; }
.flow-node-search input { width: 100%; border: 1px solid var(--flow-border); border-radius: 12px; outline: none; padding: 10px 12px; background: #f9fbfa; font-size: .7rem; }
.flow-node-search input:focus { border-color: #70bda8; box-shadow: 0 0 0 4px rgba(47,159,131,.08); }
.flow-node-palette { display: grid; gap: 8px; margin-top: 12px; }
.flow-palette-item {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid #e2e9e6;
    border-radius: 13px;
    padding: 9px 10px;
    background: #fff;
    color: #263733;
    text-align: left;
    transition: .18s ease;
}
.flow-palette-item:hover { border-color: #98cdbf; transform: translateX(2px); box-shadow: 0 8px 22px rgba(30,82,65,.08); }
.flow-palette-item[hidden] { display: none; }
.flow-palette-item strong, .flow-palette-item small { display: block; }
.flow-palette-item strong { font-size: .7rem; }
.flow-palette-item small { margin-top: 2px; color: #7a8b86; font-size: .58rem; line-height: 1.25; }
.flow-palette-item b { color: #76a69a; font-size: 1rem; }
.flow-palette-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #eaf7f2; font-size: .9rem; }
.flow-palette-item.type-question .flow-palette-icon { background: #f2ecff; }
.flow-palette-item.type-image .flow-palette-icon { background: #e7f7ef; }
.flow-palette-item.type-audio .flow-palette-icon { background: #fff1e5; }
.flow-palette-item.type-link .flow-palette-icon { background: #e9f7f7; }
.flow-palette-item.type-wait .flow-palette-icon { background: #eef1f4; }
.flow-palette-item.type-condition .flow-palette-icon { background: #fff7d9; }
.flow-palette-item.type-handoff .flow-palette-icon { background: #ffeded; }
.flow-palette-item.type-ai .flow-palette-icon { background: #fce9f5; }
.flow-add-group {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    margin: 12px;
    border: 1px dashed #9cc8bc;
    border-radius: 13px;
    padding: 10px 13px;
    background: #f4fbf8;
    color: #267a64;
    font-size: .7rem;
    font-weight: 800;
}

.flow-canvas-shell { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--flow-canvas); }
.flow-canvas {
    position: absolute;
    inset: 0;
    overflow: hidden;
    outline: none;
    cursor: grab;
    touch-action: none;
    background-color: var(--flow-canvas);
    background-image:
        radial-gradient(circle, rgba(62,111,96,.2) 1.2px, transparent 1.3px),
        linear-gradient(rgba(61,103,91,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61,103,91,.025) 1px, transparent 1px);
    background-position: var(--flow-grid-x, 0px) var(--flow-grid-y, 0px);
    background-size: var(--flow-grid-size, 24px) var(--flow-grid-size, 24px), calc(var(--flow-grid-size, 24px) * 5) calc(var(--flow-grid-size, 24px) * 5), calc(var(--flow-grid-size, 24px) * 5) calc(var(--flow-grid-size, 24px) * 5);
}
.flow-canvas.is-panning { cursor: grabbing; }
.flow-canvas.is-space-pan { cursor: grab; }
.flow-world {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    transform-origin: 0 0;
    will-change: transform;
}
.flow-groups-layer, .flow-nodes-layer { position: absolute; inset: 0; }
.flow-groups-layer { z-index: 1; }
.flow-edge-layer { position: absolute; z-index: 4; left: -200000px; top: -200000px; width: 400000px; height: 400000px; overflow: visible; pointer-events: none; }
.flow-nodes-layer { z-index: 8; }
.flow-draft-edge { position: absolute; z-index: 12; left: -200000px; top: -200000px; width: 400000px; height: 400000px; overflow: visible; pointer-events: none; }
.flow-edge-shadow { fill: none; stroke: rgba(26,75,61,.13); stroke-width: 8; }
.flow-edge-path { fill: none; stroke: #42a78c; stroke-width: 2.4; }
.flow-edge-path.handle-true { stroke: #28a56e; }
.flow-edge-path.handle-false { stroke: #e17a66; }
.flow-edge-label { fill: #507068; font-size: 11px; font-weight: 800; paint-order: stroke; stroke: #f6f8f7; stroke-width: 4px; }
.flow-draft-path { fill: none; stroke: #2f9f83; stroke-width: 2.5; stroke-dasharray: 8 6; animation: flow-dash .8s linear infinite; }
@keyframes flow-dash { to { stroke-dashoffset: -28; } }

.flow-group {
    --group-color: #2d9b80;
    position: absolute;
    overflow: hidden;
    border: 1px dashed color-mix(in srgb, var(--group-color), #fff 22%);
    border-radius: 24px;
    background: color-mix(in srgb, var(--group-color) 9%, transparent);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
    pointer-events: auto;
}
.flow-group.is-selected { border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--group-color) 16%, transparent); }
.flow-group-head {
    display: flex;
    height: 43px;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    background: color-mix(in srgb, var(--group-color) 13%, rgba(255,255,255,.7));
    color: color-mix(in srgb, var(--group-color), #10231e 42%);
    cursor: move;
    font-size: .7rem;
    font-weight: 850;
}
.flow-group-head::before { width: 9px; height: 9px; border-radius: 50%; background: var(--group-color); content: ""; }
.flow-group-resize {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 24px;
    height: 24px;
    cursor: nwse-resize;
}
.flow-group-resize::after { position: absolute; right: 5px; bottom: 5px; width: 10px; height: 10px; border-right: 2px solid var(--group-color); border-bottom: 2px solid var(--group-color); content: ""; opacity: .65; }

.flow-node {
    --node-color: #378dca;
    position: absolute;
    width: var(--node-width, 280px);
    border: 1px solid color-mix(in srgb, var(--node-color) 42%, #dce5e1);
    border-radius: 17px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 12px 34px rgba(28,59,49,.12);
    user-select: none;
}
.flow-node:hover { box-shadow: 0 17px 42px rgba(28,59,49,.17); }
.flow-node.is-selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--node-color) 18%, transparent), 0 18px 44px rgba(28,59,49,.18); }
.flow-node.is-start { box-shadow: 0 0 0 3px rgba(49,166,119,.18), 0 18px 44px rgba(28,59,49,.16); }
.flow-node-head {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #ebefed;
    padding: 8px 10px;
    border-radius: 16px 16px 0 0;
    background: color-mix(in srgb, var(--node-color) 8%, #fff);
    cursor: move;
}
.flow-node-symbol { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--node-color) 15%, #fff); font-size: .72rem; }
.flow-node-head strong { min-width: 0; flex: 1; overflow: hidden; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.flow-node-start {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #82928e;
    font-size: .78rem;
}
.flow-node-start:hover, .flow-node.is-start .flow-node-start { background: #e4f6ee; color: #1a8a62; }
.flow-node-body { padding: 11px 12px 12px; }
.flow-node-preview {
    overflow: hidden;
    min-height: 62px;
    max-height: 118px;
    border: 1px solid color-mix(in srgb, var(--node-color) 18%, #e7ecea);
    border-radius: 11px;
    padding: 10px;
    background: color-mix(in srgb, var(--node-color) 8%, #fbfdfc);
    color: #50615d;
    font-size: .64rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.flow-node-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: #87958f; font-size: .55rem; }
.flow-node-meta b { border-radius: 999px; padding: 4px 7px; background: #edf7f3; color: #278268; font-size: .52rem; }
.flow-handle {
    position: absolute;
    z-index: 5;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--flow-green);
    box-shadow: 0 2px 8px rgba(14,85,65,.28);
    color: #fff;
    font-size: .48rem;
    cursor: crosshair;
}
.flow-handle.input { left: -9px; top: 75px; }
.flow-handle.output { right: -9px; top: 75px; }
.flow-handle.output.true { top: 65px; background: #25a56e; }
.flow-handle.output.false { top: 103px; background: #df735f; }
.flow-handle-label {
    position: absolute;
    right: 15px;
    top: 64px;
    color: #478a70;
    font-size: .52rem;
    font-weight: 850;
}
.flow-handle-label.false { top: 102px; color: #b85f51; }
.flow-type-text { --node-color: #378dca; }
.flow-type-question { --node-color: #8068d7; }
.flow-type-image { --node-color: #2e9f73; }
.flow-type-audio { --node-color: #e08a42; }
.flow-type-link { --node-color: #2b9a9e; }
.flow-type-wait { --node-color: #74828d; }
.flow-type-condition { --node-color: #d5a62b; }
.flow-type-handoff { --node-color: #d56363; }
.flow-type-ai { --node-color: #c85c9a; }

.flow-canvas-toolbar {
    position: absolute;
    z-index: 25;
    left: 18px;
    top: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--flow-border);
    border-radius: 14px;
    padding: 5px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 30px rgba(34,72,60,.1);
}
.flow-canvas-toolbar button { min-width: 31px; height: 31px; border: 0; border-radius: 9px; background: transparent; color: #536862; font-size: .67rem; font-weight: 800; }
.flow-canvas-toolbar button:hover { background: #edf7f3; color: #19765b; }
.flow-canvas-toolbar output { width: 46px; color: #657872; font-size: .6rem; font-weight: 800; text-align: center; }
.flow-canvas-toolbar span { width: 1px; height: 24px; margin: 0 3px; background: #e2e8e5; }
.flow-canvas-tip {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    border: 1px solid rgba(211,224,218,.9);
    border-radius: 999px;
    padding: 8px 13px;
    background: rgba(255,255,255,.88);
    color: #71837d;
    font-size: .58rem;
    pointer-events: none;
    backdrop-filter: blur(8px);
}
.flow-minimap {
    position: absolute;
    z-index: 24;
    right: 18px;
    bottom: 18px;
    width: 174px;
    height: 112px;
    overflow: hidden;
    border: 1px solid #d7e2dd;
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 32px rgba(32,69,57,.12);
}
.flow-minimap-stage { position: absolute; inset: 0; }
.flow-minimap-node { position: absolute; min-width: 4px; min-height: 3px; border-radius: 2px; background: #4ba88e; opacity: .7; }
.flow-minimap-group { position: absolute; border: 1px solid currentColor; border-radius: 3px; opacity: .28; }
.flow-minimap-viewport { position: absolute; border: 1.5px solid #167a5b; border-radius: 5px; background: rgba(47,159,131,.08); }
.flow-minimap-viewport[hidden] { display: none; }
.flow-fab {
    position: absolute;
    z-index: 26;
    right: 23px;
    top: 19px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #3bb18f, #21846a);
    box-shadow: 0 12px 28px rgba(25,121,92,.3);
    color: #fff;
    font-size: 1.65rem;
}

.flow-inspector-empty { display: grid; min-height: 100%; place-content: center; padding: 34px; text-align: center; }
.flow-inspector-orb { display: grid; width: 68px; height: 68px; place-items: center; margin: 0 auto 18px; border-radius: 22px; background: linear-gradient(145deg,#e8f8f2,#dff0ff); color: #2e9478; font-size: 1.55rem; box-shadow: 0 15px 34px rgba(37,108,86,.1); }
.flow-inspector-empty h3 { margin: 0 0 8px; }
.flow-inspector-empty p { margin: 0; color: #778983; font-size: .72rem; line-height: 1.55; }
.flow-shortcuts { display: grid; gap: 8px; margin-top: 24px; color: #85948f; font-size: .6rem; }
.flow-shortcuts kbd { border: 1px solid #dce4e0; border-bottom-width: 2px; border-radius: 6px; padding: 2px 5px; background: #fff; color: #536760; font-family: inherit; font-size: .55rem; }
.flow-inspector-form { display: flex; min-height: 100%; flex-direction: column; }
.flow-inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid #edf1ef; }
.flow-inspector-head h3 { margin: 0; font-size: 1.02rem; }
.flow-inspector-head .eyebrow { margin-bottom: 3px; }
[data-flow-inspector-fields] { display: grid; gap: 14px; padding: 18px 20px; }
.flow-inspector .field > span { font-size: .66rem; }
.flow-inspector .field input, .flow-inspector .field textarea, .flow-inspector .field select { padding: 10px 11px; border-radius: 11px; font-size: .7rem; }
.flow-inspector .field textarea { min-height: 94px; }
.flow-inspector-help { border-radius: 12px; padding: 11px; background: #f3f8f6; color: #71827d; font-size: .64rem; line-height: 1.5; }
.flow-ai-improve { width: 100%; border: 1px solid #d9c3e7; border-radius: 11px; padding: 9px 11px; background: linear-gradient(145deg,#fff7fc,#f4efff); color: #8b4789; font-size: .64rem; font-weight: 850; text-align: left; }
.flow-ai-improve:hover { border-color: #bc83d0; box-shadow: 0 8px 20px rgba(133,71,137,.1); }
.flow-ai-improve:disabled { opacity: .65; cursor: wait; }
.flow-media-current { overflow: hidden; border: 1px solid #e3e9e6; border-radius: 11px; padding: 10px; color: #71827d; font-size: .61rem; text-overflow: ellipsis; }
.flow-media-upload-state { min-height: 18px; color: #71827d; font-size: .6rem; }
.flow-inspector-connections { display: grid; gap: 8px; margin: 0 20px; border-top: 1px solid #edf1ef; padding: 17px 0; }
.flow-connection-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 11px; padding: 9px 10px; background: #f7faf8; font-size: .62rem; }
.flow-connection-row b { color: #317a66; }
.flow-connection-row button { border: 0; background: transparent; color: #bf4b4b; font-size: .58rem; }
.flow-inspector-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; border-top: 1px solid #edf1ef; padding: 16px 20px; background: #fbfcfb; }

.flow-modal-backdrop {
    position: fixed;
    z-index: 150;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11,29,24,.54);
    backdrop-filter: blur(8px);
}
.flow-modal-backdrop[hidden] { display: none; }
.flow-modal { width: min(900px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; border-radius: 24px; background: #fff; box-shadow: 0 30px 100px rgba(3,20,15,.32); }
.flow-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e8eeeb; padding: 20px 23px; }
.flow-modal > header h3 { margin: 0; }
.flow-modal > header p { max-width: 620px; margin: 5px 0 0; color: #73837e; font-size: .68rem; line-height: 1.45; }
.flow-ai-modal { width: min(1040px, 100%); }
.flow-ai-builder { display: grid; grid-template-columns: .72fr 1.28fr; gap: 24px; padding: 24px; }
.flow-ai-intro { border-radius: 20px; padding: 25px; background: linear-gradient(155deg,#edf9f5,#f4efff 72%,#fff7ed); }
.flow-ai-intro .flow-inspector-orb { margin: 0 0 18px; }
.flow-ai-intro h4 { margin: 0 0 9px; font-size: 1.1rem; }
.flow-ai-intro p { margin: 0; color: #647670; font-size: .72rem; line-height: 1.55; }
.flow-ai-intro ul { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; color: #546861; font-size: .67rem; }
.flow-ai-intro li::before { margin-right: 7px; color: #319879; content: "✓"; font-weight: 900; }
.flow-ai-form { display: grid; align-content: start; gap: 14px; }
.flow-ai-warning { border: 1px solid #ead9a4; border-radius: 12px; padding: 10px 12px; background: #fff9e8; color: #80651c; font-size: .64rem; line-height: 1.45; }
.flow-ai-progress { display: flex; align-items: center; gap: 12px; border-radius: 13px; padding: 12px; background: #f3f8f6; }
.flow-ai-progress[hidden] { display: none; }
.flow-ai-progress strong, .flow-ai-progress small { display: block; }
.flow-ai-progress strong { font-size: .7rem; }
.flow-ai-progress small { margin-top: 2px; color: #71827d; font-size: .58rem; }
.flow-ai-spinner { width: 24px; height: 24px; border: 3px solid #cfe4dc; border-top-color: #2f9f83; border-radius: 50%; animation: flow-spin .8s linear infinite; }
@keyframes flow-spin { to { transform: rotate(360deg); } }
.flow-ai-result { display: grid; gap: 7px; font-size: .66rem; }
.flow-ai-result .ok, .flow-ai-result .error { border-radius: 11px; padding: 10px 12px; }
.flow-ai-result .ok { background: #eaf9f3; color: #187153; }
.flow-ai-result .error { background: #fff0f0; color: #a84141; }
.flow-simulator-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; padding: 23px; }
.flow-test-controls { display: grid; align-content: start; gap: 14px; }
.flow-test-session-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dce8e3; border-radius: 14px; padding: 11px 12px; background: #f5faf8; }
.flow-test-session-bar strong { display: block; font-size: .7rem; }
.flow-test-session-bar .eyebrow { margin-bottom: 2px; }
.flow-test-session-bar .button { min-height: 36px; padding: 7px 10px; font-size: .63rem; }
.flow-test-controls > .muted { margin: 0; font-size: .65rem; }
.flow-validation-result { display: grid; gap: 7px; font-size: .64rem; line-height: 1.45; }
.flow-validation-result .ok, .flow-validation-result .warn, .flow-validation-result .error { border-radius: 10px; padding: 9px 10px; }
.flow-validation-result .ok { background: #eaf9f3; color: #187153; }
.flow-validation-result .warn { background: #fff8df; color: #8b6b18; }
.flow-validation-result .error { background: #fff0f0; color: #a84141; }
.flow-phone { overflow: hidden; min-height: 480px; border: 7px solid #18342c; border-radius: 28px; background: #eae8e2; }
.flow-phone-top { display: flex; align-items: center; gap: 10px; padding: 14px; background: #fafbf9; }
.flow-phone-top strong, .flow-phone-top small { display: block; }
.flow-phone-top strong { font-size: .7rem; }
.flow-phone-top small { color: #298568; font-size: .57rem; }
.flow-phone-chat { display: flex; min-height: 420px; max-height: 540px; flex-direction: column; gap: 9px; overflow: auto; padding: 16px; background-color: #ece9e2; background-image: radial-gradient(rgba(41,81,68,.06) 1px,transparent 1px); background-size: 14px 14px; }
.flow-test-bubble { width: fit-content; max-width: 84%; border-radius: 13px; padding: 10px 11px; background: #fff; box-shadow: 0 3px 8px rgba(35,52,45,.08); font-size: .67rem; line-height: 1.45; white-space: pre-wrap; }
.flow-test-bubble.customer { margin-left: auto; border-bottom-right-radius: 4px; background: #d7f4e5; }
.flow-test-bubble.system { margin: 2px auto; background: rgba(255,255,255,.7); color: #6c7b76; font-size: .57rem; text-align: center; }
.flow-test-bubble.handoff { border-left: 3px solid #d76962; background: #fff1f1; }
.flow-test-bubble.ai { border-left: 3px solid #c85c9a; background: #fff0fa; }
.flow-toast {
    position: fixed;
    z-index: 200;
    right: 22px;
    bottom: 22px;
    max-width: 360px;
    border: 1px solid #cce9de;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f0fbf7;
    box-shadow: 0 20px 55px rgba(19,61,48,.18);
    color: #176d51;
    font-size: .7rem;
}
.flow-toast.error { border-color: #efcaca; background: #fff1f1; color: #a23f3f; }
.flow-toast[hidden] { display: none; }

.flow-editor-launch { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: linear-gradient(135deg,#f5fcf9,#eef8ff); }
.flow-editor-launch h3 { margin: 0 0 6px; }
.flow-editor-launch p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }

@media (max-width: 1280px) {
    .flow-studio-grid { grid-template-columns: 218px minmax(420px, 1fr) 292px; }
    .flow-studio-actions .button { padding-inline: 11px; }
}
@media (max-width: 1080px) {
    .flow-studio-grid { grid-template-columns: 205px minmax(0, 1fr); }
    .flow-inspector { position: absolute; z-index: 80; right: 0; top: 76px; bottom: 0; width: min(340px, 92vw); box-shadow: -20px 0 50px rgba(20,46,38,.16); transform: translateX(102%); transition: .22s ease; }
    .flow-inspector.has-selection { transform: translateX(0); }
    .flow-studio-actions [data-flow-validate] { display: none; }
}
@media (max-width: 820px) {
    .flow-studio-page .sidebar { display: none; }
    .flow-studio-page .app-shell { display: block; }
    .flow-studio-bar { min-height: 70px; padding: 9px 12px; }
    .flow-studio-title .eyebrow, .flow-live-badge, .flow-save-state { display: none; }
    .flow-studio-actions [data-flow-test] { display: none; }
    .flow-studio-grid { grid-template-columns: 1fr; }
    .flow-library { position: absolute; z-index: 90; left: 0; top: 70px; bottom: 0; width: min(260px, 88vw); box-shadow: 20px 0 50px rgba(20,46,38,.16); transform: translateX(-102%); transition: .22s ease; }
    .flow-library.is-open { transform: translateX(0); }
    .flow-canvas-toolbar { left: 11px; top: 11px; }
    .flow-minimap { display: none; }
    .flow-fab { right: 14px; top: 14px; }
    .flow-canvas-tip { max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .flow-simulator-grid { grid-template-columns: 1fr; }
    .flow-ai-builder { grid-template-columns: 1fr; }
    .flow-ai-intro { display: none; }
}
@media (max-width: 560px) {
    .flow-studio-title h2 { max-width: 150px; font-size: .84rem; }
    .flow-studio-actions .button { min-height: 38px; padding: 8px 10px; font-size: .68rem; }
    .flow-studio-actions [data-flow-save] { font-size: 0; }
    .flow-studio-actions [data-flow-save]::after { content: "Salvar"; font-size: .68rem; }
    .flow-modal-backdrop { padding: 8px; }
    .flow-modal { border-radius: 18px; }
}
