* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f7;
  color: #222;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 720px; margin: 0 auto; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.brand { font-weight: 700; font-size: 17px; color: #ff2442; text-decoration: none; white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a {
  font-size: 14px; color: #555; text-decoration: none; padding: 5px 9px;
  border-radius: 14px; white-space: nowrap;
}
.topbar nav a:hover { background: #fff0f2; color: #ff2442; }
.container { max-width: 720px; margin: 0 auto; padding: 14px; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 15px; }
.flash.ok { background: #e8f8ee; color: #1a7f37; border: 1px solid #b7e4c7; }
.flash.err { background: #fdecee; color: #c0233b; border: 1px solid #f5c2c9; }

.card {
  background: #fff; border-radius: 14px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card .sub { color: #888; font-size: 13px; }

.btn {
  display: inline-block; border: none; border-radius: 10px; padding: 11px 18px;
  font-size: 16px; text-decoration: none; text-align: center; cursor: pointer;
  background: #ff2442; color: #fff; font-weight: 600; width: 100%;
}
.btn:hover { opacity: .92; }
.btn.secondary { background: #f0f0f3; color: #333; font-weight: 500; }
.btn.small { width: auto; padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn.green { background: #07a35a; }
.btn.gray { background: #e5e5ea; color: #555; }
.btn.danger { background: #fff; color: #ff2442; border: 1px solid #ff2442; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { width: auto; flex: 1; }

label { display: block; font-size: 14px; color: #555; margin: 12px 0 5px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=url],
select, textarea {
  width: 100%; border: 1px solid #ddd; border-radius: 10px; padding: 11px 12px;
  font-size: 16px; font-family: inherit; background: #fff;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #ff2442; }
input[type=file] { width: 100%; font-size: 14px; margin-top: 4px; }

.badge {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 20px;
  font-weight: 600; vertical-align: middle;
}
.b-pending { background: #fff4e0; color: #c77700; }
.b-accepted { background: #e8f1ff; color: #0a66d9; }
.b-linked { background: #e8f8ee; color: #1a7f37; }
.b-overdue { background: #fdecee; color: #c0233b; }
.b-offline { background: #eee; color: #888; }
.b-rp-pending { background: #fff4e0; color: #c77700; }
.b-rp-approved { background: #e8f8ee; color: #1a7f37; }
.b-rp-rejected { background: #fdecee; color: #c0233b; }

.task-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.task-title { font-size: 16px; font-weight: 600; flex: 1; }
.overdue-line { color: #c0233b; font-weight: 700; font-size: 14px; margin-top: 6px; }
.countdown { font-size: 14px; color: #0a66d9; margin-top: 6px; font-weight: 600; }

.notice {
  background: #fff8e6; border: 1px solid #ffe2a8; color: #8a5b00;
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0;
}
.tip {
  background: #eef5ff; border: 1px solid #cfe2ff; color: #235; 
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0;
}

.img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.img-grid a { display: block; width: calc(33.33% - 6px); }
.img-grid img { width: 100%; border-radius: 8px; display: block; border: 1px solid #eee; }
.img-fallback {
  border: 1px dashed #d9a7ad; background: #fdf3f4; color: #a0414e;
  border-radius: 8px; padding: 14px 6px; font-size: 13px; line-height: 1.6;
  text-align: center; word-break: break-all;
}
.img-single { max-width: 100%; border-radius: 10px; margin: 8px 0; border: 1px solid #eee; }

.copy-box {
  background: #fafafa; border: 1px dashed #ccc; border-radius: 10px;
  padding: 10px 12px; margin: 8px 0; font-size: 15px; white-space: pre-wrap;
  word-break: break-all; position: relative;
}
.copy-box .btn { width: auto; position: absolute; right: 8px; top: 8px; padding: 4px 12px; font-size: 13px; }

/* 标题行：左侧名称 + 右侧复制按钮（按钮在框外右上角那一行） */
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 0; }
.copy-head .btn { width: auto; margin: 0; padding: 6px 16px; font-size: 14px; flex-shrink: 0; }
.copy-head + .copy-box { margin-top: 8px; }

.money-card { background: linear-gradient(135deg, #ff2442, #ff6a3d); color: #fff; border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.money-card .num { font-size: 30px; font-weight: 800; }
.money-card .row { display: flex; justify-content: space-between; margin-top: 8px; font-size: 14px; opacity: .95; }

table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { padding: 9px 8px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: top; }
th { background: #fafafa; font-size: 13px; color: #666; }
.table-wrap { overflow-x: auto; border-radius: 10px; margin-bottom: 12px; }

.stat-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stat { flex: 1; min-width: 130px; background: #fff; border-radius: 12px; padding: 14px; text-align: center; }
.stat .n { font-size: 24px; font-weight: 800; color: #ff2442; }
.stat .l { font-size: 13px; color: #888; margin-top: 2px; }

video { width: 100%; border-radius: 10px; margin: 8px 0; background: #000; max-height: 420px; }
.qr-img { max-width: 220px; width: 60%; border-radius: 10px; border: 1px solid #eee; display: block; margin: 8px auto; }

.login-wrap { max-width: 380px; margin: 8vh auto 0; }
.login-wrap .card { padding: 24px 20px; }
.login-logo { text-align: center; font-size: 40px; margin-bottom: 6px; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.login-sub { text-align: center; color: #888; font-size: 14px; margin-bottom: 16px; }

.history-item { border-left: 3px solid #eee; padding: 8px 0 8px 12px; margin: 10px 0; font-size: 14px; }
.history-item.approved { border-color: #07a35a; }
.history-item.rejected { border-color: #ff2442; }
.history-item.pending { border-color: #f5a623; }
.reject-reason { color: #c0233b; margin-top: 4px; }
.muted { color: #999; font-size: 13px; }
a.link { color: #0a66d9; word-break: break-all; }
.section-title { font-size: 15px; font-weight: 700; margin: 16px 0 8px; color: #333; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-tabs a {
  padding: 6px 14px; border-radius: 20px; background: #fff; color: #555;
  text-decoration: none; font-size: 14px; border: 1px solid #e5e5ea;
}
.filter-tabs a.active { background: #ff2442; color: #fff; border-color: #ff2442; }

/* 奖励报表：播放量柱状图 */
.rchart { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; padding: 6px 2px 0; min-height: 150px; }
.rbar { flex: 1; min-width: 54px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.rbar .v { font-size: 12px; font-weight: 700; color: #333; }
.rbar .stick { width: 70%; max-width: 46px; border-radius: 6px 6px 0 0; background: #07a35a; }
.rbar.pend .stick { background: #f5a623; }
.rbar.rej .stick { background: #e5e5ea; }
.rbar .d { font-size: 12px; margin-top: 4px; color: #07a35a; font-weight: 600; white-space: nowrap; }
.rbar.pend .d { color: #c77700; }
.rbar.rej .d { color: #999; }
.rbar .t { font-size: 11px; color: #aaa; white-space: nowrap; }

/* 通过选项弹窗 + 统一付款页 */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99; display: flex; align-items: center; justify-content: center; padding: 20px; }
.overlay .card { width: 100%; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.money-card { background: linear-gradient(135deg, #ff2442, #ff5f6d); color: #fff; border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.money-card .num { font-size: 40px; font-weight: 800; margin: 6px 0; }
.money-card .row span { opacity: .85; font-size: 13px; }

/* 选图预览缩略图 */
.img-preview { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pv-item { position: relative; width: 84px; height: 84px; }
.pv-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.pv-item { position: relative; cursor: grab; }
.pv-item.pv-drag { opacity: .45; }
.pv-ops { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; justify-content: space-between; gap: 2px; padding: 0 2px; }
.pv-op { border: none; background: rgba(0,0,0,.62); color: #fff; font-size: 11px; line-height: 1; width: 22px; height: 20px; border-radius: 5px; padding: 0; cursor: pointer; font-weight: 700; }
.pv-op:disabled { opacity: .25; }
.pv-op[data-act=del] { background: rgba(230,0,18,.82); font-size: 14px; }

/* 编号搜索下拉 */
.assignee-wrap { position: relative; }
.assignee-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #ddd; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); z-index: 50; max-height: 260px; overflow-y: auto; }
.al-item { padding: 12px 14px; font-size: 16px; font-weight: 700; border-bottom: 1px solid #f2f2f2; cursor: pointer; }
.al-item:last-child { border-bottom: none; }
.al-item:active, .al-item:hover { background: #fff1f3; color: #ff2442; }
.al-empty { font-weight: 400; font-size: 14px; color: #999; cursor: default; }
.al-empty:active { background: #fff; color: #999; }
.pv-cover { position: absolute; left: 0; top: 0; background: #ff2442; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px 0 8px 0; }
.pv-idx { position: absolute; right: 2px; top: 2px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 0 5px; border-radius: 6px; }

/* 一键下载按钮（图片区标题行右侧） */
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-dl { background: #ff2442; color: #fff; border: none; border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px rgba(255,36,66,.3); flex-shrink: 0; cursor: pointer; }
.btn-dl:disabled { opacity: .55; }

/* 新手四步引导条 */
.guide-card { border-left: 4px solid #ff2442; }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-title { font-size: 16px; font-weight: 700; }
.guide-toggle { border: none; background: none; color: #888; font-size: 13px; padding: 4px 8px; cursor: pointer; flex-shrink: 0; }
.g-step { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; background: #fafafa; margin-bottom: 8px; }
.g-step.done { background: #f0fbf3; }
.g-step .num { width: 26px; height: 26px; border-radius: 50%; background: #ccc; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.g-step.done .num { background: #07a35a; }
.g-step .txt { flex: 1; font-size: 14px; line-height: 1.4; min-width: 0; }
.g-step.done .txt { color: #07a35a; }
.g-step .gbtn { border: 1px solid #ff2442; background: #fff; color: #ff2442; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.g-step.done .gbtn { display: none; }
.g-step .gtick { display: none; color: #07a35a; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.g-step.done .gtick { display: block; }
.g-bar { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.g-bar i { display: block; height: 100%; width: 0; background: #07a35a; transition: width .3s; }
.g-bar-txt { text-align: center; font-size: 13px; color: #888; margin-top: 6px; }
.g-alldone { display: none; background: #f0fbf3; border: 1px solid #b7ebc6; color: #087a2f; border-radius: 10px; padding: 10px; font-size: 14px; line-height: 1.6; margin-top: 8px; }

/* 群聊勾选 chips */
.gc-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.gc-chip { flex: 1; min-width: 130px; padding: 12px 10px; border: 2px solid #e5e5e5; border-radius: 10px; background: #fafafa; color: #555; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; }
.gc-chip.on { border-color: #07a35a; background: #eef9f2; color: #07a35a; }

/* 后台「是/否」选项 chips（群聊开关） */
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.opt-chip { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 6px; padding: 11px 10px; border: 2px solid #e5e5e5; border-radius: 10px; background: #fafafa; color: #444; font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.4; }
.opt-chip:has(input:checked) { border-color: #ff2442; background: #fff1f3; color: #c0102e; }

