:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  color: #29303a;
  background: #fff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: white;
  border: 1px solid #d6dae0;
  border-radius: 5px;
  padding: 7px 11px;
  cursor: pointer;
  line-height: 1.4;
}
button:hover {
  background: #f2f4f7;
  border-color: #b9c0cb;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #6682ad;
  outline-offset: 3px;
}
button.primary {
  background: #344c71;
  border-color: #344c71;
  color: white;
}
button.primary:hover {
  background: #263d60;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d6dae0;
  border-radius: 5px;
  padding: 8px 10px;
  background: white;
  min-width: 0;
}
input[type="color"] {
  width: 65px;
  padding: 3px;
  height: 33px;
}
input[type="checkbox"] {
  width: auto;
  accent-color: #49688e;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin: 15px 0 6px;
  line-height: 1.5;
}
small {
  color: #7a8494;
  font-size: 11px;
  font-weight: 400;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.45px;
}
h2 {
  font-size: 13px;
  font-weight: 600;
}
h3 {
  font-size: 12px;
  font-weight: 600;
}
.app-header {
  height: 57px;
  border-bottom: 1px solid #e0e3e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  gap: 12px;
}
.app-header nav {
  display: flex;
  gap: 6px;
}
.app-header nav button {
  border-color: transparent;
  padding: 7px 18px;
}
.app-header nav button[aria-current="page"] {
  background: #edf1f6;
  color: #334d73;
  font-weight: 600;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  height: calc(100dvh - 57px);
  min-height: 500px;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fafbfc;
}
.workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #e9ebef;
  background: #fff;
  min-height: 64px;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.canvas-controls {
  gap: 5px;
  margin-left: auto;
}
.canvas-controls button {
  padding: 5px 9px;
}
.canvas-controls span {
  min-width: 42px;
  text-align: center;
  color: #798393;
  font-size: 11px;
}
.tool-message {
  font-size: 12px;
  color: #536b8b;
}
.canvas-wrap {
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background-color: #fbfcfd;
  background-image: radial-gradient(#d5dae2 0.8px, transparent 0.8px);
  background-size: 22px 22px;
}
#map {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
#map.grabbing,
#map.grabbing .map-node {
  cursor: grabbing;
}
.map-node {
  cursor: grab;
  outline: none;
}
.map-node .node-body {
  fill: #fff;
  stroke: #cbd2dc;
  stroke-width: 1;
  filter: drop-shadow(0 3px 5px #25374f0a);
}
.map-node.selected .node-body {
  stroke: #5e7ba8;
  stroke-width: 2;
  fill: #fbfcff;
}
.map-node:hover .node-body,
.map-node:focus-visible .node-body {
  stroke: #5e7ba8;
  stroke-width: 2;
}
.map-node.connecting .node-body {
  stroke: #587ba6;
  stroke-width: 3;
  stroke-dasharray: 6 4;
}
.map-node text {
  pointer-events: none;
}
.node-name {
  font-size: 17px;
  font-weight: 600;
  fill: #2f3847;
}
.node-state {
  font-size: 10.5px;
  fill: #8791a0;
}
.node-state.current {
  fill: #315b8e;
  font-weight: 700;
}
.node-meta {
  font-size: 10px;
  fill: #a0a7b1;
}
.map-relation {
  cursor: pointer;
  outline: none;
}
.relation-line {
  fill: none;
  stroke: #acb5c3;
  stroke-width: 1.4;
}
.relation-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 17;
}
.map-relation text {
  font-size: 11px;
  fill: #778498;
  paint-order: stroke;
  stroke: #fbfcfd;
  stroke-width: 5;
  stroke-linejoin: round;
}
.map-relation.selected .relation-line,
.map-relation:hover .relation-line,
.map-relation:focus-visible .relation-line {
  stroke: #43658e;
  stroke-width: 2.5;
}
.map-relation.selected text {
  fill: #355780;
}
.inspector {
  border-left: 1px solid #dde2e9;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.inspector-heading {
  padding: 22px 22px 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}
