.orgchart-shell {
  display: grid;
  gap: 18px;
}
.orgchart-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.orgchart-stat-card {
  display: grid;
  gap: 8px;
}
.orgchart-stat-card span {
  color: var(--muted);
}
.orgchart-stat-card strong {
  font-size: 2rem;
}
.orgchart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.orgchart-board-panel {
  display: grid;
  gap: 14px;
}
.orgchart-board-actions {
  display: flex;
  gap: 10px;
}
.orgchart-board-wrap {
  position: relative;
  min-height: 760px;
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}
.orgchart-board {
  position: relative;
  min-width: 1200px;
  min-height: 760px;
}
.orgchart-lines {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  pointer-events: none;
  overflow: visible;
}
.orgchart-department-band {
  position: absolute;
  left: 16px;
  right: 16px;
  min-height: 210px;
  border-radius: 24px;
  border: 1px dashed rgba(255,255,255,.08);
  padding: 16px 18px;
}
.orgchart-department-band-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.orgchart-agent-card {
  position: absolute;
  width: 280px;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(17,19,29,.92);
  box-shadow: 0 20px 40px rgba(0,0,0,.24);
  cursor: default;
}
.orgchart-agent-card.dragging {
  opacity: .92;
  box-shadow: 0 26px 48px rgba(0,0,0,.35);
}
.orgchart-drag-handle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  cursor: grab;
  padding: 0;
}
.orgchart-drag-handle:active {
  cursor: grabbing;
}
.orgchart-agent-top {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-right: 28px;
}
.orgchart-agent-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.orgchart-agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.orgchart-agent-meta {
  display: grid;
  gap: 4px;
}
.orgchart-agent-name {
  font-weight: 700;
  font-size: 1rem;
}
.orgchart-agent-role,
.orgchart-agent-description,
.orgchart-agent-cron,
.orgchart-empty {
  color: var(--muted);
}
.orgchart-agent-cron-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.orgchart-side {
  display: grid;
  gap: 18px;
}
.orgchart-side-list {
  display: grid;
  gap: 12px;
}
.orgchart-side-item {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.orgchart-side-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.orgchart-form {
  display: grid;
  gap: 12px;
}
.orgchart-link-label {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  font-size: .78rem;
  color: var(--muted);
}
.orgchart-line-path {
  stroke: rgba(159,124,255,.72);
  stroke-width: 2.5;
  fill: none;
}
.orgchart-line-dot {
  fill: rgba(159,124,255,.95);
}
.orgchart-line-label {
  fill: #d8ccf7;
  font-size: 12px;
  text-anchor: middle;
}
@media (max-width: 1180px) {
  .orgchart-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .orgchart-overview-grid {
    grid-template-columns: 1fr;
  }
}
