/* app.wxss - 全局样式 */

/* 全局重置 */
page {
  background-color: #f6f6f6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #303133;
  line-height: 1.6;
}

/* 容器样式 */
.container {
  padding: 16rpx;
  background-color: #ffffff;
  border-radius: 8rpx;
  margin: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}

/* 通用工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-8 { margin-top: 8rpx; }
.mt-16 { margin-top: 16rpx; }
.mt-24 { margin-top: 24rpx; }
.mt-32 { margin-top: 32rpx; }
.mb-8 { margin-bottom: 8rpx; }
.mb-16 { margin-bottom: 16rpx; }
.mb-24 { margin-bottom: 24rpx; }
.mb-32 { margin-bottom: 32rpx; }

.pt-8 { padding-top: 8rpx; }
.pt-16 { padding-top: 16rpx; }
.pt-24 { padding-top: 24rpx; }
.pt-32 { padding-top: 32rpx; }
.pb-8 { padding-bottom: 8rpx; }
.pb-16 { padding-bottom: 16rpx; }
.pb-24 { padding-bottom: 24rpx; }
.pb-32 { padding-bottom: 32rpx; }

.p-8 { padding: 8rpx; }
.p-16 { padding: 16rpx; }
.p-24 { padding: 24rpx; }
.p-32 { padding: 32rpx; }

.m-8 { margin: 8rpx; }
.m-16 { margin: 16rpx; }
.m-24 { margin: 24rpx; }
.m-32 { margin: 32rpx; }

/* Flex布局 */
.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

/* 状态颜色 */
.status-normal { color: #52c41a; }
.status-pregnant { color: #faad14; }
.status-sick { color: #f5222d; }
.status-quarantine { color: #909399; }

/* 主题颜色 */
.color-primary { color: #3cc51f; }
.color-success { color: #52c41a; }
.color-warning { color: #faad14; }
.color-danger { color: #f5222d; }
.color-info { color: #1890ff; }

.bg-primary { background-color: #3cc51f; }
.bg-success { background-color: #52c41a; }
.bg-warning { background-color: #faad14; }
.bg-danger { background-color: #f5222d; }
.bg-info { background-color: #1890ff; }

/* 文字颜色 */
.text-primary { color: #303133; }
.text-regular { color: #606266; }
.text-secondary { color: #909399; }
.text-placeholder { color: #c0c4cc; }

/* 背景颜色 */
.bg-white { background-color: #ffffff; }
.bg-gray { background-color: #f5f5f5; }
.bg-light { background-color: #fafafa; }

/* 边框 */
.border { border: 1rpx solid #dcdfe6; }
.border-top { border-top: 1rpx solid #dcdfe6; }
.border-bottom { border-bottom: 1rpx solid #dcdfe6; }
.border-left { border-left: 1rpx solid #dcdfe6; }
.border-right { border-right: 1rpx solid #dcdfe6; }

/* 圆角 */
.rounded { border-radius: 4rpx; }
.rounded-sm { border-radius: 2rpx; }
.rounded-lg { border-radius: 8rpx; }
.rounded-xl { border-radius: 12rpx; }
.rounded-full { border-radius: 50%; }

/* 阴影 */
.shadow { box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1); }
.shadow-sm { box-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.15); }

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16rpx 32rpx;
  border-radius: 8rpx;
  font-size: 28rpx;
  font-weight: 500;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #3cc51f;
  color: #ffffff;
}

.btn-primary:active {
  background-color: #2ea617;
}

.btn-success {
  background-color: #52c41a;
  color: #ffffff;
}

.btn-success:active {
  background-color: #389e0d;
}

.btn-warning {
  background-color: #faad14;
  color: #ffffff;
}

.btn-warning:active {
  background-color: #d48806;
}

.btn-danger {
  background-color: #f5222d;
  color: #ffffff;
}

.btn-danger:active {
  background-color: #cf1322;
}

.btn-default {
  background-color: #ffffff;
  color: #303133;
  border: 1rpx solid #dcdfe6;
}

.btn-default:active {
  background-color: #f5f5f5;
}

.btn-small {
  padding: 8rpx 16rpx;
  font-size: 24rpx;
}

.btn-large {
  padding: 24rpx 48rpx;
  font-size: 32rpx;
}

/* 卡片样式 */
.card {
  background-color: #ffffff;
  border-radius: 8rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  padding: 24rpx;
  border-bottom: 1rpx solid #f0f0f0;
  font-weight: 500;
  font-size: 32rpx;
}

.card-body {
  padding: 24rpx;
}

.card-footer {
  padding: 24rpx;
  border-top: 1rpx solid #f0f0f0;
  background-color: #fafafa;
}

/* 列表样式 */
.list-item {
  display: flex;
  align-items: center;
  padding: 24rpx;
  background-color: #ffffff;
  border-bottom: 1rpx solid #f0f0f0;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:active {
  background-color: #f5f5f5;
}

/* 加载动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  width: 48rpx;
  height: 48rpx;
  border: 4rpx solid #f0f0f0;
  border-top: 4rpx solid #3cc51f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 64rpx 32rpx;
  color: #909399;
}

.empty-icon {
  font-size: 64rpx;
  margin-bottom: 16rpx;
  display: block;
}

.empty-text {
  font-size: 28rpx;
}

/* 响应式设计 */
@media (max-width: 375px) {
  .container {
    margin: 8rpx;
    padding: 12rpx;
  }
  
  .btn {
    padding: 12rpx 24rpx;
    font-size: 26rpx;
  }
  
  .card-header,
  .card-body,
  .card-footer {
    padding: 16rpx;
  }
  
  .list-item {
    padding: 16rpx;
  }
}
