 
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; }

.page { min-height: 100vh; }

/* 登录页 */
.login-box { max-width: 400px; margin: 100px auto; padding: 40px; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.login-box h1 { text-align: center; margin-bottom: 30px; font-size: 24px; color: #1a73e8; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #666; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #1a73e8; }
.form-group button[type="submit"] { width: 100%; padding: 14px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; }
.error-msg { color: #e53935; text-align: center; margin-top: 10px; font-size: 14px; }
.tip { text-align: center; margin-top: 20px; font-size: 12px; color: #999; }

/* 后台布局 */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; background: #1a1a2e; color: white; display: flex; flex-direction: column; }
.logo { padding: 24px 20px; font-size: 18px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar nav { flex: 1; padding: 16px 0; }
.sidebar nav a { display: block; padding: 14px 20px; color: rgba(255,255,255,0.7); text-decoration: none; transition: 0.2s; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,0.1); color: white; }
.logout { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.logout button { width: 100%; padding: 10px; background: rgba(255,255,255,0.1); color: white; border: none; border-radius: 6px; cursor: pointer; }

.main { margin-left: 220px; padding: 24px; }
.content h2 { margin-bottom: 24px; font-size: 22px; color: #333; }
.section { background: white; padding: 24px; border-radius: 12px; margin-bottom: 24px; }
.section h3 { font-size: 16px; color: #666; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eee; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { background: white; padding: 24px; border-radius: 12px; text-align: center; }
.stat-num { font-size: 36px; font-weight: bold; color: #1a73e8; }
.stat-label { margin-top: 8px; font-size: 14px; color: #666; }

/* 签到配置 */
.sign-config-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 20px; }
.sign-day { background: #f5f5f5; padding: 16px; border-radius: 8px; text-align: center; }
.sign-day label { font-size: 14px; color: #666; display: block; margin-bottom: 8px; }
.sign-day input { width: 100%; padding: 8px; text-align: center; border: 1px solid #ddd; border-radius: 4px; }

/* 连续签到奖励列表 */
.reward-item { display: flex; align-items: center; padding: 12px; background: #f5f5f5; border-radius: 8px; margin-bottom: 8px; }
.reward-item span { flex: 1; }
.reward-item button { padding: 6px 12px; background: #e53935; color: white; border: none; border-radius: 4px; cursor: pointer; }

/* 表单 */
.form { background: white; padding: 20px; border-radius: 12px; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.form textarea { resize: vertical; }

.btn-primary { padding: 12px 24px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { opacity: 0.9; }
.btn-small { padding: 6px 12px; background: #1a73e8; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-danger { padding: 6px 12px; background: #e53935; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }

/* 列表 */
.list-table { width: 100%; border-collapse: collapse; }
.list-table th, .list-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
.list-table th { background: #f8f9fa; font-weight: 600; color: #666; }
.list-table tr:hover { background: #f8f9fa; }

/* 标签 */
.tag { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.tag-draft { background: #f5f5f5; color: #666; }
.tag-active { background: #e8f5e9; color: #2e7d32; }
.tag-closed { background: #fff3e0; color: #e65100; }
.tag-settled { background: #e3f2fd; color: #1565c0; }
.tag-pending { background: #fff3e0; color: #e65100; }
.tag-shipped { background: #e3f2fd; color: #1565c0; }
.tag-completed { background: #e8f5e9; color: #2e7d32; }
.tag-blacklist { background: #ffebee; color: #c62828; }

/* tabs */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { padding: 8px 16px; background: #f5f5f5; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.tab.active { background: #1a73e8; color: white; }

/* 搜索栏 */
.search-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.search-bar input { flex: 1; padding: 10px 16px; border: 1px solid #ddd; border-radius: 8px; }
.search-bar button { padding: 10px 20px; background: #1a73e8; color: white; border: none; border-radius: 8px; cursor: pointer; }

/* 添加行 */
.add-row { display: flex; gap: 12px; margin-top: 12px; }
.add-row input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; }
.add-row button { padding: 8px 16px; background: #1a73e8; color: white; border: none; border-radius: 6px; cursor: pointer; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.pagination button { padding: 8px 14px; border: 1px solid #ddd; background: white; border-radius: 6px; cursor: pointer; }
.pagination button.active { background: #1a73e8; color: white; border-color: #1a73e8; }

/* 弹窗 */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; padding: 30px; border-radius: 12px; max-width: 500px; width: 90%; }
.modal-content h3 { margin-bottom: 20px; }
.modal-row { display: flex; gap: 12px; margin-bottom: 12px; }
.modal-row input, .modal-row select { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.modal-actions button { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; }
.modal-actions .btn-cancel { background: #e0e0e0; color: #333; }
.modal-actions .btn-confirm { background: #1a73e8; color: white; }
/* 用户管理样式 */
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.points-tag { background: #e8f5e9; color: #2e7d32; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.list-toolbar { margin-bottom: 16px; }

/* modal增强 */
.modal input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 12px; }
.modal h3 { margin-bottom: 20px; color: #333; }

/* 图片上传样式 */
.upload-row.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-row {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  background: #fafafa;
  position: relative;
  min-height: 80px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-row:hover { border-color: #4a90d9; background: #f0f7ff; }
.upload-hint { color: #999; font-size: 13px; }
.upload-preview { position: relative; display: inline-block; }
.upload-remove {
  position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #ff4d4f; color: white; font-size: 14px;
  line-height: 20px; text-align: center; cursor: pointer;
}