.panel-tabs {
  display: flex;
  padding: 0 20px;
  gap: 18px;
  border-bottom: 1px solid #e5e8ed;
  flex-shrink: 0;
}
.panel-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 2px;
  background: transparent;
  color: #89919d;
}
.panel-tabs button[aria-selected="true"] {
  color: #334f76;
  border-bottom-color: #5b79a4;
  font-weight: 600;
}
.panel-body {
  padding: 2px 22px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.panel-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e5e8ed;
  flex-shrink: 0;
  background: #fff;
}
.panel-footer button {
  font-size: 12px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
}
.section-label button {
  font-size: 11px;
  padding: 5px 8px;
}
.field-row,
.field-labels {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 90px 52px;
  gap: 7px;
  margin: 8px 0;
  align-items: center;
}
.field-labels {
  font-size: 10px;
  color: #949ca9;
}
.field-row input,
.field-row select {
  padding: 7px;
  font-size: 12px;
}
.field-row button {
  font-size: 10px;
  padding: 6px 5px;
}
.process-diagram {
  display: block;
  width: 100%;
  margin: 14px 0 8px;
  overflow: visible;
}
.process-diagram rect {
  fill: #fff;
  stroke: #d2d9e3;
  stroke-width: 1;
}
.process-diagram rect.selected {
  fill: #edf3fb;
  stroke: #7893b8;
  stroke-width: 1.5;
}
.process-diagram [role="button"] {
  cursor: pointer;
  outline: none;
}
.process-diagram [role="button"]:focus-visible rect {
  stroke: #315b8e;
  stroke-width: 2;
}
.process-diagram text {
  font-size: 11px;
  fill: #364255;
  pointer-events: none;
}
.process-diagram .phase-detail {
  font-size: 9px;
  fill: #98a1af;
}
.process-line {
  fill: none;
  stroke: #b8c1ce;
  stroke-width: 1.4;
  cursor: pointer;
}
.process-line.selected {
  stroke: #52749f;
  stroke-width: 2.5;
}
.process-actions {
  justify-content: flex-end;
  margin: 8px 0 16px;
}
.process-actions button {
  font-size: 11px;
  padding: 5px 8px;
}
.definition-box {
  background: #f8f9fb;
  border: 1px solid #e2e6ec;
  border-radius: 6px;
  padding: 0 13px 13px;
  margin: 12px 0;
}
.definition-box .section-label {
  margin: 13px 0 5px;
}
.definition-box label {
  font-size: 11px;
  margin-top: 12px;
}
.checks {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 2px;
}
.checks label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-weight: 400;
  margin: 0;
  font-size: 12px;
}
.checks input {
  margin: 0;
}
.transition-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.transition-list button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
}
.transition-list button.selected {
  border-color: #7893b8;
  background: #f5f8fc;
}
.transition-list strong {
  font-size: 12px;
  font-weight: 500;
}
.transition-list span {
  font-size: 11px;
  color: #8d96a3;
}
.transition-list small {
  font-size: 10px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.condition {
  padding: 0 10px 10px;
  border: 1px solid #d9e0e9;
  border-radius: 4px;
  margin: 9px 0;
  background: white;
}
.condition select {
  font-size: 11px;
  padding: 7px 5px;
}
.condition-bottom {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}
.condition-bottom button {
  font-size: 10px;
  white-space: nowrap;
}
.relation-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  width: 100%;
  margin-bottom: 9px;
  padding: 12px;
}
.relation-card span {
  font-size: 11px;
  color: #8591a1;
}
.relation-card strong {
  font-size: 12px;
  font-weight: 500;
}
.relation-preview {
  margin: 24px 0;
  background: #f6f8fb;
  padding: 18px 12px;
  border-radius: 5px;
  font-size: 13px;
}
.relation-preview span {
  margin: 0 10px;
  color: #8fa2ba;
}
.empty-inline {
  font-size: 12px;
  color: #9aa3af;
  padding: 12px 0;
  display: block;
  line-height: 1.5;
}
.error {
  background: #fff3ed;
  color: #9a4a28;
  border: 1px solid #efcfba;
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 5px;
  margin: 14px 0;
}
.error:empty {
  display: none;
}
.record-code {
  margin-left: auto;
  color: #9ba4b1;
  font-size: 11px;
}
.record-state {
  padding: 0 22px 14px;
  border-bottom: 1px solid #e5e8ed;
}
.record-state span {
  display: inline-block;
  padding: 4px 9px;
  font-size: 11px;
  color: #4a6b92;
  background: #edf3f9;
  border: 1px solid #dbe6f1;
  border-radius: 4px;
}
.record-relation {
  padding: 0 0 12px;
  border-bottom: 1px solid #edf0f4;
}
.record-relation label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.record-relation select {
  font-size: 12px;
}
.linked-record {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0;
  padding: 6px 0;
}
.linked-record > .link-name {
  flex: 1;
  text-align: left;
  border: 0;
  background: none;
  padding: 3px 0;
  color: #48648a;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.linked-record > button:not(.link-name) {
  font-size: 10px;
  padding: 4px 6px;
}
.save-record-row {
  justify-content: flex-end;
  margin: 18px 0;
}
.try-transition {
  padding: 12px;
  border: 1px solid #dfe5ed;
  border-radius: 6px;
  margin-bottom: 9px;
  background: #fafbfc;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.try-transition.ready {
  background: #f5f9f6;
  border-color: #d5e2d6;
}
.try-transition.ready button {
  border-color: #a6bfac;
  color: #426f4d;
}
.try-transition.blocked button {
  color: #8993a0;
  background: #f4f5f7;
  border-color: #dce0e7;
}
.try-transition button {
  font-size: 12px;
}
.target-state {
  margin-left: auto;
  color: #8591a0;
  font-size: 11px;
}
.try-transition ul {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.7;
  color: #9b775b;
  flex-basis: 100%;
}
.history-block {
  margin-top: 26px;
  font-size: 12px;
}
.history-block summary {
  cursor: pointer;
  font-weight: 500;
}
.history-block ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.history-block li {
  white-space: pre-wrap;
  border-top: 1px solid #edf0f4;
  padding: 10px 0;
  font-size: 11px;
  line-height: 1.65;
  color: #637184;
}
.history-block time {
  display: block;
  color: #a0a8b3;
  font-size: 10px;
  margin-bottom: 3px;
}
#sample-select {
  max-width: 350px;
  min-width: 150px;
  font-size: 12px;
}
.sandbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-top: 1px solid #e2e6ed;
  background: white;
  font-size: 11px;
  color: #939ba8;
}
.sandbox-footer button {
  font-size: 11px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
dialog {
  border: 1px solid #d9dfe7;
  border-radius: 9px;
  padding: 0;
  width: min(480px, calc(100vw - 24px));
  max-height: 90dvh;
  color: #29303a;
  box-shadow: 0 20px 70px #1e2b4322;
}
dialog::backdrop {
  background: #1f2d4240;
  backdrop-filter: blur(2px);
}
dialog header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e4e8ee;
}
dialog h2 {
  font-size: 16px;
}
dialog header button {
  font-size: 11px;
}
.dialog-body {
  padding: 0 20px 22px;
}
dialog footer {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e4e8ee;
}
#toast {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 17px;
  background: #34465f;
  color: white;
  border-radius: 6px;
  box-shadow: 0 5px 20px #14203720;
  z-index: 20;
  max-width: 90vw;
  font-size: 12px;
}
@media (min-width: 1650px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr) 450px;
  }
  .panel-body {
    padding-left: 26px;
    padding-right: 26px;
  }
}
@media (max-width: 1100px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr) 370px;
  }
  .workspace-toolbar {
    padding: 10px;
  }
  .inspector-heading {
    padding: 18px;
  }
  .panel-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .panel-footer {
    padding: 12px;
  }
  .canvas-controls {
    margin-left: 0;
  }
  .workspace-toolbar .actions button {
    font-size: 11px;
  }
}
@media (max-width: 760px) {
  .workbench {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - 57px);
  }
  .workspace {
    height: 46dvh;
    min-height: 350px;
  }
  .canvas-wrap {
    min-height: 220px;
  }
  .inspector {
    border-left: 0;
    border-top: 1px solid #dbe2eb;
    max-height: none;
    overflow: visible;
  }
  .panel-body {
    overflow: visible;
  }
  .panel-footer {
    position: sticky;
    bottom: 0;
  }
  .workspace-toolbar {
    gap: 7px;
  }
  .app-header {
    padding: 0 10px;
  }
  .app-header nav button {
    padding: 7px 12px;
  }
  .workspace-toolbar .actions {
    gap: 5px;
  }
  #sample-select {
    max-width: 240px;
  }
  .inspector-heading {
    padding-bottom: 12px;
  }
  .process-diagram {
    max-height: 320px;
  }
  .canvas-controls button {
    padding: 4px 7px;
  }
}
.workspace-toolbar > .actions:first-child {
  flex: 1;
  min-width: 0;
}
#sample-select {
  width: 320px;
}
@media (max-width: 760px) {
  #sample-select {
    width: 220px;
  }
}
.flow-layout {
  height: calc(100dvh - 57px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 500px;
}
.flow-layout.with-inspector {
  grid-template-columns: minmax(0, 1fr) 410px;
}
.flow-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fafbfc;
}
.flow-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 20px;
  background: white;
  border-bottom: 1px solid #e3e7ed;
  flex-wrap: wrap;
}
#flow-search {
  max-width: 225px;
}
#flow-context {
  max-width: 290px;
  font-size: 12px;
}
.flow-total {
  margin-left: auto;
  font-size: 11px;
  color: #929cab;
  white-space: nowrap;
}
.type-filter {
  position: relative;
  min-width: 140px;
  font-size: 12px;
}
.type-filter summary {
  padding: 9px 12px;
  border: 1px solid #d6dae0;
  border-radius: 5px;
  cursor: pointer;
  background: white;
}
.type-filter-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 4;
  width: 230px;
  padding: 12px;
  background: white;
  border: 1px solid #d8dfe8;
  border-radius: 6px;
  box-shadow: 0 8px 30px #26354d15;
}
.type-filter-menu label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 7px 3px;
  font-size: 12px;
}
.type-filter-menu button {
  margin-top: 8px;
  width: 100%;
  font-size: 11px;
}
.flow-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(205px, 1fr));
  gap: 14px;
  padding: 22px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.flow-column {
  min-height: 300px;
  background: #f0f2f6;
  border: 1px solid #e4e8ee;
  border-radius: 7px;
  padding: 13px 10px;
}
.flow-column.over {
  background: #e5edf7;
  border-color: #95adcf;
}
.flow-column > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 4px 16px;
  gap: 8px;
}
.flow-column > header h2 {
  font-size: 12px;
  font-weight: 600;
  color: #5c6b80;
}
.flow-column > header span {
  font-size: 10px;
  background: #e4e8ef;
  color: #8b96a5;
  border-radius: 4px;
  min-width: 19px;
  text-align: center;
  padding: 2px 4px;
}
.flow-card {
  padding: 14px 12px;
  margin-bottom: 10px;
  border: 1px solid #dbe1e9;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 3px #26354d06;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
  outline-offset: 3px;
}
.flow-card:hover,
.flow-card.selected {
  border-color: #8ba6cb;
}
.flow-card.dragging {
  opacity: 0.5;
}
.flow-card > * {
  pointer-events: none;
}
.flow-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  gap: 5px;
}
.flow-card-top > span {
  font-size: 10px;
  color: #78859a;
  display: flex;
  align-items: center;
  gap: 5px;
}
.flow-card-top i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  display: inline-block;
}
.flow-card-top small {
  font-size: 9px;
  color: #a2acb9;
}
.flow-card strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 12px;
}
.flow-own-state {
  display: inline-block;
  border: 1px solid #e4e9f0;
  background: #f7f9fc;
  color: #77869c;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
}
.flow-panel-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px 0;
}
.flow-panel-toolbar button {
  font-size: 11px;
}
.record-state {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.record-state > small {
  font-size: 11px;
  color: #8897aa;
}
.move-context {
  padding: 18px 0;
  font-size: 14px;
  font-weight: 500;
}
.move-context span {
  display: block;
  font-size: 12px;
  color: #8291a6;
  font-weight: 400;
  margin-top: 7px;
}
@media (max-width: 1100px) {
  .flow-layout.with-inspector {
    grid-template-columns: minmax(0, 1fr) 370px;
  }
  .flow-board {
    padding: 16px;
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .flow-layout,
  .flow-layout.with-inspector {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - 57px);
  }
  .flow-board {
    min-height: 420px;
    padding: 12px;
  }
  .flow-toolbar {
    padding: 12px;
    gap: 8px;
  }
  #flow-search {
    max-width: none;
  }
  #flow-context {
    max-width: none;
    flex: 1;
  }
  .flow-inspector {
    max-height: none;
  }
  .flow-total {
    margin-left: 0;
  }
}

