.customer-trading-page {
  min-height: 100vh;
  background: #f5f5f5;
  position: relative;
  padding-bottom: 100px;

  .header-bg {
    background: linear-gradient(to bottom, #03605c, #18ae4f);
    width: 100%;
    top: 0;
    position: absolute;
    z-index: 0;
  }

  .search-container {
    position: relative;
    z-index: 10;
    padding: 0 16px;
    margin-top: 16px;

    .nut-searchbar {
      border-radius: 20px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
  }

  .tabs-container {
    position: relative;
    z-index: 10;
    padding: 0 16px;
    margin-top: 16px;

    .nut-tabs {
      background: transparent;

      .nut-tabs__titles {
        background: transparent;
        border: none;

        .nut-tabs__titles-item {
          color: rgba(255, 255, 255, 0.8);
          padding: 12px 20px;

          &.nut-tabs__titles-item--active {
            color: #ffffff;
            font-weight: bold;
          }
        }
      }

      .nut-tabs__line {
        background: #ffffff;
        height: 3px;
        border-radius: 2px;
      }
    }
  }

  .trading-list {
    position: relative;
    z-index: 10;
    padding: 20px 16px;
    margin-top: 20px;

    .loading-container {
      text-align: center;
      padding: 40px 0;
      color: #999;
    }

    .trading-item {
      background: #ffffff;
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 16px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      cursor: pointer;
      transition: transform 0.2s ease;

      &:active {
        transform: scale(0.98);
      }

      .trading-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;

        .customer-info {
          display: flex;
          align-items: center;
          flex: 1;

          .customer-name {
            font-weight: bold;
            color: #333;
            margin-right: 8px;
          }

          .nut-tag {
            margin-left: 8px;
          }
        }

        .status-info {
          .nut-tag {
          }
        }
      }

      .trading-details {
        margin-bottom: 12px;

        .detail-row {
          display: flex;
          justify-content: space-between;
          margin-bottom: 8px;

          &:last-child {
            margin-bottom: 0;
          }

          .detail-item {
            flex: 1;
            display: flex;
            flex-direction: column;

            .label {
              color: #999;
              margin-bottom: 4px;
            }

            .value {
              color: #333;
              font-weight: 500;

              &.amount {
                font-weight: bold;
                color: #333;
              }

              &.profit {
                font-weight: bold;
              }
            }
          }
        }
      }

      .trading-footer {
        padding-top: 8px;
        border-top: 1px solid #f8f8f8;

        .time-info {
          display: flex;
          align-items: center;

          .nut-icon {
            margin-right: 4px;
          }

          .time-text {
            color: #999;
          }
        }
      }
    }
  }

  .fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    z-index: 100;

    .add-btn {
      width: 100%;
      background: #52c41a;
      color: #ffffff;
      font-weight: bold;
      border: none;
      box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
    }
  }
}

// 适配安全区域
@supports (bottom: env(safe-area-inset-bottom)) {
  .customer-trading-page .fixed-bottom {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

// 标签样式优化
.nut-tag {
  &.nut-tag--plain {
    border-width: 1px;
    padding: 2px 6px;

    &.nut-tag--small {
      padding: 1px 4px;
    }
  }
}

// 下拉刷新样式
.nut-pulltorefresh {
  .nut-pulltorefresh__track {
    min-height: auto;
  }
}

// 无限加载样式
.nut-infiniteloading {
  padding: 16px 0;
  text-align: center;
  color: #999;
}

// 空状态样式
.nut-empty {
  padding: 60px 20px;

  .nut-empty__description {
    color: #999;
  }
}

// 响应式适配
@media (max-width: 375px) {
  .customer-trading-page {
    .search-container,
    .tabs-container {
      padding: 0 12px;
    }

    .trading-list {
      padding: 16px 12px;

      .trading-item {
        padding: 12px;

      }
    }
  }
}
