.flow-shell {
  height: calc(100vh - 190px);
  min-height: 590px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow)
}

.flow-content {
  width: 100%;
  max-width: none;
  height: calc(100vh - 68px);
  margin: 0;
  padding: 0;
  overflow: hidden
}

.flow-content .flow-shell {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none
}

.flow-toolbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fff
}

.flow-segment {
  display: flex;
  padding: 3px;
  background: #f1f2ee;
  border-radius: 8px
}

.flow-segment button {
  height: 30px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer
}

.flow-segment button.active {
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 5px #dfe1db
}

.flow-search {
  width: 230px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px
}

.flow-search svg {
  width: 14px;
  color: var(--faint)
}

.flow-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px
}

.flow-spacer {
  flex: 1
}

.flow-tool {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer
}

.flow-tool:hover {
  border-color: #bdc9c1;
  background: #f8faf8
}

.flow-create-tool {
  border-color: #315d4b;
  background: #315d4b;
  color: #fff
}

.flow-create-tool:hover {
  border-color: #274d3e;
  background: #274d3e
}

.flow-create-tool:disabled {
  border-color: #cbd1cc;
  background: #cbd1cc;
  cursor: not-allowed
}

.flow-icon-tool {
  width: 32px;
  padding: 0;
  font-size: 16px
}

.flow-zoom {
  width: 38px;
  text-align: center;
  color: var(--muted);
  font-size: 8.5px
}

.flow-stage-wrap {
  position: relative;
  height: calc(100% - 58px);
  display: flex;
  min-height: 0
}

.flow-stage {
  position: relative;
  overflow: hidden;
  flex: 1;
  cursor: grab;
  background-color: #f8f9f6;
  background-image: radial-gradient(#d8ddd6 1px, transparent 1px);
  background-size: 22px 22px;
  touch-action: none
}

.flow-stage.panning {
  cursor: grabbing
}

.flow-floating-title {
  position: absolute;
  z-index: 6;
  top: 18px;
  left: 20px;
  max-width: min(390px, calc(100% - 40px));
  padding: 12px 15px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(221, 225, 218, .9);
  border-radius: 11px;
  box-shadow: 0 7px 24px rgba(42, 52, 45, .07);
  backdrop-filter: blur(10px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none
}

.flow-floating-title h1 {
  margin: 0;
  font: 800 18px/1.2 Manrope
}

.flow-floating-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px
}

.flow-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1600px;
  height: 1000px;
  transform-origin: 0 0
}

.flow-plane {
  position: absolute;
  inset: 0;
  width: 1600px;
  height: 1000px;
  transform-origin: 0 0
}

.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  shape-rendering: geometricPrecision
}

.flow-line {
  fill: none;
  stroke: #bdcbc3;
  stroke-width: 2
}

.flow-line.account-line {
  stroke: #d4d9d3;
  stroke-width: 1.5;
  stroke-dasharray: 4 4
}

.flow-line-glow {
  fill: none;
  stroke: rgba(87, 153, 119, .08);
  stroke-width: 9
}

.flow-nodes {
  position: absolute;
  inset: 0
}

.flow-node {
  position: absolute;
  width: 190px;
  min-height: 74px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dfe2dc;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(45, 55, 47, .08);
  cursor: grab;
  user-select: none;
  transition: border-color .16s, box-shadow .16s, opacity .16s
}

.flow-node:hover,
.flow-node.selected {
  border-color: #6ca487;
  box-shadow: 0 9px 24px rgba(48, 95, 70, .16)
}

.flow-node.dragging {
  cursor: grabbing;
  z-index: 5;
  box-shadow: 0 15px 35px rgba(38, 55, 46, .2)
}

.flow-node-add {
  position: absolute;
  z-index: 3;
  right: 8px;
  top: 8px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #cddbd3;
  background: #f4f8f5;
  color: #46765f;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer
}

.flow-node-add:hover {
  border-color: #70a187;
  background: #e7f1eb
}

.flow-node.workspace .flow-node-add {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #fff
}

.flow-node.dimmed {
  opacity: .16;
  pointer-events: none
}

.flow-node.hidden-node {
  display: none
}

.flow-node.workspace {
  width: 220px;
  padding: 15px;
  background: linear-gradient(140deg, #1d302a, #2e4c41);
  border-color: #1d302a;
  color: #fff
}

.flow-node.persona {
  border-left: 4px solid #65a17f
}

.flow-node.account {
  width: 174px;
  min-height: 64px;
  border-left: 4px solid #8ca1ce
}

.flow-node-top {
  display: flex;
  align-items: center;
  gap: 9px
}

.flow-node-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  background: #e4f0e9;
  color: #4b8367;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase
}

