:root {
  --primary: #18b566;
  --primary-d: #129a55;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #8a9099;
  --line: #ececec;
  --orange: #ff8c2b;
  --danger: #e8543f;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 60px; }

/* 顶部导航 */
#nav {
  position: sticky; top: 0; z-index: 20;
  height: 50px; background: var(--primary); color: #fff;
  display: flex; align-items: center; padding: 0 12px;
  font-size: 17px; font-weight: 600;
  padding-top: env(safe-area-inset-top, 0);
}
.nav-title { flex: 1; text-align: center; }
.nav-back { width: 32px; font-size: 26px; cursor: pointer; display: none; }
.nav-back.show { display: block; }

/* 内容 */
#view { padding: 14px; min-height: 60vh; padding-top: 14px; }

/* 底部 tab */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 56px; background: #fff;
  border-top: 1px solid var(--line); display: none; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#tabbar.show { display: flex; }
.tab-item { flex: 1; text-align: center; padding-top: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.tab-item.active { color: var(--primary); }
.tab-item .ic { font-size: 22px; display: block; line-height: 1.1; }

/* 卡片 */
.card { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pill { display: inline-block; background: #eafaf1; color: var(--primary); font-size: 12px; padding: 2px 8px; border-radius: 10px; margin-right: 6px; }
.pill.o { background: #fff3e8; color: var(--orange); }
.tag { display: inline-block; background: #f0f2f5; color: #555; font-size: 11px; padding: 1px 7px; border-radius: 8px; margin: 2px 4px 2px 0; }

/* 表单 */
.field { margin-bottom: 14px; }
.field-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, .textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 15px; background: #fff; outline: none;
}
.input:focus, .textarea:focus, select:focus { border-color: var(--primary); }
.textarea { min-height: 90px; resize: vertical; }
.btn {
  display: block; width: 100%; background: var(--primary); color: #fff;
  border: none; border-radius: 24px; padding: 13px; font-size: 16px; font-weight: 600;
  cursor: pointer; margin-top: 10px;
}
.btn:active { background: var(--primary-d); }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.o { background: var(--orange); }
.btn.disabled { background: #c8c8c8; }
.btn.sm { display: inline-block; width: auto; padding: 7px 16px; font-size: 13px; border-radius: 18px; margin: 0; }

/* 顶部大标题区 */
.hero { text-align: center; padding: 30px 10px 14px; }
.hero .logo { font-size: 40px; font-weight: 800; color: var(--primary); letter-spacing: 4px; }
.hero .sub { color: var(--muted); margin-top: 6px; }

/* 任务卡片 */
.task { position: relative; }
.task .t-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.task .t-pay { color: var(--orange); font-weight: 700; font-size: 18px; }
.task .t-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.task .dist { position: absolute; top: 14px; right: 14px; color: var(--primary); font-size: 12px; }

/* 置顶标记（付费置顶的信息在大厅优先展示） */
.task .pin-flag { position: absolute; top: -1px; left: -1px; background: var(--orange); color: #fff; font-size: 11px; padding: 1px 9px; border-radius: 12px 4px 12px 4px; }

/* 筛选面板 */
.hall-filter { display: none; margin-top: 10px; }
.hall-filter.show { display: block; }
.hall-filter .field { margin-bottom: 8px; }
.filter-2col { display: flex; gap: 8px; }
.filter-2col > * { flex: 1; min-width: 0; }

/* 排序条 */
.sortbar { display: flex; background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.sortbar .sb { flex: 1; text-align: center; padding: 9px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.sortbar .sb.active { color: var(--primary); font-weight: 600; background: #eafaf1; }

/* 评分星 */
.stars { color: #ffb400; letter-spacing: 2px; }
.credit-big { font-size: 34px; font-weight: 800; color: var(--primary); }

/* 聊天 */
.chat-box { height: 46vh; overflow-y: auto; background: #f7f8fa; border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.msg { margin-bottom: 10px; display: flex; }
.msg.me { justify-content: flex-end; }
.msg .bubble { max-width: 72%; padding: 8px 12px; border-radius: 14px; background: #fff; font-size: 14px; word-break: break-word; }
.msg.me .bubble { background: var(--primary); color: #fff; }
.chat-input { display: flex; gap: 8px; }
.chat-input .input { flex: 1; }

/* 模态 */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-box { background: #fff; border-radius: 14px; padding: 18px; width: 86%; max-width: 360px; }
.modal-box h3 { margin: 0 0 12px; }

/* toast */
.toast {
  position: fixed; left: 50%; top: 40%; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 99; display: none; max-width: 80%;
}
.toast.show { display: block; }

/* 果汁充值页：双二维码 */
.qr-grid { display: flex; gap: 12px; }
.qr-box { flex: 1; min-width: 0; text-align: center; background: #fafbfc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; }
.qr-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.qr-img { width: 100%; max-width: 150px; border-radius: 10px; background: #fff; border: 1px solid var(--line); object-fit: contain; }

/* 充值须知（法务文本） */
.notice { font-size: 13px; line-height: 1.85; color: #3a4048; }
.notice-h { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.notice-h2 { font-weight: 600; color: var(--primary-d); margin: 8px 0 4px; }
.notice-p { margin-bottom: 2px; }

/* 空态 */
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty .ic-svg { display: block; margin: 0 auto 10px; color: #c8cdd4; }

/* 位置卡片（大厅）：定位状态 + 附近范围档位 */
.loc-card .loc-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.loc-card .loc-h { font-weight: 600; font-size: 14px; }
.loc-card .loc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.loc-card .loc-sub b { color: var(--primary-d); font-weight: 600; }
.loc-acts { display: flex; gap: 6px; flex: none; }
.loc-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.chip { padding: 4px 12px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; color: #555; background: #fff; cursor: pointer; white-space: nowrap; }
.chip.on { background: #eafaf1; border-color: var(--primary); color: var(--primary-d); font-weight: 600; }
.loc-clear { color: var(--muted); text-decoration: underline; cursor: pointer; }

/* 内联 SVG 图标（全站统一，替代 emoji，避免缺字体渲染成方框） */
.ic-svg { vertical-align: -0.15em; flex: none; }
.btn .ic-svg { vertical-align: -3px; margin-right: 3px; }
.tab-item .ic svg { display: block; margin: 0 auto 1px; }
.stars .ic-svg { vertical-align: -1px; margin-right: 2px; }
.nav-home svg, .nav-bell svg { vertical-align: middle; }
#rv-stars .ic-svg { vertical-align: middle; }

/* 徽标 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge.g { background: #eafaf1; color: var(--primary); }
.badge.o { background: #fff3e8; color: var(--orange); }
.badge.r { background: #fdecea; color: var(--danger); }
.badge.gray { background: #f0f2f5; color: #777; }

/* 认证状态条 */
.auth-strip { background: #fff7e8; color: #a86a00; padding: 9px 14px; font-size: 13px; border-radius: 10px; margin-bottom: 12px; }

/* 兼职风险提示 */
.risk-warn { background: #fff1f0; color: #c0392b; border: 1px solid #ffd6d2; padding: 10px 14px; font-size: 13px; line-height: 1.6; border-radius: 10px; margin-bottom: 12px; }
.risk-banner { background: linear-gradient(135deg,#fff9ef,#fff3e0); border: 1px solid #ffe0b2; color: #8a5a00; }
.risk-line { background: #fff7e8; color: #a86a00; padding: 7px 12px; font-size: 12px; line-height: 1.5; border-radius: 8px; margin-bottom: 8px; }

/* 预览图 */
.preview-img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; background: #f0f2f5; }
.upload-box { border: 1px dashed var(--line); border-radius: 10px; height: 160px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; cursor: pointer; }
.ocr-tip { background: #eafaf1; color: var(--primary); font-size: 12px; padding: 6px 10px; border-radius: 8px; margin-top: 8px; }
.ocr-tip.fail { background: #f0f2f5; color: var(--muted); }

/* 顶部导航：返回/首页/铃铛 */
.nav-back, .nav-home, .nav-bell { color: #fff; cursor: pointer; user-select: none; }
.nav-home, .nav-bell { display: none; width: 34px; text-align: center; font-size: 20px; position: relative; }
.nav-home.show, .nav-bell.show { display: block; }
.nav-bell .badge {
  position: absolute; top: -5px; right: -7px; background: var(--danger); color: #fff;
  border-radius: 10px; font-size: 10px; line-height: 1; padding: 2px 5px; min-width: 16px;
  text-align: center; border: 1.5px solid var(--primary);
}

/* 强提醒横幅（关键事件：被接单 / 订单变更） */
.nbanner {
  position: fixed; top: 50px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  z-index: 60; padding: 10px 14px; background: #fff; border-bottom: 2px solid var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,.12); display: none;
}
.nbanner.show { display: block; animation: nbIn .25s ease; }
@keyframes nbIn { from { transform: translate(-50%, -100%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.nbanner .nb-title { font-weight: 700; color: var(--primary-d); font-size: 14px; }
.nbanner .nb-body { font-size: 13px; color: var(--text); margin-top: 2px; }

/* 通知列表 */
.ntf-list { max-height: 60vh; overflow-y: auto; margin: 4px -4px 0; }
.ntf-item { padding: 11px 8px; border-bottom: 1px solid var(--line); }
.ntf-item.unread { background: #f4fbf7; }
.ntf-title { font-size: 14px; font-weight: 600; color: var(--text); }
.ntf-body { font-size: 13px; color: #555; margin-top: 3px; }
.ntf-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* 开关（邮件通知） */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #ccc; border-radius: 26px; transition: .2s; }
.switch .slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ---------- 招聘信息转发（分享到微信 / 朋友圈） ---------- */
.share-overlay { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.share-sheet { width: 100%; max-width: 480px; background: var(--card); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0,0,0,.15); animation: sheetUp .22s ease; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.share-sheet-h { font-size: 17px; font-weight: 700; color: var(--text); text-align: center; margin-bottom: 12px; }
.share-qr { background: #f7f8fa; border-radius: 14px; padding: 14px; text-align: center; margin-bottom: 6px; }
.share-qr img { width: 200px; height: 200px; display: inline-block; border-radius: 8px; background: #fff; }
.share-url { font-size: 12px; color: var(--muted); word-break: break-all; text-align: center; margin: 8px 0 2px; padding: 8px; background: #f7f8fa; border-radius: 8px; }
.wx-tip { font-size: 13px; color: var(--primary); background: #eafaf1; border-radius: 8px; padding: 8px 10px; text-align: center; margin: 6px 0; }
.row { display: flex; align-items: center; gap: 8px; }

/* 个人中心菜单：分组卡片 + 内联 SVG 图标（替代 emoji，避免部分环境渲染成方框） */
.mcard { background: var(--card); border-radius: 14px; margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.mcard-t { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .4px; padding: 14px 16px 4px; }
.mitem { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mitem + .mitem { border-top: 1px solid var(--line); }
.mitem:active { background: #f4f6f8; }
.mi-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.mi-ico.c-green { background: #eafaf1; color: var(--primary); }
.mi-ico.c-blue { background: #eaf1fd; color: #3b7ddd; }
.mi-ico.c-purple { background: #f2edfd; color: #7c5cf0; }
.mi-ico.c-pink { background: #fdeaf1; color: #e8547f; }
.mi-ico.c-teal { background: #e4f7f4; color: #0fb2a0; }
.mi-ico.c-indigo { background: #eceefb; color: #5b6bd6; }
.mi-ico.c-amber { background: #fdf3e3; color: #cf8a1e; }
.mi-ico.c-org { background: #fff3e8; color: var(--orange); }
.mi-ico.c-gray { background: #f0f2f5; color: #6b7280; }
.mi-ico.c-cyan { background: #e6f6fb; color: #0aa2c0; }
.mi-ico.c-red { background: #fdecea; color: var(--danger); }
.mi-ico.c-red + .mi-txt b { color: var(--danger); }
.mi-txt { flex: 1; min-width: 0; }
.mi-txt b { display: block; font-weight: 500; font-size: 15px; color: var(--text); line-height: 1.35; }
.mi-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.mi-tag { flex: none; font-size: 11px; font-weight: 600; color: var(--orange); background: #fff3e8; border-radius: 10px; padding: 3px 8px; }
.mi-go { flex: none; color: #c8ccd2; display: flex; align-items: center; }

/* 公开页应聘表单（校招扫码填表） */
.ap-proof { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg,#eafaf1,#fff); border: 1px solid #b7ebcd; }
.ap-proof-n { flex: none; font-size: 22px; font-weight: 800; color: var(--primary); }
.ap-form { text-align: left; }
.ap-form .field-label { display: block; margin: 10px 0 5px; }
.ap-grid { display: flex; gap: 10px; }
.ap-grid > div { flex: 1; min-width: 0; }
textarea.input { min-height: 74px; resize: vertical; line-height: 1.5; padding: 10px 12px; }

/* 公开招聘落地页（免登录） */
.pub-hero { background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; padding: 36px 20px 28px; text-align: center; }
.pub-hero .logo { font-size: 38px; font-weight: 800; letter-spacing: 6px; }
.pub-hero .sub { color: rgba(255,255,255,.85); margin-top: 8px; font-size: 14px; }
