.instanceCanvas {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--color-fill-2);
  overflow: hidden;
}

.header {
  height: 50px;
  background-color: var(--color-bg-2);
  border-bottom: 1px solid var(--color-border-2);
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  gap: 12px;
}

.backButton {
  flex-shrink: 0;
}

.title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-1);
  flex: 1;
}

.mainContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.canvasArea {
  flex: 1;
  overflow: hidden;
  position: relative;
  background-color: var(--color-bg-1);
}

.logBarContainer {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.logBar {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-2);
  border-top: 1px solid var(--color-border-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.logTabs {
  height: 100%;
  display: flex;
  flex-direction: column;

  :global {
    .arco-tabs-content {
      flex: 1;
      overflow: hidden;
      padding: 0;
    }

    .arco-tabs-content-list {
      height: 100%;
    }

    .arco-tabs-pane {
      height: 100%;
      overflow: auto;
    }

    .arco-tabs-nav {
      padding: 0 16px;
      margin: 0;
    }
  }
}

.collapsedTabBar {
  width: 100%;
  background-color: var(--color-bg-2);
  border-top: 1px solid var(--color-border-2);
}

.collapsedTabs {
  :global {
    .arco-tabs-content {
      display: none;
    }

    .arco-tabs-nav {
      padding: 0 16px;
      margin: 0;
    }
  }
}

.logContent {
  padding: 12px 16px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-2);
  background-color: var(--color-bg-1);
  height: 100%;
  overflow-y: auto;
}

.logSection {
  margin-bottom: 16px;
  padding: 12px;
  background-color: var(--color-fill-2);
  border-radius: 4px;
  border-left: 3px solid var(--color-primary-6);
}

.logHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-2);
}

.logNodeName {
  font-weight: 600;
  color: var(--color-text-1);
  font-size: 14px;
}

.logDuration {
  color: var(--color-text-3);
  font-size: 12px;
}

.logState {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;

  &.success {
    background-color: var(--color-success-light-1);
    color: var(--color-success-6);
  }

  &.failed {
    background-color: var(--color-danger-light-1);
    color: var(--color-danger-6);
  }

  &.running {
    background-color: var(--color-primary-light-1);
    color: var(--color-primary-6);
  }
}

.logMessage {
  color: var(--color-text-2);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;

  div {
    margin: 2px 0;
  }
}

.logItem {
  margin-bottom: 4px;
  word-break: break-all;
}

.logTimestamp {
  color: var(--color-text-3);
  margin-right: 8px;
}

.dataContent {
  padding: 12px 16px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-1);
  background-color: var(--color-bg-1);
  height: 100%;
  overflow-y: auto;
}

.dataSection {
  margin-bottom: 20px;
  padding: 16px;
  background-color: var(--color-fill-2);
  border-radius: 6px;
  border: 1px solid var(--color-border-2);
}

.dataHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border-3);
}

.dataNodeName {
  font-weight: 600;
  color: var(--color-text-1);
  font-size: 15px;
}

.dataDuration {
  color: var(--color-text-3);
  font-size: 12px;
}

.dataState {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;

  &.success {
    background-color: var(--color-success-light-1);
    color: var(--color-success-6);
  }

  &.failed {
    background-color: var(--color-danger-light-1);
    color: var(--color-danger-6);
  }

  &.running {
    background-color: var(--color-primary-light-1);
    color: var(--color-primary-6);
  }
}

.dataBlock {
  margin-top: 12px;
  background-color: var(--color-bg-1);
  border-radius: 4px;
  padding: 12px;
  border: 1px solid var(--color-border-1);
}

.dataBlockTitle {
  font-weight: 600;
  color: var(--color-text-1);
  margin-bottom: 8px;
  font-size: 13px;
}

.dataBlockContent {
  margin: 0;
  padding: 8px;
  background-color: var(--color-fill-1);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-2);
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.emptyLog {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-3);
  font-size: 14px;
  background-color: var(--color-bg-1);
}

.loadingContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: var(--color-bg-1);
}

.emptyContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-3);
  font-size: 16px;
  background-color: var(--color-bg-1);
}
