/* ============================================================
   赏金岛 · 悬赏任务兼职平台
   设计系统：暖金质感 2.0（Warm Gold Premium）
   —— 分层阴影 / 毛玻璃 / 渐变品牌色 / 微交互动效
   ============================================================ */
:root {
  /* ---- 品牌色 ---- */
  --primary: #ff7a26;
  --primary-deep: #ea5a06;
  --primary-soft: #fff3e9;
  --grad-primary: linear-gradient(135deg, #ffa052 0%, #ff7a26 55%, #f25c05 100%);
  --grad-appbar: linear-gradient(132deg, #ff9c50 0%, #ff7a26 46%, #f25c05 100%);

  /* ---- 中性色（带蓝紫的 slate 系） ---- */
  --ink: #181c28;          /* 标题 */
  --text: #3f4657;         /* 正文 */
  --muted: #8f96a8;        /* 次要文字 */
  --faint: #b7bdcb;        /* 弱文字/占位 */
  --line: #ecedf2;         /* 边框 */
  --line-soft: #f3f4f7;    /* 浅边框/分割 */
  --bg: #f5f6f9;           /* 页面底 */
  --card: #ffffff;

  /* ---- 功能色 ---- */
  --ok: #0cb577;   --ok-bg: #e4f8f0;
  --warn: #f08a1e; --warn-bg: #fff3e1;  --warn-ink: #b25c00;
  --err: #f0453a;  --err-bg: #fdecea;
  --info: #3b6df3; --info-bg: #eaf0fe;
  --pink: #e84393;

  /* ---- 圆角 ---- */
  --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px; --r-full: 999px;

  /* ---- 阴影（低透明、大模糊、分层 = 悬浮质感） ---- */
  --sh-xs: 0 1px 2px rgba(24, 28, 40, .04);
  --sh-sm: 0 1px 3px rgba(24, 28, 40, .05), 0 4px 14px -6px rgba(24, 28, 40, .07);
  --sh-md: 0 2px 6px rgba(24, 28, 40, .05), 0 12px 30px -10px rgba(24, 28, 40, .11);
  --sh-lg: 0 4px 14px rgba(24, 28, 40, .06), 0 22px 50px -14px rgba(24, 28, 40, .16);
  --sh-primary: 0 6px 18px -6px rgba(242, 92, 5, .42);

  /* ---- 动效 ---- */
  --ease: cubic-bezier(.32, .72, .24, 1);
  --dur: .22s;
}

/* ========== 基础 ========== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  /* 顶部暖光晕 + 纯净底色，替代呆板的纯色背景 */
  background:
    radial-gradient(900px 380px at 50% -160px, rgba(255, 176, 110, .22), transparent 70%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255, 138, 61, .26); }
input, textarea, button { font-family: inherit; font-size: inherit; outline: none; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fafbfc;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: var(--ink);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 122, 38, .12);
}
textarea { resize: vertical; }
a { color: inherit; text-decoration: none; }
h3 { margin: 0 0 10px; font-size: 15px; color: var(--ink); letter-spacing: .2px; }
:focus-visible { outline: 2px solid rgba(242, 92, 5, .55); outline-offset: 2px; }

/* 数字统一等宽位宽，金额不跳动 */
.price, .stat-box b, .wallet-top b, .invite-rates b, .detail-price b,
.amt-pos, .amt-neg, .invite-code, .tbl td, .menu-badge { font-variant-numeric: tabular-nums; }

/* ========== 布局 ========== */
.app { min-height: 100vh; padding-bottom: 8px; }
.app.has-tabbar { padding-bottom: 66px; }
.page { max-width: 480px; margin: 0 auto; padding: 0 14px; }
.page-wide { max-width: 1024px; margin: 0 auto; padding: 0 16px; }