.open-process {
  width: 100%;
  margin-top: 14px;
}
.process-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  height: calc(100dvh - 57px);
}
.process-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.process-scroll {
  overflow: auto;
  flex: 1;
  background: #f7f9fc;
}
.process-surface {
  position: relative;
  width: 1250px;
  min-height: 100%;
}
.process-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 250px);
}
.process-lanes section {
  border-right: 1px solid #dce2ec;
}
.process-lanes section:nth-child(even) {
  background: #edf1f766;
}
.process-lanes section.over {
  background: #dce7f5;
}
.process-lanes header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
}
.process-lanes h2 {
  font-size: 13px;
  color: #526782;
}
.process-lanes header button {
  padding: 3px 10px;
  font-size: 20px;
}
.process-wires {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.process-wire {
  cursor: pointer;
  pointer-events: auto;
}
.wire-hit {
  stroke: transparent;
  stroke-width: 14;
  fill: none;
}
.wire-line {
  stroke: #94a3b8;
  stroke-width: 1.5;
  fill: none;
}
.process-wire.selected .wire-line {
  stroke: #345b92;
  stroke-width: 3;
}
.process-wire text {
  font-size: 10px;
  fill: #526782;
  paint-order: stroke;
  stroke: #f7f9fc;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.process-state-card {
  position: absolute;
  width: 202px;
  height: 96px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: 0 2px 5px #283b5010;
  overflow: hidden;
  cursor: grab;
}
.process-state-card.selected {
  border-color: #6688b9;
  box-shadow: 0 0 0 1px #6688b9;
}
.process-state-card.link-source {
  border: 2px dashed #5275a7;
}
.process-state-select {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  padding: 12px;
  border-radius: 0;
}
.process-state-select strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.process-state-select small {
  display: block;
  margin-top: 4px;
}
.process-connect {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid #e5eaf1;
  border-radius: 0;
  padding: 4px 12px;
  text-align: right;
  font-size: 11px;
}
.process-inspector .process-actions {
  display: none;
}
@media (max-width: 760px) {
  .process-layout {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .process-scroll {
    height: 480px;
    flex: none;
  }
  .process-inspector {
    max-height: none;
  }
  .process-workspace .workspace-toolbar {
    flex-wrap: wrap;
  }
}

.process-inspector {
  position: absolute;
  z-index: 10;
  top: 76px;
  right: 16px;
  bottom: 16px;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: white;
  border: 1px solid #d6deea;
  border-radius: 8px;
  box-shadow: 0 8px 30px #24385124;
}
.process-inspector[hidden] {
  display: none;
}
.process-detail-toolbar {
  padding: 10px 16px;
  border-bottom: 1px solid #e5eaf1;
  display: flex;
  justify-content: flex-end;
}
.process-wire:hover .wire-line,
.process-wire:focus .wire-line {
  stroke: #345b92;
  stroke-width: 3;
}
.process-wire-tooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  padding: 7px 10px;
  background: #293b55;
  color: white;
  border-radius: 5px;
  font-size: 12px;
  max-width: calc(100vw - 16px);
  overflow-wrap: anywhere;
  box-shadow: 0 3px 10px #24385124;
}
.process-drop-marker {
  position: absolute;
  width: 202px;
  height: 3px;
  background: #436da6;
  pointer-events: none;
  z-index: 4;
  border-radius: 2px;
}
.process-workspace .workspace-toolbar {
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 760px) {
  .process-inspector {
    position: fixed;
    top: 140px;
    bottom: 16px;
  }
}

/* Responsive process layout: geometry changes, typography does not scale. */
.process-layout.with-details {
  grid-template-columns: minmax(0, 1fr) 350px;
}
.process-layout {
  overflow: hidden;
}
.process-surface {
  width: 100%;
}
.process-scroll {
  overflow-x: hidden;
  scrollbar-width: none;
}
.process-scroll::-webkit-scrollbar {
  width: 0;
}
.process-lanes {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.process-lanes header {
  padding: 16px 12px;
  gap: 6px;
}
.process-lanes h2 {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.process-lanes header button {
  font-size: 16px;
  padding: 1px 7px;
}
.process-state-card {
  height: 80px;
}
.process-state-select {
  padding: 8px 10px;
  height: 55px;
}
.process-state-select strong {
  font-size: 12px;
}
.process-state-select small {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.process-connect {
  height: 24px;
  padding: 3px 10px;
  font-size: 10px;
}
.process-inspector {
  position: static;
  width: 350px;
  max-width: none;
  border-radius: 0;
  border-width: 0 0 0 1px;
  box-shadow: none;
  min-height: 0;
}
@media (max-width: 760px) {
  .process-layout {
    height: auto;
  }
  .process-layout.with-details {
    display: flex;
  }
  .process-inspector {
    position: static;
    width: 100%;
    border-width: 1px 0 0;
  }
  .process-lanes header {
    flex-direction: column;
    align-items: center;
    padding: 10px 2px;
  }
  .process-lanes h2 {
    font-size: 10px;
    text-align: center;
  }
  .process-state-select {
    padding: 8px 3px;
  }
  .process-connect {
    padding: 3px 0;
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .app-header {
    flex-wrap: wrap;
  }
}
.app-header {
  gap: 12px;
}
.app-header nav {
  margin-right: auto;
}
@media (max-width: 760px) {
  .app-header {
    height: auto;
    min-height: 57px;
  }
  .app-header nav {
    order: 3;
    flex-basis: 100%;
  }
}
/* The grid row grows with the longest loaded column, inside the scroll area. */
.flow-board {
  grid-auto-rows: minmax(max-content, 1fr);
}
.flow-column {
  min-width: 0;
}
.flow-load-more {
  width: 100%;
  margin-top: 6px;
  font-size: 12px;
}
.flow-moving-card {
  cursor: grabbing;
  overflow: hidden;
}
.type-filter-menu {
  max-height: 420px;
  overflow: auto;
  min-width: 270px;
}
.context-filter .type-filter-menu {
  width: 390px;
  max-width: calc(100vw - 32px);
}
.filter-actions {
  display: flex;
  gap: 6px;
  position: sticky;
  top: 0;
  background: white;
  padding: 4px 0 8px;
  z-index: 1;
}
.filter-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #f0f2f5;
}
.filter-choice label {
  flex: 1;
  min-width: 0;
}
.filter-choice button {
  width: auto;
  margin-top: 0;
  flex-shrink: 0;
  padding: 3px 7px;
  font-size: 11px;
}
/* One uninterrupted ribbon above the entire board. */
.flow-speed {
  height: 18px;
  flex: 0 0 18px;
  margin: 18px 22px 0;
  border-radius: 6px;
}
.panel-body textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
.classification-picker {
  border: 0;
  padding: 0;
  margin: 16px 0 10px;
  min-width: 0;
}
.classification-picker legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
.classification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.classification-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  border: 1px solid #dce2e9;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 11px;
}
.classification-options label:has(:checked) {
  background: #edf3fa;
  border-color: #b2c5de;
}
.classification-add {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.classification-add input {
  min-width: 0;
  flex: 1;
  padding: 6px;
  font-size: 12px;
}
.classification-add button {
  padding: 5px 8px;
  font-size: 11px;
}
.classification-inherit {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.5;
}
.classification-note {
  display: block;
  color: #7a8594;
  font-size: 11px;
}
.node-classifications {
  fill: #496381;
  font-size: 10px;
}
.flow-column > header h2 {
  flex: 1;
}
.flow-add {
  padding: 0;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.flow-column.has-own-states {
  display: flex;
  flex-direction: column;
}
.flow-state-columns {
  display: grid;
  gap: 12px;
  flex: 1;
}
.flow-state-column {
  min-width: 0;
  min-height: 180px;
  border-radius: 4px;
}
.flow-state-column + .flow-state-column {
  border-left: 1px solid #dce2eb;
  padding-left: 10px;
}
.flow-state-column > header {
  display: flex;
  align-items: start;
  gap: 8px;
  justify-content: space-between;
  min-height: 39px;
  padding: 0 4px 12px;
}
.flow-state-column h3 {
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  color: #596b82;
  margin: 0;
}
.flow-state-column > header span {
  font-size: 10px;
  color: #7a8798;
}
.flow-state-column.over {
  background: #dfe9f6;
  outline: 1px solid #95adcf;
}
/* A quiet, borderless add control; its hit area stays large enough to use. */
.flow-add {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7a899e;
  font-size: 21px;
  font-weight: 400;
  padding: 0 0 2px;
}
.flow-add:hover:not(:disabled) {
  background: #e3e9f1;
  color: #345476;
}
.flow-add:disabled {
  background: transparent;
  opacity: 0.35;
}
.workbench.without-inspector {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 760px) {
  .workbench.without-inspector .workspace {
    height: calc(100dvh - 100px);
  }
}
.model-view-switch {
  display: flex;
  gap: 2px;
  border: 1px solid #dce2e9;
  border-radius: 5px;
  padding: 2px;
}
.model-view-switch button {
  border: 0;
  font-size: 11px;
  padding: 5px 8px;
  background: transparent;
}
.model-view-switch button[aria-pressed="true"] {
  background: #e8eef6;
  color: #36587e;
}
.workspace-toolbar {
  flex-wrap: wrap;
}
.workspace-toolbar [hidden] {
  display: none;
}
.classification-node {
  cursor: grab;
}
.classification-node.selected > rect:first-child {
  stroke-width: 3;
}
.classification-node text {
  pointer-events: none;
}
.classification-member {
  font-size: 12px;
  fill: #506078;
}
.classification-type-link {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 7px;
}
.classification-area polygon {
  fill-opacity: 0.13;
  stroke-opacity: 0.5;
  stroke-width: 2;
  stroke-linejoin: round;
  pointer-events: none;
}
.classification-area text {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  paint-order: stroke;
  stroke: white;
  stroke-width: 3px;
}
.type-filter[open] {
  z-index: 10000;
}
.type-filter-menu {
  z-index: 10001;
}
.flow-toolbar:has(.type-filter[open]),
.workspace-toolbar:has(.type-filter[open]) {
  position: relative;
  z-index: 10000;
}
.filter-tools {
  position: sticky;
  top: -12px;
  background: white;
  padding: 5px 0 0;
  z-index: 2;
}
.type-filter-menu .filter-search {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  padding: 7px 8px;
  margin: 0 0 5px;
}
.filter-tools .filter-actions {
  position: static;
}
.type-filter-menu [hidden] {
  display: none !important;
}
.filter-no-matches {
  color: #7b8797;
  font-size: 12px;
  padding: 12px 4px;
}
.flow-lanes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.flow-lanes-toggle input {
  margin: 0;
}
.flow-board.flow-lanes-board {
  gap: 0 12px;
  grid-auto-rows: max-content;
  align-content: start;
}
.flow-lane-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  /* The content row must grow beyond the viewport so every background and
     the sticky title have the full scrollable height. */
  grid-template-rows: max-content;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  /* Continue scrolling the board when this lane reaches either edge. */
  overscroll-behavior-y: auto;
}
.flow-lane-phase,
.flow-lane-corner {
  position: sticky;
  top: -22px;
  background: #f7f8fa;
  z-index: 3;
  padding: 16px 10px;
}
.flow-lane-phase h2,
.flow-lane-label h2 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}
.flow-lane-label {
  position: sticky;
  left: -22px;
  z-index: 2;
  background: #f7f8fa;
  padding: 17px 12px 17px 0;
  border-top: 1px dashed #cbd3df;
}
.flow-lane-label span {
  display: block;
  margin-top: 5px;
  color: #8290a2;
  font-size: 11px;
}
.flow-lane-corner {
  left: -22px;
  z-index: 4;
}
.flow-lane-cell.flow-column {
  min-height: 140px;
  border: 0;
  border-top: 1px dashed #cbd3df;
  border-radius: 0;
  padding: 10px 10px 20px;
}
.flow-lane-cell > header {
  justify-content: flex-end;
  padding-bottom: 8px;
  min-height: 28px;
}
.flow-lane-cell.unused-phase {
  background: #f7f8fa;
}

.flow-lane-title {
  position: sticky;
  top: 17px;
}
.permission-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  height: calc(100vh - 58px);
  min-height: 0;
}
.permission-list {
  padding: 20px;
  border-right: 1px solid #e1e6ed;
  overflow: auto;
}
.permission-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.permission-profile {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  margin-bottom: 8px;
  padding: 14px 12px;
}
.permission-profile.selected {
  background: #edf2f8;
  border-color: #9faec2;
}
.permission-profile span {
  color: #7a8594;
  font-size: 11px;
  white-space: nowrap;
}
.permission-editor {
  padding: 24px;
  overflow: auto;
}
.permission-editor form {
  max-width: 950px;
}
.permission-editor label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.permission-editor input:not([type="checkbox"]),
.permission-editor select {
  width: 100%;
}
.permission-rule {
  background: #fff;
  border: 1px solid #dce2eb;
  border-radius: 6px;
  padding: 18px;
  margin: 18px 0;
}
.permission-rule-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.permission-target {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.permission-note {
  color: #68768a;
  font-size: 12px;
  line-height: 1.6;
}
.permission-operations,
.permission-fields {
  border: 0;
  padding: 10px 0;
  margin: 6px 0;
}
.permission-operations legend,
.permission-fields legend {
  font-size: 12px;
  font-weight: 600;
}
.permission-operations {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.permission-editor label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 7px;
}
.permission-editor input[type="checkbox"] {
  margin: 0;
}
.permission-field-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 15px;
  padding: 12px 0;
  max-height: 240px;
  overflow: auto;
}
.permission-rule details {
  margin-top: 12px;
  border-top: 1px solid #edf0f4;
  padding-top: 12px;
}
.permission-rule summary {
  cursor: pointer;
  font-size: 12px;
}
.permission-check {
  margin-top: 12px;
}
.permission-empty {
  padding: 30px;
  color: #738095;
  font-size: 13px;
}
#permission-error {
  color: #ad3737;
  font-size: 13px;
}
.permission-docs {
  padding: 24px;
  overflow: auto;
  height: calc(100vh - 58px);
  font-size: 13px;
  line-height: 1.6;
}
.permission-docs h1 {
  font-size: 20px;
  margin: 14px 0 8px;
}
.permission-docs h2 {
  font-size: 16px;
}
.permission-endpoints {
  max-width: 1200px;
}
.permission-endpoints details {
  border: 1px solid #dce2eb;
  border-radius: 5px;
  margin: 8px 0;
  background: #fff;
}
.permission-endpoints summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
}
.permission-endpoints b {
  min-width: 55px;
  color: #385575;
}
.permission-endpoints code {
  overflow-wrap: anywhere;
}
.permission-endpoints span {
  margin-left: auto;
  color: #68768a;
}
.permission-docs pre {
  font-size: 12px;
  background: #f1f4f8;
  padding: 16px;
  overflow: auto;
  border-radius: 5px;
  max-height: 460px;
}
.permission-preview {
  max-width: 1200px;
  margin-top: 28px;
}
.permission-preview label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.permission-preview select {
  min-width: 220px;
}
@media (max-width: 760px) {
  .permission-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: auto;
  }
  .permission-list {
    border-right: 0;
    border-bottom: 1px solid #e1e6ed;
  }
  .permission-editor {
    padding: 16px;
  }
  .permission-target {
    grid-template-columns: 1fr;
  }
  .permission-docs {
    padding: 16px;
  }
}
.permission-editor label {
  margin: 0;
}
.permission-rule legend {
  margin-bottom: 8px;
}
#permission-add-rule {
  margin-bottom: 20px;
}
.permission-credentials {
  padding: 16px;
  margin-top: 18px;
  border: 1px solid #dce2eb;
  border-radius: 6px;
  background: #fff;
}
.permission-credentials h2 {
  font-size: 13px;
  margin: 0 0 14px;
}
.credential-controls {
  display: flex;
  gap: 8px;
  margin: 6px 0 14px;
}
.credential-controls input {
  min-width: 0;
  flex: 1;
  font-family: monospace;
}
.credential-controls button {
  flex-shrink: 0;
}
.permission-credentials .permission-toolbar {
  margin-bottom: 0;
}
#credential-status {
  display: block;
  color: #526a80;
  font-size: 12px;
  margin-top: 8px;
}
@media (max-width: 760px) {
  .credential-controls {
    flex-wrap: wrap;
  }
  .credential-controls input {
    flex-basis: 100%;
  }
}
.permission-type-fields {
  min-width: 0;
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid #e1e6ed;
  border-radius: 5px;
}
.permission-type-fields legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
}
.permission-type-fields .permission-field-options {
  max-height: none;
  padding: 4px 0;
}
.permission-field-groups {
  max-height: 440px;
  overflow: auto;
  padding-right: 8px;
}
.canvas-wrap {
  position: relative;
}
.model-highlight-list {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  width: 180px;
  max-height: calc(100% - 24px);
  background: #ffffffed;
  border: 1px solid #e3e8ef;
  border-radius: 7px;
  box-shadow: 0 3px 12px #26354d0d;
  padding: 16px 10px;
  overflow: auto;
  font-size: 12px;
}
.model-highlight-list > strong {
  display: block;
  padding: 0 8px 10px;
  font-size: 11px;
  color: #68788b;
}
.model-highlight-list label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 8px;
  margin: 0;
  border-radius: 4px;
  cursor: pointer;
}
.model-highlight-list label.previewing {
  background: #eaf0f6;
}
.model-highlight-list input {
  margin: 0;
  flex-shrink: 0;
}
.model-highlight-list i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.model-highlight-list span {
  overflow-wrap: anywhere;
}
.map-node,
.map-relation,
.classification-area {
  transition: opacity 120ms ease;
}
.map-node.model-muted {
  opacity: 0.16;
}
.map-relation.model-muted {
  opacity: 0.1;
}
.classification-area.model-muted {
  opacity: 0.16;
}
@media (max-width: 760px) {
  .model-highlight-list {
    width: 135px;
    top: 8px;
    left: 8px;
    max-height: calc(100% - 16px);
    padding: 10px 4px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-node,
  .map-relation,
  .classification-area {
    transition: none;
  }
}

.docs-table-wrap {
  overflow-x: auto;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.docs-table th,
.docs-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px;
  border-bottom: 1px solid #ddd;
}
.permission-docs details {
  margin: 10px 0;
}
.permission-docs summary {
  cursor: pointer;
}
.permission-docs .docs-endpoint[hidden] {
  display: none;
}
.permission-docs .docs-endpoint > summary {
  flex-wrap: wrap;
}
.permission-docs code {
  overflow-wrap: anywhere;
}
.permission-docs #docs-search {
  max-width: 560px;
  margin-bottom: 12px;
}
.permission-docs h3 {
  font-size: 15px;
  margin-top: 20px;
}
#permission-add-rule {
  margin-bottom: 18px;
}
.import-workspace {
  height: calc(100vh - 58px);
  overflow: auto;
  padding: 24px;
}
.import-workspace h2 {
  font-size: 16px;
  margin-top: 22px;
}
.import-workspace pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.import-workspace details {
  margin: 16px 0;
}
.import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 16px 0;
}
.import-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-page {
  padding: 24px;
}

.flow-relations {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  font-size: 11px;
  color: #526782;
}
.flow-relations span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
