/* pages/farmers/farmers.wxss */
.farmers-container {
  background-color: #f5f7fa;
  min-height: 100vh;
  padding: 0;
}

/* 标题栏 */
.header {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  padding: 20rpx 30rpx;
  box-shadow: 0 4rpx 12rpx rgba(76, 175, 80, 0.15);
}

.title {
  color: #ffffff;
  font-size: 36rpx;
  font-weight: 600;
}

/* 筛选标签 */
.filter-tabs {
  display: flex;
  background: #ffffff;
  padding: 20rpx 30rpx;
  border-bottom: 1rpx solid #e8e8e8;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 16rpx 0;
  border-radius: 8rpx;
  margin: 0 8rpx;
  transition: all 0.3s ease;
}

.tab-item text {
  font-size: 28rpx;
  color: #666666;
  font-weight: 500;
}

.tab-item.active {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  box-shadow: 0 4rpx 12rpx rgba(76, 175, 80, 0.25);
}

.tab-item.active text {
  color: #ffffff;
  font-weight: 600;
}

/* 搜索区域 */
.search-section {
  background: #ffffff;
  padding: 20rpx 30rpx;
  border-bottom: 1rpx solid #e8e8e8;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 20rpx;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12rpx;
  padding: 0 20rpx;
  border: 2rpx solid transparent;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: #4CAF50;
  background: #ffffff;
  box-shadow: 0 0 0 4rpx rgba(76, 175, 80, 0.1);
}

.search-input {
  flex: 1;
  height: 80rpx;
  font-size: 28rpx;
  color: #333333;
  background: transparent;
}

.search-input::placeholder {
  color: #999999;
}

.search-btn {
  padding: 8rpx;
  border-radius: 8rpx;
  background: #4CAF50;
  transition: all 0.3s ease;
}

.search-btn:active {
  background: #45a049;
  transform: scale(0.95);
}

.search-icon {
  font-size: 28rpx;
  color: #ffffff;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 8rpx;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: #ffffff;
  padding: 20rpx 24rpx;
  border-radius: 12rpx;
  font-size: 28rpx;
  font-weight: 600;
  box-shadow: 0 4rpx 12rpx rgba(76, 175, 80, 0.25);
  transition: all 0.3s ease;
}

.add-btn:active {
  transform: translateY(2rpx);
  box-shadow: 0 2rpx 8rpx rgba(76, 175, 80, 0.25);
}

.add-icon {
  font-size: 32rpx;
  font-weight: bold;
}

/* 养殖户列表 */
.farmer-list {
  padding: 20rpx 30rpx;
}

.farmer-item {
  background: #ffffff;
  border-radius: 16rpx;
  margin-bottom: 20rpx;
  padding: 30rpx;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
  border: 1rpx solid #f0f0f0;
  transition: all 0.3s ease;
}

.farmer-item:active {
  transform: translateY(2rpx);
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.12);
}

.farmer-title {
  font-size: 32rpx;
  font-weight: 600;
  color: #333333;
  margin-bottom: 20rpx;
  padding-bottom: 16rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.farmer-info {
  display: flex;
  flex-direction: column;
  gap: 16rpx;
}

.info-row {
  display: flex;
  align-items: center;
  font-size: 28rpx;
}

.info-label {
  color: #666666;
  width: 160rpx;
  flex-shrink: 0;
}

.info-value {
  color: #333333;
  flex: 1;
  font-weight: 500;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 8rpx 16rpx;
  border-radius: 20rpx;
  font-size: 24rpx;
  font-weight: 500;
}

.status-tag.active {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.status-tag.pending {
  background: rgba(255, 193, 7, 0.1);
  color: #FFC107;
}

.status-tag.inactive {
  background: rgba(244, 67, 54, 0.1);
  color: #F44336;
}

/* 加载状态 */
.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80rpx 0;
}

.loading-text {
  color: #999999;
  font-size: 28rpx;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120rpx 60rpx;
  text-align: center;
}

.empty-icon {
  width: 120rpx;
  height: 120rpx;
  margin-bottom: 30rpx;
  opacity: 0.6;
}

.empty-text {
  color: #999999;
  font-size: 28rpx;
  margin-bottom: 40rpx;
}

.empty-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: #ffffff;
  padding: 20rpx 40rpx;
  border-radius: 12rpx;
  font-size: 28rpx;
  font-weight: 600;
  box-shadow: 0 4rpx 12rpx rgba(76, 175, 80, 0.25);
  transition: all 0.3s ease;
}

.empty-btn:active {
  transform: translateY(2rpx);
  box-shadow: 0 2rpx 8rpx rgba(76, 175, 80, 0.25);
}

.add-btn {
  display: flex;
  align-items: center;
  background-color: #7CB342;
  color: white;
  padding: 15rpx 25rpx;
  border-radius: 35rpx;
  gap: 8rpx;
}

.add-icon {
  font-size: 28rpx;
  font-weight: bold;
}

.add-text {
  font-size: 26rpx;
}

/* 养殖户列表样式 */
.farmers-list {
  padding: 20rpx;
}

.farmer-item {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-radius: 12rpx;
  padding: 25rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  gap: 20rpx;
}

.farmer-avatar {
  width: 80rpx;
  height: 80rpx;
  background-color: #7CB342;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-text {
  color: white;
  font-size: 32rpx;
  font-weight: bold;
}

.farmer-info {
  flex: 1;
  min-width: 0;
}

.farmer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15rpx;
}

.farmer-name {
  font-size: 32rpx;
  font-weight: 500;
  color: #333333;
}

.farmer-status {
  padding: 6rpx 16rpx;
  border-radius: 20rpx;
  font-size: 22rpx;
}

.farmer-status.active {
  background-color: #e8f5e8;
  color: #4CAF50;
}

.farmer-status.inactive {
  background-color: #ffeaea;
  color: #f44336;
}

.farmer-details {
  display: flex;
  flex-direction: column;
  gap: 8rpx;
}

.detail-item {
  display: flex;
  align-items: center;
  font-size: 24rpx;
}

.detail-label {
  color: #666666;
  width: 120rpx;
  flex-shrink: 0;
}

.detail-value {
  color: #333333;
  flex: 1;
}

.animal-count {
  color: #7CB342;
  font-weight: 500;
}

.farmer-arrow {
  width: 30rpx;
  height: 30rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arrow-icon {
  color: #cccccc;
  font-size: 24rpx;
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40rpx;
}

.loading-text {
  color: #999999;
  font-size: 28rpx;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100rpx 40rpx;
  text-align: center;
}

.empty-icon {
  font-size: 120rpx;
  margin-bottom: 30rpx;
  opacity: 0.5;
}

.empty-text {
  color: #999999;
  font-size: 28rpx;
  margin-bottom: 40rpx;
}

.empty-btn {
  background-color: #7CB342;
  color: white;
  padding: 20rpx 40rpx;
  border-radius: 25rpx;
  font-size: 28rpx;
}