/* ========== 顶部栏 ========== */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--grad-appbar);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 10px 26px -14px rgba(242, 92, 5, .5);
}
.appbar .brand {
  font-size: 19px; font-weight: 900; letter-spacing: 1.5px; flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.appbar .brand small { font-size: 11px; font-weight: 400; opacity: .85; margin-left: 6px; letter-spacing: .5px; }
.appbar .search { flex: 1; min-width: 0; }
.appbar .search input {
  background: rgba(255, 255, 255, .92); border: none; height: 34px; padding: 0 14px;
  border-radius: var(--r-full); font-size: 13px; color: var(--ink);
  transition: box-shadow var(--dur), background var(--dur);
}
.appbar .search input::placeholder { color: #a8aebb; }
.appbar .search input:focus {
  background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}
.appbar.simple {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: var(--ink);
  border-bottom: 1px solid rgba(24, 28, 40, .06);
  box-shadow: none;
  font-weight: 700; font-size: 16px;
  justify-content: flex-start;
}
.appbar.simple .back {
  border: none; background: none; font-size: 24px; color: var(--ink);
  padding: 0 6px 2px 0; cursor: pointer; line-height: 1;
  transition: transform .15s var(--ease), color .15s;
}
.appbar.simple .back:hover { color: var(--primary); transform: translateX(-2px); }
.appbar .spacer { flex: 1; }

/* ========== 分类 chips ========== */
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 6px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row button {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: var(--r-full); padding: 6px 15px; font-size: 13px; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.cat-row button:hover { border-color: #ffd9b8; color: var(--primary-deep); }
.cat-row button.active {
  background: var(--grad-primary); border-color: transparent; color: #fff;
  font-weight: 600; box-shadow: 0 4px 12px -4px rgba(242, 92, 5, .42);
}

/* ========== 卡片（细腻边框 + 分层阴影） ========== */
.card {
  background: var(--card);
  border: 1px solid rgba(24, 28, 40, .045);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 16px; margin-top: 12px;
}

/* ========== 任务卡片 ========== */
.task-list > * { animation: riseIn .45s var(--ease) both; }
.task-list > *:nth-child(1) { animation-delay: .01s; }
.task-list > *:nth-child(2) { animation-delay: .05s; }
.task-list > *:nth-child(3) { animation-delay: .09s; }
.task-list > *:nth-child(4) { animation-delay: .13s; }
.task-list > *:nth-child(5) { animation-delay: .17s; }
.task-list > *:nth-child(6) { animation-delay: .21s; }
.task-list > *:nth-child(7) { animation-delay: .25s; }
.task-list > *:nth-child(8) { animation-delay: .29s; }
.task-list > *:nth-child(n+9) { animation-delay: .33s; }
.task-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid rgba(24, 28, 40, .045);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 12px; margin-top: 10px; cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  position: relative;
}
.task-card:active { transform: scale(.985); }
@media (hover: hover) {
  .task-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
}
.task-cover {
  width: 62px; height: 62px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -10px 18px rgba(0, 0, 0, .07);
}
.task-cover span { transition: transform .3s var(--ease); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .12)); }
@media (hover: hover) {
  .task-card:hover .task-cover span { transform: scale(1.14) rotate(-4deg); }
}
.task-info { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.task-reward { text-align: right; flex-shrink: 0; }
.task-reward .price { color: var(--primary-deep); font-weight: 800; font-size: 17px; letter-spacing: -.2px; }
.task-reward small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }

/* ========== 详情页 ========== */
.detail-cover {
  height: 132px; border-radius: var(--r-lg); margin-top: 12px;
  display: flex; align-items: flex-end; padding: 12px 16px;
  box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255, 255, 255, .25);
  position: relative; overflow: hidden;
}
.detail-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .3));
}
.detail-cover .detail-cat {
  position: relative; z-index: 1;
  background: rgba(0, 0, 0, .32); color: #fff; border-radius: var(--r-full);
  padding: 4px 13px; font-size: 12px; backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .22);
}
.detail-head h2 { margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.detail-price b {
  font-size: 30px; font-weight: 900; letter-spacing: -.5px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.detail-price span { color: var(--muted); margin-left: 8px; font-size: 13px; }
.detail-meta { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin-top: 8px; flex-wrap: wrap; }
.desc { margin: 0; color: #4a5062; white-space: pre-wrap; word-break: break-all; line-height: 1.7; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 7px 0; color: #4a5062; }
.steps li::marker { color: var(--primary); font-weight: 700; }
.tip { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.sub-status { background: var(--err-bg); color: var(--err); border-radius: var(--r-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 10px; }
.waiting { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r-sm); padding: 13px; text-align: center; font-weight: 600; }
.done { background: var(--ok-bg); color: var(--ok); border-radius: var(--r-sm); padding: 13px; text-align: center; font-weight: 600; }
.sub-content { background: #fafbfc; border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 10px; color: #4a5062; white-space: pre-wrap; word-break: break-all; }
.img-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.img-row img {
  width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm);
  cursor: zoom-in; border: 1px solid rgba(24, 28, 40, .06);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.img-row img:hover { transform: scale(1.04); box-shadow: var(--sh-md); }
.ops { display: flex; gap: 10px; flex-wrap: wrap; }

/* ========== 表单 ========== */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.btn {
  border: none; border-radius: var(--r-sm); padding: 10px 18px; font-size: 15px; font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer; background: #eef0f4; color: var(--ink);
  transition: transform .12s var(--ease), box-shadow var(--dur), filter var(--dur), background var(--dur);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: var(--sh-primary);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 9px 22px -6px rgba(242, 92, 5, .5); }
.btn-primary:active:not(:disabled) { box-shadow: var(--sh-xs); }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: var(--primary-soft); color: var(--primary-deep); }
.btn-ghost:hover:not(:disabled) { background: #ffe8d8; }
.btn-danger { background: var(--err-bg); color: var(--err); }
.btn-danger:hover:not(:disabled) { background: #fcddda; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: var(--r-xs); }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; border: 1px solid var(--line); background: #fafbfc; border-radius: var(--r-sm);
  padding: 9px 0; cursor: pointer; color: var(--muted);
  transition: all var(--dur) var(--ease);
}
.seg button:hover { border-color: #ffd9b8; }
.seg button.active {
  border-color: var(--primary); color: var(--primary-deep);
  background: var(--primary-soft); font-weight: 700;
  box-shadow: 0 3px 10px -4px rgba(242, 92, 5, .3);
}
.role-select { display: flex; gap: 10px; }
.role-select button {
  flex: 1; border: 1px solid var(--line); background: #fafbfc; border-radius: var(--r-md);
  padding: 13px 6px; cursor: pointer; color: var(--muted); line-height: 1.45; font-size: 14px;
  transition: all var(--dur) var(--ease);
}
.role-select button small { font-size: 11px; }
.role-select button:hover { border-color: #ffd9b8; }
.role-select button.active {
  border-color: var(--primary); background: var(--primary-soft);
  color: var(--primary-deep); font-weight: 700;
  box-shadow: 0 4px 12px -4px rgba(242, 92, 5, .3);
}

/* ========== 登录页 ========== */
.auth-page { padding-top: 0; }
.auth-hero {
  background: var(--grad-appbar);
  color: #fff; text-align: center; padding: 48px 20px 60px;
  border-radius: 0 0 30px 30px;
  position: relative; overflow: hidden;
}
.auth-hero::before {
  content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%);
  top: -130px; right: -90px; pointer-events: none;
}
.auth-hero::after {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 150, .3), transparent 65%);
  bottom: -120px; left: -70px; pointer-events: none;
}
.auth-logo {
  width: 64px; height: 64px; border-radius: 19px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; margin-bottom: 10px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 24px -10px rgba(0, 0, 0, .3);
}
.auth-hero h1 { margin: 0; font-size: 27px; letter-spacing: 3px; font-weight: 900; text-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.auth-hero p { margin: 7px 0 0; opacity: .92; font-size: 13px; letter-spacing: 1px; }
.auth-card { margin-top: -42px; position: relative; z-index: 1; }
.auth-tabs { display: flex; background: #f2f3f6; border-radius: 11px; padding: 3px; margin-bottom: 16px; }
.auth-tabs button {
  flex: 1; border: none; background: none; padding: 8px 0; border-radius: 9px;
  font-size: 15px; color: var(--muted); cursor: pointer; font-weight: 700;
  transition: all var(--dur) var(--ease);
}
.auth-tabs button.active {
  background: #fff; color: var(--primary-deep);
  box-shadow: 0 2px 8px rgba(24, 28, 40, .12);
}
.auth-tip { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 0; }

/* ========== 我的 / 钱包 ========== */
.wallet-card {
  background:
    radial-gradient(160px 160px at 88% -24%, rgba(255, 181, 92, .32), transparent 70%),
    radial-gradient(220px 220px at -12% 125%, rgba(255, 122, 38, .2), transparent 70%),
    linear-gradient(160deg, #2b3247, #171b29);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: var(--sh-md);
  position: relative; overflow: hidden;
}
.wallet-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 34px, rgba(255, 255, 255, .022) 34px 35px);
}
.wallet-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.wallet-top small { opacity: .72; font-size: 12px; letter-spacing: 1px; }
.wallet-top b { display: block; font-size: 33px; font-weight: 900; margin-top: 3px; letter-spacing: -.5px; }
.btn-wallet {
  background: var(--grad-primary); color: #fff; border: none;
  border-radius: var(--r-full); padding: 9px 21px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 16px -5px rgba(242, 92, 5, .55);
  transition: transform .15s var(--ease), filter var(--dur);
}
.btn-wallet:hover { filter: brightness(1.07); }
.btn-wallet:active { transform: scale(.95); }
.wallet-sub { display: flex; gap: 18px; margin-top: 15px; font-size: 12px; opacity: .82; position: relative; z-index: 1; }
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; padding: 13px 10px; margin: 0 -10px; font-size: 15px;
  text-align: left; border-bottom: 1px solid var(--line-soft); cursor: pointer; color: var(--ink);
  border-radius: var(--r-sm);
  transition: background .15s, color .15s, padding-left .2s var(--ease);
}
.menu button:last-child { border-bottom: none; }
.menu button:hover { background: #fafbfd; padding-left: 14px; color: var(--primary-deep); }
.menu button:active { background: var(--line-soft); }
.menu button.danger { color: var(--err); }
.menu button.danger:hover { background: #fff5f4; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0 0; line-height: 1.65; }
.center-card { text-align: center; padding: 34px 16px; color: var(--muted); }

/* ========== 记录 / 列表行 ========== */
.record-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 10px; margin: 0 -10px;
  border-bottom: 1px solid var(--line-soft); gap: 10px;
  border-radius: var(--r-xs);
  transition: background .15s;
}
.record-row:last-child { border-bottom: none; }
.record-row:hover { background: #fafbfd; }
.record-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.record-row .amt-pos { color: var(--ok); font-weight: 800; }
.record-row .amt-neg { color: var(--err); font-weight: 800; }

/* ========== 状态徽章（胶囊形） ========== */
.st {
  flex-shrink: 0; font-size: 12px; border-radius: var(--r-full);
  padding: 2px 10px; font-weight: 600; letter-spacing: .3px; white-space: nowrap;
}
.st-pending { background: var(--warn-bg); color: var(--warn-ink); }
.st-active { background: var(--info-bg); color: var(--info); }
.st-ok { background: var(--ok-bg); color: #069964; }
.st-reject { background: var(--err-bg); color: var(--err); }
.st-done { background: #eef0f4; color: var(--muted); }
.st-paused { background: #eef0f4; color: var(--muted); }

/* ========== 图片上传 ========== */
.img-uploader { display: flex; gap: 8px; flex-wrap: wrap; }
.img-thumb { position: relative; width: 72px; height: 72px; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in; border: 1px solid rgba(24, 28, 40, .06); }
.img-thumb i {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(24, 28, 40, .72); color: #fff; font-style: normal; font-size: 13px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform .15s var(--ease), background .15s;
}
.img-thumb i:hover { background: var(--err); transform: scale(1.1); }
.img-add {
  width: 72px; height: 72px; border: 1.5px dashed #d5d9e1; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; color: var(--faint);
  font-size: 24px; cursor: pointer; background: #fafbfc;
  transition: all var(--dur) var(--ease);
}
.img-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ========== 广告主 / 管理后台 ========== */
.page-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 2px 2px; }
.page-head h2 { margin: 0; font-size: 19px; color: var(--ink); font-weight: 800; }
.tabs {
  display: flex; gap: 4px; overflow-x: auto; margin-top: 12px;
  scrollbar-width: none; border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex-shrink: 0; border: none; background: none; padding: 9px 15px; font-size: 14px;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  font-weight: 600; position: relative;
  transition: color var(--dur);
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--primary-deep); border-bottom-color: var(--primary); font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.stats-grid > * { animation: riseIn .4s var(--ease) both; }
.stat-box {
  background: var(--card);
  border: 1px solid rgba(24, 28, 40, .045);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 15px 16px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur);
}
@media (hover: hover) {
  .stat-box:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
}
.stat-box small { color: var(--muted); font-size: 12px; letter-spacing: .3px; }
.stat-box b { display: block; font-size: 24px; margin-top: 5px; color: var(--ink); font-weight: 800; letter-spacing: -.3px; }
.stat-box b em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.table-wrap { overflow-x: auto; padding: 4px 14px 8px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.tbl th {
  text-align: left; color: var(--muted); font-weight: 600; padding: 9px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fafbfd; font-size: 12px; letter-spacing: .3px;
}
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text); }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tr:last-child td { border-bottom: none; }
.audit-actions { display: flex; gap: 6px; flex-shrink: 0; }
.reject-box { display: flex; gap: 8px; margin-top: 10px; }
.reject-box input { flex: 1; }
.task-mini {
  background: var(--card);
  border: 1px solid rgba(24, 28, 40, .045);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 14px; margin-top: 10px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur);
}
@media (hover: hover) {
  .task-mini:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
}
.task-mini .row1 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.task-mini .row1 b { font-size: 15px; color: var(--ink); }
.task-mini .mini-meta { color: var(--muted); font-size: 12px; margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.task-mini .mini-ops { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sub-item { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
.sub-item:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.sub-item .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sub-item .head b { font-size: 14px; color: var(--ink); }
.sub-item .body { color: #4a5062; font-size: 13px; margin: 6px 0; white-space: pre-wrap; word-break: break-all; line-height: 1.65; }
.step-editor .step-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.step-editor .step-row span { color: var(--muted); font-weight: 700; width: 20px; flex-shrink: 0; }
.step-editor .step-row input { flex: 1; }
.step-editor .step-row button {
  border: none; background: var(--err-bg); color: var(--err); border-radius: var(--r-xs);
  width: 28px; height: 28px; cursor: pointer; flex-shrink: 0; font-weight: 700;
  transition: background .15s, transform .12s;
}
.step-editor .step-row button:hover { background: #fcddda; }
.step-editor .step-row button:active { transform: scale(.92); }

/* ========== 底部导航（毛玻璃 + 激活指示） ========== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid rgba(24, 28, 40, .06);
  padding-bottom: env(safe-area-inset-bottom);
  max-width: 480px; margin: 0 auto;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0 6px; font-size: 11px; color: var(--muted);
  transition: color var(--dur);
}
.tabbar a.active { color: var(--primary-deep); font-weight: 700; }
.tab-icon {
  font-size: 20px; line-height: 1;
  transition: transform .25s var(--ease);
}
.tabbar a:hover .tab-icon { transform: translateY(-2px) scale(1.06); }
.tabbar a.active .tab-icon { filter: drop-shadow(0 3px 5px rgba(242, 92, 5, .35)); }

/* ========== 消息铃铛 ========== */
.bell {
  position: relative; border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .18);
  width: 36px; height: 36px; border-radius: 50%; font-size: 16px;
  cursor: pointer; flex-shrink: 0; color: #fff; line-height: 1;
  backdrop-filter: blur(6px);
  transition: transform .15s var(--ease), background var(--dur);
}
.bell:hover { background: rgba(255, 255, 255, .3); }
.bell:active { transform: scale(.9); }
.appbar.simple .bell { background: #f2f3f6; color: var(--ink); border-color: var(--line); }
.appbar.simple .bell:hover { background: #e9ebf0; }
.bell .badge {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px;
  background: linear-gradient(135deg, #ff5f4d, #f03a2e); color: #fff;
  border-radius: var(--r-full); font-size: 10px;
  line-height: 17px; padding: 0 4px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 2px 5px rgba(240, 58, 46, .4);
  animation: badgePulse 2s ease-in-out infinite;
}
.header-act {
  margin-left: auto; border: none; background: none; color: var(--primary-deep);
  font-size: 13px; cursor: pointer; font-weight: 700;
  transition: opacity .15s;
}
.header-act:hover { opacity: .75; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ========== 收藏按钮 ========== */
.fav-btn {
  position: absolute; top: 10px; right: 10px; border: none;
  background: rgba(255, 255, 255, .92);
  width: 30px; height: 30px; border-radius: 50%; font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(24, 28, 40, .14); line-height: 1;
  backdrop-filter: blur(4px);
  transition: transform .18s var(--ease), background .15s;
}
.fav-btn:hover { transform: scale(1.14); }
.fav-btn:active { transform: scale(.88); }
.fav-btn.on { background: #ffeef3; }
.fav-toggle { margin-top: 10px; }
.fav-toggle.on { color: var(--pink); border-color: var(--pink); background: #ffeef3; }

/* ========== 分页 ========== */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 0 22px; font-size: 13px; color: var(--muted);
}
.pager button {
  border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm);
  padding: 7px 15px; font-size: 13px; cursor: pointer; color: var(--ink); font-weight: 600;
  box-shadow: var(--sh-xs);
  transition: all var(--dur) var(--ease);
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-deep); }
.pager button:active:not(:disabled) { transform: scale(.96); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ========== 菜单角标 ========== */
.menu-badge {
  display: inline-block; min-width: 18px; height: 18px; margin-left: 6px;
  background: linear-gradient(135deg, #ff5f4d, #f03a2e); color: #fff;
  border-radius: var(--r-full); font-size: 11px;
  line-height: 18px; padding: 0 5px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(240, 58, 46, .35);
}

/* ========== 消息中心 ========== */
.msg-item { cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur); }
@media (hover: hover) {
  .msg-item:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
}
.msg-item.unread {
  border-left: 3px solid var(--primary);
  background: linear-gradient(100deg, #fff9f3 0%, #ffffff 55%);
}
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.msg-item.unread .msg-head b { color: var(--ink); font-weight: 800; }
.msg-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.msg-type { font-size: 11px; padding: 2px 9px; border-radius: var(--r-full); font-weight: 700; flex-shrink: 0; letter-spacing: .3px; }
.msg-type.msg-system { background: #eef2ff; color: #5b8def; }
.msg-type.msg-task { background: #e6f9f2; color: #069964; }
.msg-type.msg-wallet { background: #fff1de; color: var(--primary-deep); }
.msg-type.msg-appeal { background: #fde9e7; color: #d63031; }
.msg-time { font-size: 11px; color: var(--faint); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.msg-body { margin: 8px 0 0; font-size: 13px; color: #4a5062; line-height: 1.7; }

/* ========== 邀请返利 ========== */
.invite-hero { text-align: center; }
.invite-rates { display: flex; justify-content: center; gap: 30px; margin: 14px 0 12px; }
.invite-rates div { display: flex; flex-direction: column; gap: 2px; }
.invite-rates b {
  font-size: 26px; font-weight: 900; letter-spacing: -.5px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.invite-rates small { font-size: 12px; color: var(--muted); }
.invite-code {
  font-size: 25px; font-weight: 900; letter-spacing: 5px; text-align: center;
  background: linear-gradient(135deg, #fff7ee, #ffe9d4);
  color: var(--primary-deep);
  border: 1.5px dashed #ffb27a;
  border-radius: var(--r-md); padding: 15px 0; margin: 12px 0;
  position: relative;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
/* 票券左右切口 */
.invite-code::before, .invite-code::after {
  content: ''; position: absolute; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border-radius: 50%; background: var(--card);
  box-shadow: inset 0 1px 2px rgba(24, 28, 40, .08);
}
.invite-code::before { left: -9px; }
.invite-code::after { right: -9px; }
.invite-ops { display: flex; gap: 10px; }
.invite-ops .btn { flex: 1; }

/* ========== 趋势图表 ========== */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 122px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; cursor: default; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.chart-bar {
  width: 100%; min-height: 3px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #ffb27a, #ff7a26 70%, #f2620a);
  box-shadow: 0 2px 8px -2px rgba(242, 92, 5, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: height .45s var(--ease), filter var(--dur);
  position: relative;
}
.chart-col:hover .chart-bar { filter: brightness(1.08) saturate(1.1); }
.chart-bar::after {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
  opacity: 0; transition: opacity var(--dur);
}
.chart-col:hover .chart-bar::after { opacity: 1; }
.chart-col small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ========== 弹层 ========== */
.toast {
  position: fixed; top: 42%; left: 50%; transform: translateX(-50%); z-index: 100;
  background: rgba(24, 27, 38, .85); color: #fff; border-radius: var(--r-md);
  padding: 11px 22px; font-size: 14px; font-weight: 500; max-width: 78%; text-align: center;
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--sh-lg);
  animation: popIn .28s var(--ease);
}
.toast.error { background: rgba(240, 69, 58, .92); }
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 18, 28, .48); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s var(--ease);
}
.dialog {
  background: #fff; border-radius: 20px; padding: 20px; width: 100%; max-width: 360px;
  box-shadow: var(--sh-lg);
  animation: popIn .26s var(--ease);
}
.dialog h4 { margin: 0 0 10px; font-size: 17px; color: var(--ink); }
.dialog p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.dialog textarea { margin-bottom: 6px; }
.dialog-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.img-preview {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 120;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
  backdrop-filter: blur(6px);
  animation: fadeIn .2s var(--ease);
}
.img-preview img { max-width: 94%; max-height: 88%; border-radius: var(--r-sm); box-shadow: var(--sh-lg); }

/* ========== 空状态 / 加载 ========== */
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }
.empty::before {
  content: '🗂'; display: block; font-size: 36px; margin-bottom: 10px;
  opacity: .55; filter: grayscale(.3);
}
.loading-line { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 0; }

/* ========== 动效关键帧 ========== */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

/* 尊重系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ========== 桌面端适配 ========== */
@media (min-width: 720px) {
  body { background: #e9ebf0; }
  .app {
    background: var(--bg); max-width: 520px; margin: 0 auto; min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(24, 28, 40, .05), 0 24px 60px -24px rgba(24, 28, 40, .2);
  }
  .app:has(.page-wide) { max-width: none; box-shadow: none; }
  .tabbar { max-width: 520px; }
  /* 细滚动条 */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: #c9cdd6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-thumb:hover { background: #b0b6c2; background-clip: content-box; }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* ========== 桌面端增强（真实宽屏优化，替代 720 段的 520 手机框） ========== */
@media (min-width: 720px) {
  .app { max-width: none; box-shadow: none; background: transparent; }
  .page { max-width: 680px; padding: 0 24px; }
  .page-wide { max-width: 1080px; }
  /* 任务大厅/列表宽屏多列，充分利用横向空间 */
  .task-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: start; }
  /* 底部导航改为居中悬浮胶囊，摆脱“贴底通栏”的手机感 */
  .tabbar {
    left: 50%; transform: translateX(-50%);
    max-width: none; width: min(680px, calc(100% - 32px));
    bottom: 14px; border: 1px solid rgba(24, 28, 40, .08);
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 12px 34px -12px rgba(24, 28, 40, .28);
  }
  .app.has-tabbar { padding-bottom: 96px; }
}
@media (min-width: 1080px) {
  body { font-size: 15px; }
  .page { max-width: 900px; }
  .page-wide { max-width: 1200px; }
  .task-list { grid-template-columns: repeat(3, 1fr); }
  .tabbar { width: min(900px, calc(100% - 48px)); }
}

/* ========== 桌面端完整骨架（≥1024px：左侧导航 + 右侧内容区） ========== */
/* 侧边栏仅桌面端渲染出现；移动端 / 平板保持底部 tabbar 形态 */
.sidebar { display: none; }

@media (min-width: 1024px) {
  /* 骨架：侧栏（sticky 全高）+ 主内容区 */
  .app { display: flex; align-items: stretch; min-height: 100vh; padding-bottom: 0; }
  .app.has-tabbar { padding-bottom: 0; }
  .main { flex: 1; min-width: 0; }
  .tabbar { display: none; }

  /* ---- 侧边导航 ---- */
  .sidebar {
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; width: 236px; flex-shrink: 0;
    background: #fff; border-right: 1px solid var(--line);
    padding: 20px 14px 16px; z-index: 30;
  }
  .side-brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 16px; border-bottom: 1px solid var(--line-soft); }
  .side-logo {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    background: var(--grad-primary); color: #fff; font-size: 21px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--sh-primary);
  }
  .side-brand-text b { display: block; font-size: 17px; font-weight: 900; color: var(--ink); letter-spacing: 1.5px; line-height: 1.3; }
  .side-brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
  .side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 14px 0; }
  .side-nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px;
    border-radius: var(--r-md); color: var(--text); font-size: 14px; font-weight: 500;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  }
  .side-nav a:hover { background: var(--primary-soft); color: var(--primary-deep); }
  .side-nav a.active { background: var(--grad-primary); color: #fff; font-weight: 700; box-shadow: var(--sh-primary); }
  .side-nav .nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
  .side-nav .nav-badge {
    margin-left: auto; background: var(--err); color: #fff;
    font-size: 11px; font-weight: 700; border-radius: var(--r-full);
    padding: 1px 7px; line-height: 1.5;
  }
  .side-nav a.active .nav-badge { background: rgba(255, 255, 255, .28); }
  .side-foot { border-top: 1px solid var(--line-soft); padding-top: 12px; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
  .side-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary-deep); border: 1px solid #ffd9b8;
    font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  }
  .side-user-info { min-width: 0; flex: 1; }
  .side-user-info b { display: block; font-size: 13px; color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user-info small { font-size: 11px; color: var(--muted); }
  .side-logout {
    width: 100%; border: 1px solid var(--line); background: #fff; color: var(--muted);
    border-radius: var(--r-md); padding: 8px 0; font-size: 13px; cursor: pointer;
    transition: color var(--dur), border-color var(--dur), background var(--dur);
  }
  .side-logout:hover { color: var(--err); border-color: #ffd2ce; background: #fff5f4; }

  /* ---- 内容区容器：充分利用横向空间 ---- */
  .page { max-width: 1120px; padding: 4px 36px 56px; }
  .page-wide { max-width: 1320px; padding: 4px 36px 56px; }

  /* ---- 视图自带顶栏 → 桌面内容页头（去渐变 / 去吸顶 / 去品牌） ---- */
  .appbar {
    position: static; background: transparent; box-shadow: none; color: var(--ink);
    padding: 20px 0 12px; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .appbar .brand { display: none; }
  .appbar .search { max-width: 560px; }
  .appbar .search input {
    background: #fff; border: 1px solid var(--line); height: 40px;
    box-shadow: var(--sh-xs); color: var(--ink);
  }
  .appbar .search input::placeholder { color: var(--faint); }
  .appbar .search input:focus { box-shadow: 0 0 0 3px rgba(255, 122, 38, .12); }
  .appbar .bell {
    background: #fff; color: var(--text); border: 1px solid var(--line);
    box-shadow: var(--sh-xs); width: 40px; height: 40px;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .appbar .bell:hover { background: var(--primary-soft); color: var(--primary-deep); border-color: #ffd9b8; }
  .appbar.simple { padding: 24px 0 12px; font-size: 20px; font-weight: 800; color: var(--ink); border-bottom: none; }
  .appbar.simple .back { display: none; }

  /* ---- 桌面内容排布优化 ---- */
  .cat-row { flex-wrap: wrap; overflow: visible; padding: 6px 0 10px; }
  .task-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .task-card { margin-top: 0; padding: 14px; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
  .tabs { flex-wrap: wrap; }
  .auth-page { max-width: 460px; padding-top: 24px; }
}
