/* ===== Shared Component Styles ===== */
/* 统一设计系统 - v2.0 */
/* 参照 user.html 的精致风格优化配色/圆角/阴影 */
/* 底部导航在 footer.css 中 */

/* ===== CSS 变量 ===== */
:root {
  --primary: #6C5CE7;
  --secondary: #00CEFF;
  --danger: #FF7675;
  --warning: #FDCB6E;
  --success: #00B894;
  --light: #F5F6FA;
  --dark: #2D3436;
  --card-shadow: 0 4px 20px rgba(0,0,0,0.04);
  --card-radius: 16px;
  --header-radius: 24px;
  --btn-radius: 12px;
  --icon-radius: 12px;
}

/* ===== 通用渐变头部 ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 50%, var(--secondary) 100%);
  border-radius: var(--header-radius);
  padding: 20px 24px 24px;
  margin-bottom: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -25%;
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.page-header .header-content { position: relative; z-index: 1; }
.page-header .header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header h1 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
  flex-shrink: 0;
  text-decoration: none;
}
.back-btn:active { transform: scale(.9); background: rgba(255,255,255,.3); }


/* ===== 白色卡片 ===== */
.card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.card-title i { color: var(--primary); }

/* ===== 列表行 ===== */
.list-row {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f3;
  cursor: pointer;
  transition: background .2s;
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: rgba(108,92,231,.04); }
.list-row .lr-icon {
  width: 36px; height: 36px;
  border-radius: var(--icon-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
  flex-shrink: 0; margin-right: 14px;
}
.list-row .lr-info { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 14px; font-weight: 600; color: var(--dark); }
.list-row .lr-desc { font-size: 12px; color: #aaa; margin-top: 2px; }
.list-row .lr-arrow { color: #ddd; font-size: 16px; flex-shrink: 0; }

/* ===== Toggle Switch ===== */
.toggle {
  position: relative;
  width: 50px;
  height: 28px;
  background: #e0e0e8;
  border-radius: 14px;
  cursor: pointer;
  transition: background .3s;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.toggle:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
  transition: transform .3s;
}
.toggle.on { background: var(--primary); }
.toggle.on:after { transform: translateX(22px); }

/* ===== 筛选条 ===== */
.filter-box {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
}
.filter-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f3; }
.filter-label {
  font-size: 11px; color: #bbb;
  font-weight: 500; margin-right: 2px; min-width: 30px;
}
.filter-chip {
  padding: 5px 14px;
  background: #f0f0f5;
  border-radius: 16px;
  font-size: 11px; color: #888;
  cursor: pointer; border: none;
  transition: all .25s;
  white-space: nowrap;
}
.filter-chip:active { transform: scale(.92); }
.filter-chip.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(108,92,231,.25);
}
.filter-chip i { margin-right: 3px; font-size: 10px; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg,rgba(108,92,231,.08),rgba(0,206,255,.08));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 30px; color: var(--primary);
}
.empty-title { font-size: 16px; font-weight: 600; color: #999; margin-bottom: 4px; }
.empty-text { font-size: 13px; color: #ccc; }

/* ===== 加载状态 ===== */
.loading { text-align: center; padding: 60px 20px; color: #999; }
.loading .spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(108,92,231,.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 统计卡片 ===== */
.stat-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.stat-card .sc-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px; font-size: 14px; color: #fff;
}
.stat-card .sc-val {
  font-size: 20px; font-weight: 700;
  color: var(--dark); line-height: 1.2;
}
.stat-card .sc-val span { font-size: 11px; font-weight: 400; color: #999; }
.stat-card .sc-sub { font-size: 10px; color: #aaa; margin-top: 3px; }

/* ===== 三列统计布局 ===== */
.stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }

/* ===== 进度条 ===== */
.progress-track { height: 6px; background: #f0f0f5; border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width .6s ease;
}

/* ===== 加载更多按钮 ===== */
.btn-more-wrap { text-align: center; padding: 10px 0; }
.btn-more {
  padding: 8px 28px; border: none; border-radius: 20px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  background: #f0f0f5; color: #888; transition: all .25s;
}
.btn-more:active { transform: scale(.92); }

/* ===== 页面通用容器 ===== */
html { overflow-y: scroll; overflow-x: hidden; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body {
  background: linear-gradient(180deg, #f0eefb, var(--light));
  color: var(--dark);
  padding-bottom: 80px;
  min-height: 100vh;
}
.container { max-width: 768px;width: 100%; margin: 0 auto; padding: 16px; }

/* ===== 页面入场动画 ===== */
.page-enter {
  animation: pageIn .35s ease both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f5 25%, #e8e8ef 50%, #f0f0f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-block {
  height: 72px;
  margin-bottom: 10px;
}

/* ===== 错误重试 ===== */
.error-with-retry {
  text-align: center;
  padding: 60px 20px;
}
.error-with-retry .er-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,118,117,.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 28px; color: var(--danger);
}
.error-with-retry .er-title { font-size: 16px; font-weight: 600; color: #666; margin-bottom: 4px; }
.error-with-retry .er-text { font-size: 13px; color: #aaa; margin-bottom: 16px; }
.error-with-retry .er-btn {
  padding: 10px 28px; border: none; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .25s;
}
.error-with-retry .er-btn:active { transform: scale(.93); }
