/* ========================================
   v600：员工端手机 UI（完全独立设计系统）
   - 仅在 员工账号 + ≤768px 时由 WorkerMobile 激活
   - 浅色系：渐变头部 + 20px 大圆角白卡 + 60px 底部导航
   - 所有类名 wm- 前缀，PC 端 / 老板端零影响
   ======================================== */

/* PC 端 / 超宽屏永远隐藏 */
@media (min-width: 769px) {
  #worker-app { display: none !important; }
}

#worker-app {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,181,165,0.08);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
#worker-app.hidden { display: none; }
#worker-app * { box-sizing: border-box; }
#worker-app input, #worker-app textarea, #worker-app select { font-size: 16px; } /* iOS 防聚焦缩放 */

/* ===== 页面滚动区 ===== */
.wm-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

/* ===== 渐变头部（高约 200px，含状态留白） ===== */
.wm-head {
  padding: calc(20px + env(safe-area-inset-top)) 20px 56px;
  color: #fff;
  position: relative;
}
.wm-head-blue  { background: linear-gradient(135deg, #009E90 0%, #00B5A5 55%, #00B5A5 100%); }
.wm-head-orange{ background: linear-gradient(135deg, #d97706 0%, #f97316 60%, #ea580c 100%); }
.wm-head-pink  { background: linear-gradient(135deg, #db2777 0%, #db2777 55%, #db2777 100%); }
/* v602 首页：淡蓝天空渐变 + 深色文字（按设计稿） */
.wm-head-sky {
  background: linear-gradient(180deg, rgba(0,181,165,0.12) 0%, rgba(0,181,165,0.1) 55%, rgba(0,181,165,0.08) 100%);
  color: #1a1a1a;
  padding: calc(28px + env(safe-area-inset-top)) 20px 68px;
}
.wm-head-date-big {
  font-size: 27px; font-weight: 800; text-align: center; letter-spacing: 1px; color: #1a1a1a;
}
.wm-head-date-big .wm-head-week { font-size: 20px; margin-left: 8px; font-weight: 700; }
.wm-head-title {
  font-size: 22px; font-weight: 700; letter-spacing: 0.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wm-head-date { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.wm-back-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; cursor: pointer; flex-shrink: 0;
  border: none;
}
.wm-back-btn:active { background: rgba(255, 255, 255, 0.35); }

/* 头部大数字（工资页） */
.wm-head-amount { font-size: 40px; font-weight: 800; line-height: 1.15; margin-top: 14px; }
.wm-head-amount small { font-size: 15px; font-weight: 600; opacity: 0.9; margin-right: 4px; }
.wm-head-sub { font-size: 13px; opacity: 0.9; margin-top: 6px; }
.wm-head-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wm-head-chip {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; color: #fff;
}

/* 头部内容压卡：内容区上移叠住头部底部 */
.wm-overlap { margin-top: -40px; padding: 0 16px; position: relative; }

/* ===== 卡片 ===== */
.wm-card {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(15,60,55, 0.06);
}
.wm-card-title { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.wm-card-title .wm-more { font-size: 12.5px; font-weight: 500; color: #00B5A5; cursor: pointer; }

/* 统计双卡 */
.wm-stat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.wm-stat-card {
  background: #fff; border-radius: 20px; padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(15,60,55, 0.06);
}
.wm-stat-label { font-size: 13px; color: #5c6e6b; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.wm-stat-ico {
  width: 22px; height: 22px; border-radius: 6px; background: rgba(0,181,165,0.08); color: #00B5A5;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wm-stat-ico svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wm-stat-value { font-size: 30px; font-weight: 800; color: #1a1a1a; margin-top: 8px; }
.wm-stat-value small { font-size: 13px; font-weight: 600; color: #9ca3af; margin-left: 3px; }
.wm-stat-value.green { color: #16a34a; }
.wm-stat-value.blue  { color: #00B5A5; }
.wm-stat-value.orange{ color: #ea580c; }

/* ===== 打卡按钮 ===== */
.wm-sign-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 0 2px; }
.wm-sign-btn {
  width: 172px; height: 172px; border-radius: 50%;
  border: none;
  color: #fff; font-size: 21px; font-weight: 700; letter-spacing: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer;
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.55), 0 14px 32px rgba(22, 163, 74, 0.32);
  background: linear-gradient(145deg, #16a34a 0%, #16a34a 45%, #16a34a 100%);
  transition: transform 0.12s ease;
  outline: none; -webkit-appearance: none;
}
.wm-sign-btn svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.wm-sign-btn:active { transform: scale(0.95); }
.wm-sign-btn .wm-sign-time { font-size: 12px; font-weight: 500; opacity: 0.92; letter-spacing: 0; }
.wm-sign-btn.done {
  background: linear-gradient(145deg, #52d3c5 0%, #009E90 45%, #00B5A5 100%);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.55), 0 14px 32px rgba(0,181,165, 0.3);
}
.wm-sign-btn.rejected {
  background: linear-gradient(145deg, #dc2626 0%, #dc2626 50%, #dc2626 100%);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.55), 0 14px 32px rgba(220,38,38, 0.3);
}
.wm-sign-hint { font-size: 12px; color: rgba(255, 255, 255, 0.85); margin-top: 14px; }
.wm-head-sky .wm-sign-hint { color: #9ca3af; }

/* ===== 打卡首页日期行 ===== */
.wm-day-strip { display: flex; gap: 8px; }
.wm-day-item {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 12px;
  font-size: 12px; color: #9ca3af; background: #eef5f4;
}
.wm-day-item b { display: block; font-size: 17px; color: #5c6e6b; font-weight: 700; margin-bottom: 2px; }
.wm-day-item.today { background: #00B5A5; color: rgba(255, 255, 255, 0.85); }
.wm-day-item.today b { color: #fff; }

/* ===== 列表行 ===== */
.wm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #eef5f4; cursor: pointer;
}
.wm-row:last-child { border-bottom: none; padding-bottom: 2px; }
.wm-row:active { background: #f4faf9; }
.wm-row-body { flex: 1; min-width: 0; }
.wm-row-title { font-size: 14.5px; font-weight: 600; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-row-sub { font-size: 12.5px; color: #9ca3af; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-row-right { text-align: right; flex-shrink: 0; }
.wm-row-amount { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.wm-row-amount.in { color: #16a34a; }
/* v602 任务行：蓝色圆图标 + 右箭头（按设计稿） */
.wm-row-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: #00B5A5; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 17px; font-weight: 700;
}
.wm-row-avatar svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wm-row-avatar.orange { background: #f97316; }
.wm-row-arrow { color: #c2d0ce; font-size: 20px; font-weight: 700; flex-shrink: 0; line-height: 1; }

/* 状态标签 */
.wm-tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.wm-tag.green { background: rgba(22,163,74,0.1); color: #16a34a; }
.wm-tag.amber { background: #fef3c7; color: #b45309; }
.wm-tag.red { background: #fee2e2; color: #dc2626; }
.wm-tag.blue { background: rgba(0,181,165,0.12); color: #00B5A5; }
.wm-tag.gray { background: #eef5f4; color: #9ca3af; }

/* 缩略图（现场记录） */
.wm-thumb {
  width: 80px; height: 80px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  background: #eef5f4;
}

/* v626：无预览帧的记录类型（语音/文字）图标缩略块 + 多类型快捷入口 */
.wm-thumb-ico {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #9ca3af;
}
.wm-quick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.wm-quick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 9px 0; border: none; border-radius: 14px;
  background: rgba(255, 255, 255, 0.92); cursor: pointer;
  font-size: 20px; line-height: 1;
}
.wm-quick-btn span { font-size: 11.5px; font-weight: 600; color: #00B5A5; }
.wm-quick-btn:active { transform: scale(0.96); }

/* 空状态 */
.wm-empty { text-align: center; padding: 36px 20px; color: #9ca3af; font-size: 13.5px; }
.wm-empty .wm-empty-icon { font-size: 38px; margin-bottom: 10px; opacity: 0.7; }

/* ===== 现场记录大按钮 ===== */
.wm-capture-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 0; border: none; border-radius: 999px;
  background: #fff; color: #00B5A5; font-size: 16px; font-weight: 700;
  box-shadow: 0 2px 12px rgba(15,60,55, 0.08); cursor: pointer;
}
.wm-capture-btn:active { transform: scale(0.98); }

/* ===== 我的页面 ===== */
.wm-profile { display: flex; align-items: center; gap: 14px; }
.wm-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25); border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wm-profile-name { font-size: 19px; font-weight: 700; color: #fff; }
.wm-profile-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.85); margin-top: 3px; }

/* 菜单列表 */
.wm-menu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 2px; border-bottom: 1px solid #eef5f4; cursor: pointer; font-size: 15px; color: #5c6e6b;
}
.wm-menu-row:last-child { border-bottom: none; }
.wm-menu-row:active { background: #f4faf9; }
.wm-menu-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.wm-menu-arrow { margin-left: auto; color: #c2d0ce; font-size: 14px; }

/* ===== 底部导航（4 tab，60px） ===== */
.wm-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid #eef5f4;
  display: flex; align-items: stretch;
  box-shadow: 0 -2px 12px rgba(15,60,55, 0.04);
}
.wm-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: #9ca3af; cursor: pointer;
  background: none; border: none; padding: 0;
}
.wm-tab svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wm-tab.active { color: #00B5A5; font-weight: 600; }

/* ===== 底部 Sheet 弹层 ===== */
.wm-sheet-mask {
  position: fixed; inset: 0; z-index: 960;
  background: rgba(15,60,55, 0.45);
  display: flex; align-items: flex-end;
  animation: wmFade 0.18s ease;
}
.wm-sheet {
  width: 100%; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  animation: wmUp 0.24s cubic-bezier(0.32, 1, 0.46, 1);
}
@keyframes wmUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes wmFade { from { opacity: 0; } to { opacity: 1; } }
.wm-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #cddad7; margin: 0 auto 14px; }
.wm-sheet-title { font-size: 16.5px; font-weight: 700; color: #1a1a1a; text-align: center; margin-bottom: 16px; }

/* 表单 */
.wm-field { margin-bottom: 14px; }
.wm-field-label { font-size: 13px; color: #9ca3af; margin-bottom: 7px; font-weight: 600; }
.wm-seg { display: flex; background: #eef5f4; border-radius: 12px; padding: 3px; }
.wm-seg-item { flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; font-size: 14px; color: #9ca3af; cursor: pointer; }
.wm-seg-item.on { background: #fff; color: #00B5A5; font-weight: 700; box-shadow: 0 1px 4px rgba(15,60,55, 0.1); }
.wm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wm-chip-pick {
  padding: 8px 14px; border-radius: 999px; border: 1px solid #cddad7;
  font-size: 13px; color: #5c6e6b; background: #fff; cursor: pointer;
}
.wm-chip-pick.on { background: rgba(0,181,165,0.08); border-color: #00B5A5; color: #00B5A5; font-weight: 600; }
.wm-input {
  width: 100%; border: 1px solid #cddad7; border-radius: 12px;
  padding: 11px 14px; font-size: 15px; color: #1a1a1a; outline: none; background: #f4faf9;
}
.wm-input:focus { border-color: #00B5A5; background: #fff; }
.wm-textarea { width: 100%; border: 1px solid #cddad7; border-radius: 12px; padding: 11px 14px; font-size: 15px; line-height: 1.6; color: #1a1a1a; outline: none; background: #f4faf9; min-height: 96px; resize: none; } /* v844：备注至少 3 行 */
/* v609 打卡绑定项目：搜索 + 下拉多选 */
.wm-proj-drop { max-height: 210px; overflow-y: auto; border: 1px solid #cddad7; border-radius: 12px; background: #fff; overscroll-behavior: contain; }
.wm-proj-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; font-size: 15px; color: #1a1a1a; border-bottom: 1px solid #eef5f4; cursor: pointer; }
.wm-proj-opt:last-child { border-bottom: none; }
.wm-proj-opt.on { background: rgba(0,181,165,0.08); color: #00B5A5; font-weight: 600; }
.wm-proj-opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-proj-opt-check { width: 20px; text-align: center; color: #00B5A5; font-weight: 700; flex: none; }
.wm-proj-empty { padding: 16px; text-align: center; font-size: 13px; color: #9ca3af; }
.wm-chip-x { margin-left: 5px; font-size: 14px; opacity: 0.7; }
.wm-submit-btn {
  width: 100%; padding: 14px 0; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #00B5A5, #00B5A5); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 4px;
}
.wm-submit-btn:active { opacity: 0.9; }
.wm-submit-btn[disabled] { opacity: 0.55; }
.wm-submit-btn.green { background: linear-gradient(135deg, #059669, #059669); }

/* ===== 日历（考勤记录页） ===== */
.wm-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wm-cal-month { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.wm-cal-nav {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid #cddad7; background: #fff;
  color: #9ca3af; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.wm-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wm-cal-wd { text-align: center; font-size: 11px; color: #9ca3af; padding: 6px 0; }
.wm-cal-cell {
  aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 13.5px; color: #5c6e6b;
  position: relative; background: #f4faf9;
}
.wm-cal-cell.blank { background: transparent; }
.wm-cal-cell .wm-dot { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; }
.wm-dot.green { background: #16a34a; }
.wm-dot.amber { background: #d97706; }
.wm-dot.red { background: #dc2626; }
.wm-cal-cell.today { border: 1.5px solid #00B5A5; font-weight: 700; color: #00B5A5; }

/* ===== 图片灯箱 ===== */
.wm-lightbox {
  position: fixed; inset: 0; z-index: 980;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  animation: wmFade 0.18s ease;
}
.wm-lightbox img { max-width: 100%; max-height: 88%; border-radius: 10px; }
.wm-lightbox-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 18px; cursor: pointer;
}
.wm-lightbox-cap {
  position: absolute; bottom: calc(26px + env(safe-area-inset-bottom));
  left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: 13px; padding: 0 30px;
}

/* 上传中遮罩 */
.wm-busy {
  position: fixed; inset: 0; z-index: 970;
  background: rgba(15,60,55, 0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #fff; font-size: 14px;
}
.wm-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff;
  animation: wmSpin 0.8s linear infinite;
}
@keyframes wmSpin { to { transform: rotate(360deg); } }

/* ===== v629：wm-head-sky 风格统一（其他页头部按首页淡蓝天空风美化） ===== */
/* 淡蓝天空头部下的子元素颜色适配（深色文字系，替换原白字配色） */
.wm-head-sky .wm-back-btn { background: rgba(15,60,55,0.08); color:#1a1a1a; }
.wm-head-sky .wm-back-btn:active { background: rgba(15,60,55,0.16); }
.wm-head-sky .wm-head-title { color:#1a1a1a; }
.wm-head-sky .wm-head-date { color:#5c6e6b; opacity:1; }
.wm-head-sky .wm-head-sub { color:#5c6e6b; opacity:1; }
.wm-head-sky .wm-head-amount { color:#1a1a1a; }
.wm-head-sky .wm-head-amount small { color:#5c6e6b; opacity:1; }
.wm-head-sky .wm-head-chip {
  background:#fff; color:#5c6e6b; border:1px solid rgba(0,181,165,0.25);
  box-shadow:0 1px 4px rgba(15,60,55,0.05);
}
/* 我的页 sky 头部：头像/姓名适配 */
.wm-head-sky .wm-avatar {
  background: linear-gradient(135deg,#009E90,#00B5A5);
  border:2px solid rgba(255,255,255,0.7); color:#fff;
}
.wm-head-sky .wm-profile-name { color:#1a1a1a; }
.wm-head-sky .wm-profile-sub { color:#5c6e6b; }
/* 现场记录页 sky 头部：快捷按钮更精致 */
.wm-head-sky .wm-quick-btn {
  background:#fff; box-shadow:0 2px 10px rgba(15,60,55,0.07);
}

/* v629：统一搜索框样式（白底圆角+轻阴影，用于 sky 头部下） */
.wm-search {
  width:100%; box-sizing:border-box; padding:12px 16px; font-size:14px;
  border:none; border-radius:14px; background:#fff; color:#1a1a1a; outline:none;
  box-shadow:0 2px 10px rgba(15,60,55,0.06); margin-top:14px;
  -webkit-appearance:none;
}
.wm-search:focus { box-shadow:0 2px 14px rgba(0,181,165,0.2); }