.workspace .flow-node-icon {
  background: rgba(255, 255, 255, .14);
  color: #d7eee2
}

.account .flow-node-icon {
  background: #e9edf7;
  color: #657dae
}

.flow-node-copy {
  display: grid;
  min-width: 0
}

.flow-node.can-create .flow-node-copy {
  padding-right: 20px
}

.flow-node-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 11px Manrope
}

.flow-node-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 8px
}

.workspace .flow-node-copy small {
  color: #a9c3b7
}

.flow-node-meta {
  display: flex;
  gap: 5px;
  margin-top: 9px
}

.flow-node-meta span {
  padding: 3px 6px;
  background: #f1f3ef;
  border-radius: 5px;
  color: #7a7e77;
  font-size: 7px
}

.workspace .flow-node-meta span {
  background: rgba(255, 255, 255, .1);
  color: #c5d9cf
}

.flow-port {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #fff;
  border: 2px solid #78a88e;
  border-radius: 50%
}

.flow-port.in {
  left: -6px;
  top: 50%;
  transform: translateY(-50%)
}

.flow-port.out {
  right: -6px;
  top: 50%;
  transform: translateY(-50%)
}

.flow-loading {
  position: absolute;
  left: 650px;
  top: 370px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px
}

.flow-hint {
  position: absolute;
  left: 14px;
  bottom: 13px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--faint);
  font-size: 7.5px;
  pointer-events: none;
  backdrop-filter: blur(5px)
}

.flow-inspector {
  width: 0;
  overflow: hidden;
  min-height: 0;
  background: #fff;
  border-left: 0 solid var(--line);
  transition: width .22s ease;
  position: relative
}

.flow-inspector.open {
  width: 300px;
  border-left-width: 1px
}

.flow-inspector-close {
  position: absolute;
  right: 13px;
  top: 12px;
  width: 29px;
  height: 29px;
  border: 0;
  background: #f1f2ee;
  border-radius: 8px;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer
}

.flow-inspector-empty,
.flow-inspector-content {
  width: 300px;
  padding: 55px 22px 22px
}

.flow-inspector-content {
  box-sizing: border-box;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch
}

.flow-inspector-empty {
  text-align: center
}

.flow-inspector-empty>span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 50px auto 15px;
  background: #e7f1eb;
  color: #4f896d;
  border-radius: 12px
}

.flow-inspector-empty svg {
  width: 19px
}

.flow-inspector h3 {
  margin: 0 0 7px;
  font: 700 14px Manrope
}

.flow-inspector p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px
}

.flow-detail-type {
  display: inline-flex;
  padding: 4px 7px;
  margin-bottom: 12px;
  background: #e6f0ea;
  color: #4b8067;
  border-radius: 6px;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em
}

.flow-detail-title {
  margin: 0 0 6px !important;
  font-size: 17px !important
}

.flow-detail-subtitle {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line)
}

.flow-detail-list {
  display: grid;
  gap: 13px;
  margin: 18px 0
}

.flow-detail-list div {
  display: grid;
  gap: 3px
}

.flow-detail-list dt {
  color: var(--faint);
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: .07em
}

.flow-detail-list dd {
  margin: 0;
  color: #4e514c;
  font-size: 9.5px
}

.flow-related {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid var(--line)
}

.flow-related h4 {
  margin: 0 0 9px;
  font-size: 9px
}

.flow-related-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 8.5px
}

.flow-related-item i {
  width: 7px;
  height: 7px;
  background: #79a98f;
  border-radius: 50%
}

.flow-inspector-actions {
  display: flex;
  gap: 7px;
  margin-top: 18px
}

.flow-error {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  padding: 15px;
  background: #fff;
  border: 1px solid #edcbc4;
  border-radius: 10px;
  color: #925244;
  font-size: 10px
}

@media(max-width:1000px) {
  .flow-shell {
    height: calc(100vh - 175px)
  }

  .flow-inspector.open {
    position: absolute;
    z-index: 8;
    right: 0;
    top: 0;
    bottom: 0;
    width: 290px;
    box-shadow: -10px 0 30px rgba(40, 48, 42, .1)
  }

  .flow-search {
    width: 190px
  }
}

@media(max-width:650px) {
  .flow-shell {
    height: calc(100vh - 155px);
    min-height: 520px
  }

  .flow-toolbar {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 9px
  }

  .flow-search {
    order: 3;
    width: 100%
  }

  .flow-stage-wrap {
    height: calc(100% - 96px)
  }

  .flow-segment button {
    padding: 0 8px
  }

  .flow-inspector.open {
    width: 100%
  }

  .flow-inspector-empty,
  .flow-inspector-content {
    width: 100%
  }

  .flow-hint {
    display: none
  }

  .flow-floating-title {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px)
  }
}
