/* 批量工具抽屉样式 —— 与项目其他抽屉保持一致的设计语言。 */
.pbt-drawer {
  .ant-drawer-content-wrapper {
    box-shadow:
      0 8px 24px rgb(0 0 0 / 8%),
      0 2px 6px rgb(0 0 0 / 4%);
  }

  .ant-drawer-header {
    min-height: 56px;
    padding: 0 24px;
    border-bottom: 1px solid #f0f0f0;
  }

  .ant-drawer-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
  }

  .ant-drawer-body {
    padding: 20px 24px;
  }
}

.page-product-batch,
.pbt-drawer {
  .pbt-panel {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--pbt-shadow-sm);
  }

  .pbt-panel.pbt-panel-embedded {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .pbt-panel-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .pbt-panel-hd h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
  }

  .pbt-close {
    width: 28px;
    height: 28px;
    font-size: 16px;
    color: #9ca3af;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: 6px;
  }

  .pbt-close:hover {
    color: #111827;
    background: #f5f5f5;
  }

  /* ---- 步骤区块 ---- */
  .pbt-step {
    padding: 16px;
    margin-bottom: 16px;
    background: #fafbfc;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
  }

  .pbt-step-label {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
    padding-left: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #1f2937;
  }

  .pbt-step-label::before {
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: 0;
    width: 3px;
    content: '';
    background: linear-gradient(180deg, #4da3ff 0%, #1677ff 100%);
    border-radius: 4px;
  }

  .pbt-step-label .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #1677ff;
    background: #eff6ff;
    border-radius: 50%;
  }

  /* ---- 胶囊按钮 ---- */
  .pbt-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }

  .pbt-pill {
    min-width: 80px;
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    transition:
      color 0.2s ease,
      border-color 0.2s ease,
      background-color 0.2s ease;
  }

  .pbt-pill:hover {
    color: #1677ff;
    border-color: #91caff;
  }

  .pbt-pill.active {
    color: #1677ff;
    background: #eff6ff;
    border-color: #1677ff;
  }

  /* ---- 调价行 ---- */
  .pbt-adjust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;

    .pbt-pills {
      margin-bottom: 0;
    }
  }

  .pbt-adjust-input {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
  }

  .pbt-number {
    width: 160px;
  }

  .pbt-select-wide {
    width: min(100%, 640px);
  }

  .pbt-select-narrow {
    width: min(100%, 280px);
  }

  /* ---- 预览表格 ---- */
  .pbt-table {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
  }

  .pbt-table .up {
    font-weight: 600;
    color: #ef4444;
  }

  .pbt-table .down {
    font-weight: 600;
    color: #22c55e;
  }

  /* ---- 信息提示条 ---- */
  .pbt-info {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    margin: 8px 0 16px;
    font-size: 13px;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
  }

  /* ---- 底部操作栏 ---- */
  .pbt-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
  }

  .pbt-actions .ant-btn {
    min-width: 96px;
    height: 40px;
    padding: 0 24px;
    font-size: 15px;
    border-radius: 10px;
  }

  /* ---- 导入导出子卡片 ---- */
  .pbt-sub-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .pbt-sub-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.2s ease;
  }

  .pbt-sub-card:hover {
    border-color: #d1d5db;
  }

  .pbt-sub-card h4 {
    position: relative;
    padding-left: 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #1f2937;
  }

  .pbt-sub-card h4::before {
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: 0;
    width: 3px;
    content: '';
    background-color: #1677ff;
    border-radius: 2px;
  }

  /* ---- 上传区域 ---- */
  .pbt-upload-icon {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1677ff;
  }

  .pbt-upload-title {
    margin: 4px 0 0;
    font-size: 13px;
    color: #4b5563;
  }

  .pbt-upload-tip {
    margin: 2px 0 0;
    font-size: 12px;
    color: #9ca3af;
  }

  .pbt-upload-file {
    font-size: 12px;
    color: #4b5563;
  }

  .pbt-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .pbt-upload-actions .ant-btn {
    border-radius: 8px;
  }
}
