* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: "PingFang SC", "Hiragino Sans GB", sans-serif; background: #f5f6f8; color: #222;
  max-width: 560px; margin: 0 auto; min-height: 100vh; }
.hidden { display: none !important; }
.view { padding-bottom: 40px; }

/* 登录 */
.login-box { padding: 80px 32px; text-align: center; }
.login-box h1 { font-size: 32px; color: #d4380d; }
.login-box .sub { color: #888; margin: 8px 0 32px; }
.login-box input { width: 100%; padding: 14px; margin-bottom: 14px; border: 1px solid #ddd;
  border-radius: 10px; font-size: 16px; }
.hint { color: #aaa; font-size: 12px; margin-top: 16px; line-height: 1.6; }

/* 顶栏 & 标签 */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 5; font-weight: 600; }
.link { color: #d4380d; cursor: pointer; font-weight: 500; }
.tabs { display: flex; background: #fff; border-bottom: 1px solid #eee; overflow-x: auto; }
.tabs .tab { flex: 1; text-align: center; padding: 12px 4px; font-size: 14px; color: #666;
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs .tab.on { color: #d4380d; border-bottom-color: #d4380d; font-weight: 600; }

/* 列表卡片 */
.list { padding: 12px; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; }
.card .row1 { display: flex; justify-content: space-between; align-items: center; }
.card .title { font-size: 16px; font-weight: 600; }
.card .meta { color: #999; font-size: 12px; margin-top: 6px; line-height: 1.6; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 20px; }
.badge.pending { background: #fff7e6; color: #d46b08; }
.badge.submitted { background: #e6f4ff; color: #1677ff; }
.badge.rejected { background: #fff1f0; color: #cf1322; }
.badge.approved { background: #f6ffed; color: #389e0d; }
.empty { text-align: center; color: #bbb; padding: 60px 0; }

/* 任务详情 */
#detail-body { padding: 12px; }
.section { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.section h3 { font-size: 15px; margin-bottom: 10px; }
.photo-item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.photo-item:last-child { border-bottom: none; }
.photo-item .pi-head { display: flex; justify-content: space-between; align-items: center; }
.photo-item .pi-label { font-weight: 600; font-size: 14px; }
.photo-item .pi-hint { color: #999; font-size: 12px; margin-top: 2px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 92px; height: 92px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.thumb .del { position: absolute; top: -6px; right: -6px; background: #cf1322; color: #fff;
  width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px;
  font-size: 12px; cursor: pointer; }
.thumb .flag { position: absolute; bottom: 2px; left: 2px; right: 2px; background: rgba(207,19,34,.85);
  color: #fff; font-size: 10px; text-align: center; border-radius: 4px; padding: 1px 0; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.field input, .field textarea { width: 100%; padding: 10px; border: 1px solid #ddd;
  border-radius: 8px; font-size: 15px; font-family: inherit; }
.field textarea { min-height: 64px; }

.btn { padding: 10px 18px; border: none; border-radius: 8px; font-size: 15px; cursor: pointer;
  background: #eee; color: #333; }
.btn.primary { background: #d4380d; color: #fff; }
.btn.success { background: #389e0d; color: #fff; }
.btn.danger { background: #cf1322; color: #fff; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; padding: 14px; font-size: 16px; }
.btn.ghost { background: rgba(255,255,255,.2); color: #fff; }
.btn:disabled { opacity: .5; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.alert.warn { background: #fff7e6; color: #d46b08; }
.alert.error { background: #fff1f0; color: #cf1322; }
.kv { font-size: 13px; color: #666; line-height: 1.9; }
.kv b { color: #222; }

/* 相机遮罩 */
#camera-overlay { position: fixed; inset: 0; background: #000; z-index: 100;
  display: flex; flex-direction: column; }
#camera-video { flex: 1; width: 100%; object-fit: cover; }
#camera-tip { position: absolute; top: 20px; left: 0; right: 0; text-align: center; color: #fff;
  font-size: 15px; text-shadow: 0 1px 3px #000; padding: 0 20px; }
.camera-controls { position: absolute; bottom: 0; left: 0; right: 0; display: flex;
  justify-content: space-between; align-items: center; padding: 24px; }
#shutter { width: 68px; height: 68px; border-radius: 50%; background: #fff;
  border: 5px solid rgba(255,255,255,.4); cursor: pointer; }

/* 大图预览 */
#photo-viewer { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 90;
  display: flex; flex-direction: column; justify-content: center; align-items: center; }
#photo-viewer img { max-width: 100%; max-height: 82%; }
#photo-viewer .pv-meta { color: #ccc; font-size: 12px; padding: 10px 20px; text-align: center; line-height: 1.8; }
#photo-viewer .pv-actions { display: flex; gap: 12px; }

#toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 20px; border-radius: 24px;
  font-size: 14px; z-index: 200; max-width: 80%; text-align: center; }
