/* 公共样式 — 移动端优先 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  font-size: 16px;
  color: #1D2129;
  background: #f5f6f7;
}
body { min-height: 100vh; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  min-height: 100vh;
}

/* 标题 */
.page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1D2129;
}
.page-subtitle {
  font-size: 13px;
  color: #86909C;
  margin-bottom: 24px;
  display: block;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #1D2129;
}

/* 表单 */
.form-item { margin-bottom: 16px; }
.form-label {
  font-size: 13px;
  color: #4E5969;
  margin-bottom: 8px;
  display: block;
}
.form-picker {
  width: 100%;
  height: 44px;
  background: #fff;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  color: #1D2129;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color .15s;
}
.form-picker:active { border-color: #E53935; }
.form-picker.placeholder { color: #C9CDD4; }
.form-input {
  width: 100%;
  height: 44px;
  background: #fff;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  color: #1D2129;
  outline: none;
}
.form-input:focus { border-color: #E53935; }
textarea.form-input {
  height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

/* 按钮 */
.btn {
  width: 100%;
  height: 48px;
  background: #E53935;
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:active { opacity: .9; transform: scale(.98); }
.btn.secondary {
  background: #fff;
  color: #4E5969;
  border: 1px solid #E5E6EB;
}
.btn.small {
  height: 36px;
  font-size: 13px;
  padding: 0 16px;
  width: auto;
  border-radius: 18px;
}
.btn.success { background: #00B42A; }
.btn.danger { background: #F53F3F; }

/* 链接 */
.link-center {
  text-align: center;
  padding: 16px;
  color: #86909C;
  font-size: 13px;
  cursor: pointer;
}
.link-center:active { color: #4E5969; }

/* 状态标签 */
.status-tag {
  display: inline-block;
  height: 26px;
  padding: 0 12px;
  line-height: 26px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 500;
}
.status-on { background: rgba(0,180,42,0.1); color: #00B42A; }
.status-rest { background: rgba(134,144,156,0.1); color: #86909C; }

/* 汇总表格 */
.summary-row {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid #F2F3F5;
  align-items: center;
}
.summary-row:last-child { border-bottom: none; }
.summary-row.head {
  background: #F7F8FA;
  font-size: 13px;
  font-weight: 600;
  color: #4E5969;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.summary-row.footer {
  background: #F7F8FA;
  font-weight: 600;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}
.col-name { flex: 2; font-size: 15px; color: #1D2129; }
.col-num { flex: 1; text-align: center; font-size: 15px; }
.col-num.success { color: #00B42A; font-weight: 500; }
.col-num.muted { color: #86909C; }

/* 统计卡 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: #fff;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: #E53935;
  display: block;
  line-height: 1.2;
}
.stat-num.success { color: #00B42A; }
.stat-num.muted { color: #86909C; }
.stat-label {
  font-size: 12px;
  color: #86909C;
  margin-top: 4px;
}

/* 顶栏 */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.icon-btn {
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #E5E6EB;
  border-radius: 18px;
  color: #4E5969;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color .15s, color .15s;
}
.icon-btn:active { border-color: #E53935; color: #E53935; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 48px 16px;
  color: #86909C;
}
.empty-icon { font-size: 48px; margin-bottom: 8px; }

/* Toast */
.toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Modal */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 300px;
  padding: 20px;
}
.modal-title { font-weight: 600; margin-bottom: 8px; }
.modal-content { font-size: 14px; color: #4E5969; margin-bottom: 20px; white-space: pre-line; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* 切换 Tab */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.tab {
  flex: 1;
  height: 32px;
  border-radius: 16px;
  background: #fff;
  color: #86909C;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tab.active { background: #E53935; color: #fff; font-weight: 600; }

/* 记录明细 */
.detail-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F2F3F5;
  font-size: 14px;
}
.detail-item:last-child { border-bottom: none; }
.detail-date { flex: 2; color: #4E5969; }
.detail-name { flex: 2; color: #1D2129; }

/* 月份选择 */
.month-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.month-picker {
  flex: 1;
  height: 40px;
  background: #F7F8FA;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
