.pnt-general-layout {
  // 可通过 props（bodyPadding / cardRadius）覆盖的布局变量
  --pnt-layout-body-padding: 24px;
  --pnt-layout-card-radius: 4px;

  height: 100%;
  background-color: rgba(0, 0, 0, 0);

  .t-layout__header {
    height: auto;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    border-bottom: 1px solid #f0f3f6;

    .header-title {
      display: inline-flex;
      align-items: center;
      padding: 24px;

      .goback-icon {
        margin-right: 12px;
        color: #3f8cff;
        cursor: pointer;
      }

      .title {
        font-weight: 600;
        font-size: 20px;
        line-height: 24px;
      }
    }

    // 统一 flex 居中：高度由 header-title 的 padding 撑起（72px），
    // 比固定 line-height: 72px 更稳，按钮高度变化也不会错位
    .header-operation {
      display: flex;
      align-items: center;
      padding-right: 24px;

      .t-button + .t-button {
        margin-left: 12px;
      }
    }
  }

  // 无头部分割线变体（headerBordered={false}）
  &--borderless {
    .t-layout__header {
      border-bottom: none;
    }
  }

  .general-layout-sub-header {
    flex-shrink: 0;
    border-bottom: 1px solid #f0f3f6;
  }

  .general-layout-body {
    // flex 自动填满 header/sub-header/footer 之外的剩余空间；
    // min-height: 0 保证内容超长时由 body 自身滚动，而不是撑破布局
    flex: 1 1 auto;
    min-height: 0;
    padding: var(--pnt-layout-body-padding);
    overflow-y: auto;
    background: #fafafa;

    // 卡片/业务容器取各项目选择器超集，统一去阴影、间距与圆角
    > div.tea-card,
    > div.t-card,
    > div.t-loading__parent > div.t-card,
    > div[class*='-wrapper'],
    > div[class*='-block'] {
      box-shadow: none;
      margin-bottom: 24px;
      border-radius: var(--pnt-layout-card-radius);

      .t-card__body {
        border-radius: var(--pnt-layout-card-radius);
      }
    }

    > div:last-child,
    > div:last-child.t-card,
    > div:last-child.tea-card,
    > div.t-loading__parent > div:last-child.t-card,
    > div:last-child[class*='-wrapper'],
    > div:last-child[class*='-block'] {
      margin-bottom: 0;
    }
  }

  .t-layout__footer {
    flex-shrink: 0;
    padding: 18px 24px;
    background: #fff;
    border-top: 1px solid #f0f3f6;

    .t-button {
      font-size: 14px;
      min-width: 92px;
      height: 36px;
      font-weight: 600;

      & + .t-button {
        margin-left: 12px;
      }
    }
  }

  // 底部按钮不约束尺寸变体（footerButton='auto'），仅保留按钮间距
  &--footer-auto {
    .t-layout__footer .t-button {
      font-size: inherit;
      min-width: 0;
      height: auto;
      font-weight: inherit;
    }
  }
}
