/* TDesign paper workspace shell. Keep host-page effects scoped to .tbs-shell. */

.tbs-shell {
  --tbs-blue: var(--td-brand-color, #0052d9);
  --tbs-blue-soft: var(--td-brand-color-light, #edf4ff);
  --tbs-ink: var(--td-text-color-primary, #1f2733);
  --tbs-muted: var(--td-text-color-secondary, #667085);
  --tbs-line: var(--td-component-border, #e6eaf0);
  --tbs-workspace-height: max(560px, calc(100dvh - 330px));
  min-width: 0;
  color: var(--tbs-ink);
  font-size: 14px;
  line-height: 1.55;
}

.tbs-shell .tbs-page-title {
  margin: 0;
  color: var(--tbs-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.tbs-shell .tbs-page-subtitle {
  margin: 3px 0 0;
  color: var(--tbs-muted);
  font-size: 12px;
  line-height: 1.45;
}

.tbs-shell .page-tip {
  min-height: 0;
  margin: 8px 0 4px;
  padding: 7px 11px;
  border: 1px solid #dce8ff;
  border-left: 3px solid var(--tbs-blue);
  border-radius: 6px;
  background: var(--td-bg-color-container, #f7faff);
  color: var(--tbs-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tbs-shell .tbs-tabs {
  min-width: 0;
  margin-top: 6px;
}

/* TDesign 1.20.6 creates these classes through the t-tabs component prefix. */
.tbs-shell .tbs-tabs .t-tabs__header {
  height: auto;
}

.tbs-shell .tbs-tabs .t-tabs__nav,
.tbs-shell .tbs-tabs .t-tabs__nav-container,
.tbs-shell .tbs-tabs .t-tabs__nav-scroll {
  min-width: 0;
  height: auto;
  overflow: visible;
}

.tbs-shell .tbs-tabs .t-tabs__nav-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  width: 100%;
  height: auto;
  transform: none !important;
}

.tbs-shell .tbs-tabs .t-tabs__nav-item {
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  color: var(--tbs-muted);
  font-size: 13px;
  line-height: 22px;
  white-space: nowrap;
}

.tbs-shell .tbs-tabs .t-tabs__nav-item-wrapper {
  height: 36px;
  padding: 0 12px;
}

.tbs-shell .tbs-tabs .t-tabs__nav-item:hover {
  background: var(--td-bg-color-container-hover, #f4f7fb);
  color: var(--tbs-blue);
}

.tbs-shell .tbs-tabs .t-tabs__nav-item.t-is-active {
  background: var(--tbs-blue-soft);
  color: var(--tbs-blue);
  font-weight: 600;
}

/* A single moving underline cannot represent a wrapped tab row. */
.tbs-shell .tbs-tabs .t-tabs__bar,
.tbs-shell .tbs-tabs .t-tabs__operations,
.tbs-shell .tbs-tabs .t-tabs__btn {
  display: none;
}

.tbs-shell .tbs-tabs .t-tabs__content {
  padding-top: 10px;
}

.tbs-shell :where(.t-card) {
  border-color: var(--tbs-line);
  border-radius: 8px;
  box-shadow: none;
}

.tbs-shell :where(.t-card__body) {
  padding: 14px;
}

.tbs-shell :where(.t-form__item) {
  margin-bottom: 14px;
}

.tbs-shell :where(.t-input, .t-textarea, .t-select) {
  border-radius: 6px;
}

.tbs-shell iframe,
.tbs-shell [data-tbs-native] {
  display: block;
  width: 100%;
  height: var(--tbs-workspace-height);
  border: 0;
  border-radius: 7px;
  background: #f5f7fa;
}

.tbs-shell :where(.t-empty) {
  padding: 28px 16px;
}

.tbs-shell :where(.t-loading__parent) {
  min-height: 160px;
}

@media (max-width: 1100px) {
  .tbs-shell {
    --tbs-workspace-height: max(520px, calc(100dvh - 350px));
  }

  .tbs-shell .tbs-page-title {
    font-size: 19px;
  }

  .tbs-shell .tbs-tabs .t-tabs__nav-item {
    font-size: 12.5px;
  }
}

@media (max-width: 760px) {
  .tbs-shell {
    --tbs-workspace-height: max(440px, calc(100dvh - 420px));
  }

  .tbs-shell :where(.t-card__body) {
    padding: 11px;
  }

  .tbs-shell .tbs-page-title {
    font-size: 18px;
  }

  .tbs-shell .page-tip {
    margin-top: 7px;
    padding: 7px 9px;
  }

  .tbs-shell .tbs-tabs .t-tabs__nav-wrap {
    gap: 1px 2px;
  }

  .tbs-shell .tbs-tabs .t-tabs__nav-item {
    height: 34px;
    min-height: 34px;
    font-size: 12px;
  }

  .tbs-shell .tbs-tabs .t-tabs__nav-item-wrapper {
    height: 34px;
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tbs-shell :where(.t-tabs__nav-item, .t-card, .page-tip) {
    scroll-behavior: auto;
    transition: none;
  }
}

