/* ========== 审批流程设计器样式 ========== */

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f5f6f7;
}

.designer-nav {
  height: 52px;
}

/* ---------- 画布 ---------- */
.graph-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 52px);
  overflow: hidden;
}

/* ---------- 左侧节点面板（DndPanel） ---------- */
.lf-dndpanel {
  top: 16px !important;
  left: 16px !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 8px;
  background: #ffffff;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lf-dndpanel .lf-dnd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  padding: 8px 4px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.lf-dndpanel .lf-dnd-item:hover {
  background: #f2f3f5;
  border-color: #e5e6eb;
}

.lf-dndpanel .lf-dnd-item:active {
  cursor: grabbing;
}

.lf-dndpanel .lf-dnd-shape {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.lf-dndpanel .lf-dnd-text {
  font-size: 12px;
  color: #4e5969;
  line-height: 1.2;
  text-align: center;
}

/* ---------- 画布内节点（HtmlNode） ---------- */
.flow-node {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #ffffff;
  border: 1.5px solid #e5e6eb;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(31, 35, 41, 0.08);
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

.flow-node .node-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.flow-node .node-icon svg {
  width: 17px;
  height: 17px;
}

.flow-node .node-texts {
  min-width: 0;
  flex: 1;
}

.flow-node .node-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d2129;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-node .node-desc {
  font-size: 11px;
  color: #86909c;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 各类型配色 */
.flow-node-approval { border-color: #2f7cf6; }
.flow-node-approval .node-icon { background: #e8f1ff; fill: #2f7cf6; }

.flow-node-notification { border-color: #fa8c16; }
.flow-node-notification .node-icon { background: #fff3e6; fill: #fa8c16; }

.flow-node-cc { border-color: #13a8a8; }
.flow-node-cc .node-icon { background: #e6f7f7; fill: #13a8a8; }

/* 开始 / 结束：圆形节点 */
.flow-node-circle {
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border-radius: 50%;
}

.flow-node-circle .node-icon {
  width: 22px;
  height: 22px;
  background: transparent;
  border-radius: 0;
}

.flow-node-circle .node-icon svg {
  width: 18px;
  height: 18px;
}

.flow-node-circle .circle-text {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
}

.flow-node-start { background: #52c41a; border-color: #52c41a; fill: #ffffff; }
.flow-node-end   { background: #f5222d; border-color: #f5222d; fill: #ffffff; }

/* ---------- 右侧属性面板 ---------- */
.props-panel {
  position: absolute;
  top: 68px;
  right: 16px;
  bottom: 16px;
  width: 320px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.props-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #2f54eb;
  border-radius: 9px 9px 0 0;
}

.props-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.props-body .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #4e5969;
}

/* 人员/选项选择框 */
.picker-box {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  padding: 6px 10px;
  background: #fafbfc;
}

.picker-group-title {
  font-size: 12px;
  color: #86909c;
  margin: 6px 0 2px;
}

.picker-group-title:first-child {
  margin-top: 0;
}

.picker-box .form-check {
  margin: 2px 0;
}

.picker-box .form-check-label {
  font-size: 13px;
}

/* 判断节点条件表 */
.branch-table {
  font-size: 12px;
}

.branch-table .form-select,
.branch-table .form-control {
  min-width: 64px;
  font-size: 12px;
  padding: 4px 6px;
}

.json-view {
  max-height: 55vh;
  overflow: auto;
  background: #1d2129;
  color: #a9dc76;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
}
