/* ============================================================
   微信标准组件库 (WeChat Components)
   对标微信小程序 UI 风格，类名统一 wc- 前缀
   ============================================================ */

:root {
  --wc-bg-page: #f7f7f7;
  --wc-bg-card: #ffffff;
  --wc-primary: #07C160;
  --wc-primary-dark: #06ad56;
  --wc-primary-light: #f0f9eb;
  --wc-text-title: #111111;
  --wc-text-body: #333333;
  --wc-text-aux: #999999;
  --wc-border: #ebedf0;
  --wc-border-light: #f2f2f2;
  --wc-radius-sm: 6px;
  --wc-radius-md: 8px;
  --wc-radius-lg: 12px;
  --wc-radius-full: 999px;
  --wc-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03);
  --wc-font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, "Microsoft YaHei", sans-serif;
}

/* ========== 1. 通用卡片 ========== */
.wc-card {
  background: var(--wc-bg-card);
  border-radius: var(--wc-radius-lg);
  margin: 0 12px 12px;
  padding: 16px;
  box-shadow: var(--wc-shadow-card);
  font-family: var(--wc-font-family);
}
.wc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wc-card-header h3, .wc-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--wc-text-title);
}
.wc-card-header .wc-card-aux {
  font-size: 13px;
  color: var(--wc-text-aux);
  font-weight: 400;
}
.wc-card-body { color: var(--wc-text-body); font-size: 14px; }
.wc-card-clickable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wc-card-clickable:active { opacity: 0.9; transform: scale(0.99); transition: all 0.1s; }

/* ========== 2. 按钮 ========== */
.wc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--wc-radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
  font-family: var(--wc-font-family);
}
.wc-btn:active { opacity: 0.7; }
.wc-btn-primary { background: var(--wc-primary); color: #fff; }
.wc-btn-primary:active { background: var(--wc-primary-dark); }
.wc-btn-outline { background: transparent; color: #555; border: 1px solid #dcdfe6; }
.wc-btn-outline:active { background: #f5f7fa; }
.wc-btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.wc-btn-xs { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 6px; }
.wc-btn-block { display: flex; width: 100%; }

/* ========== 3. 列表项 ========== */
.wc-list {
  background: var(--wc-bg-card);
  border-radius: var(--wc-radius-lg);
  margin: 0 12px 12px;
  overflow: hidden;
}
.wc-list-item {
  display: flex;
  align-items: center;
  padding: 0 16px;
  min-height: 56px;
  border-bottom: 1px solid var(--wc-border-light);
  font-family: var(--wc-font-family);
  color: var(--wc-text-body);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.wc-list-item:last-child { border-bottom: none; }
.wc-list-item:active { background: #f7f7f7; }
.wc-list-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-right: 12px; flex-shrink: 0;
  background: #f7f7f7;
}
.wc-list-content { flex: 1; min-width: 0; }
.wc-list-title {
  font-size: 15px; font-weight: 500; color: var(--wc-text-title);
  line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wc-list-subtitle { font-size: 12px; color: var(--wc-text-aux); margin-top: 3px; line-height: 1.4; }
.wc-list-action { margin-left: 12px; flex-shrink: 0; display: flex; align-items: center; }
.wc-list-arrow { margin-left: 8px; color: #ccc; font-size: 16px; flex-shrink: 0; }

/* ========== 4. 标签 ========== */
.wc-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px; font-weight: 400; line-height: 1.4;
  border-radius: 4px;
  white-space: nowrap;
  font-family: var(--wc-font-family);
}
.wc-tag-primary { background: var(--wc-primary-light); color: var(--wc-primary); }
.wc-tag-success { background: #f0f9eb; color: #07C160; }
.wc-tag-warning { background: #fdf6ec; color: #e6a23c; }
.wc-tag-danger  { background: #fef0f0; color: #f56c6c; }
.wc-tag-info    { background: #ecf5ff; color: #409eff; }
.wc-tag-default { background: #f4f4f5; color: #909399; }
.wc-tag-round { border-radius: 999px; padding: 2px 10px; }

/* ========== 5. 头像 ========== */
.wc-avatar {
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 600; color: #fff;
  font-family: var(--wc-font-family);
  flex-shrink: 0; overflow: hidden;
}
.wc-avatar-circle { border-radius: 50%; }
.wc-avatar-square { border-radius: var(--wc-radius-md); }
.wc-avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.wc-avatar-md { width: 44px; height: 44px; font-size: 18px; }
.wc-avatar-lg { width: 56px; height: 56px; font-size: 24px; }
.wc-avatar-xl { width: 72px; height: 72px; font-size: 30px; }

/* ========== 6. 进度条 ========== */
.wc-progress { height: 4px; background: #f2f2f2; border-radius: 2px; overflow: hidden; }
.wc-progress-bar { height: 100%; background: var(--wc-primary); border-radius: 2px; transition: width 0.3s ease; }
.wc-progress-lg { height: 6px; border-radius: 3px; }
.wc-progress-lg .wc-progress-bar { border-radius: 3px; }

/* ========== 7. 底部安全区 ========== */
.wc-safe-bottom { height: env(safe-area-inset-bottom, 0); min-height: 12px; }
.wc-pb-safe { padding-bottom: calc(env(safe-area-inset-bottom, 0) + 12px); }

/* ========== 8. 宫格 ========== */
.wc-grid {
  display: grid; gap: 1px;
  background: var(--wc-border-light);
  border-radius: var(--wc-radius-lg);
  margin: 0 12px 12px; overflow: hidden;
}
.wc-grid-item {
  background: var(--wc-bg-card);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px 8px;
  text-decoration: none; color: var(--wc-text-body);
  font-family: var(--wc-font-family);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.wc-grid-item:active { background: #f7f7f7; }
.wc-grid-icon { font-size: 28px; margin-bottom: 8px; line-height: 1; }
.wc-grid-text { font-size: 13px; color: #333; }

/* ========== 9. 页面容器 & 工具类 ========== */
.wc-page {
  background: var(--wc-bg-page);
  min-height: 100vh;
  font-family: var(--wc-font-family);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 20px;
}
.wc-text-title { color: var(--wc-text-title); }
.wc-text-body  { color: var(--wc-text-body); }
.wc-text-aux   { color: var(--wc-text-aux); }
.wc-text-primary { color: var(--wc-primary); }
.wc-text-center { text-align: center; }

/* 空状态 */
.wc-empty { padding: 50px 20px; text-align: center; color: var(--wc-text-aux); font-size: 14px; }
.wc-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
