:root{--bg:#0d1220;--card:#151c2e;--line:#232c44;--tx:#e8ecf6;--dim:#8b96b3;--acc:#5b8cff;--ok:#3ecf8e;--warn:#f5b04c;--bad:#ff6b6b}
@keyframes wxup{from{opacity:0;transform:translateX(-50%) translateY(14px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
*{box-sizing:border-box;margin:0}
body{background:var(--bg);color:var(--tx);font:14px/1.65 "Microsoft YaHei",system-ui,sans-serif;padding:20px;max-width:1080px;margin:0 auto}
h1{font-size:21px;margin-bottom:4px}
.sub{color:var(--dim);font-size:12.5px;margin-bottom:18px}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:16px}
label{display:block;font-size:12px;color:var(--dim);margin:10px 0 4px}
input,select,textarea{width:100%;background:#0b101c;border:1px solid var(--line);border-radius:8px;color:var(--tx);padding:8px 10px;font-size:13px}
input[type=file]{padding:6px}
button{background:var(--acc);border:0;border-radius:8px;color:#fff;padding:10px 20px;font-size:14.5px;cursor:pointer;margin-top:14px}
button:disabled{opacity:.5;cursor:default}
button.ghost{background:transparent;border:1px solid var(--line);color:var(--dim);padding:4px 10px;font-size:12px;margin:0 0 0 6px}
button.mini{background:#2a3350;padding:4px 10px;font-size:12px;margin:0}
.row{display:flex;gap:14px;flex-wrap:wrap}
.row>div{flex:1;min-width:180px}
table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}
th,td{padding:8px 6px;border-bottom:1px solid var(--line);text-align:left;overflow:hidden;text-overflow:ellipsis;word-break:break-all}
#jobs_table th:nth-child(1),#jobs_table td:nth-child(1){max-width:34%}
#jobs_table th:nth-child(2),#jobs_table td:nth-child(2){width:132px}
#jobs_table th:nth-child(3),#jobs_table td:nth-child(3){width:92px}
#jobs_table th:nth-child(5),#jobs_table td:nth-child(5){width:118px}
.st-skipped{background:#2c2a17;color:#d8c46a}
.st-expired{background:#3a3320;color:#c9a86a}
th{color:var(--dim);font-weight:normal;font-size:12px}
tr{cursor:pointer}tr:hover td{background:#1a2338}
.badge{display:inline-block;padding:1px 9px;border-radius:99px;font-size:12px}
.st-pending{background:#2a3350;color:#aab6d8}
.st-canceled{background:#333a4d;color:#9aa3ba}
.st-processing,.st-splitting,.st-assembling,.st-importing{background:#2b3d6e;color:#9db8ff}
.st-done{background:#173b2e;color:var(--ok)}
.st-skipped{background:#2c2a17;color:#d8c46a}
.st-failed{background:#43222a;color:var(--bad)}
.shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:12px}
.shot{background:#0b101c;border:1px solid var(--line);border-radius:8px;overflow:hidden;font-size:12px}
.shot img,.shot .nopic{width:100%;height:88px;object-fit:cover;display:block;background:#141b2c;color:#4a5578;text-align:center;line-height:88px}
.shot .meta{padding:6px 8px}
.shot .st{float:right}
.shot .err{color:var(--warn);font-size:11px;word-break:break-all}
.compare{display:flex;gap:10px;margin-top:12px}
.compare video{width:100%;border-radius:8px;background:#000;max-height:420px}
.prog{height:6px;background:#0b101c;border-radius:99px;overflow:hidden;margin-top:6px}
.prog i{display:block;height:100%;background:var(--acc)}
a{color:var(--acc);text-decoration:none}
.small{font-size:12px;color:var(--dim)}
.err{color:var(--bad);font-size:12px;word-break:break-all}
.okk{color:var(--ok);font-size:12px}
.hide{display:none}
.cost{color:var(--warn);font-weight:bold}
.steps{display:flex;gap:6px;margin:8px 0 2px;font-size:12px;color:var(--dim);flex-wrap:wrap}
.steps span{background:#0b101c;border:1px solid var(--line);border-radius:6px;padding:2px 8px}
.tabs{display:flex;gap:8px;margin:10px 0 2px}
.tab{background:#0b101c;border:1px solid var(--line);color:var(--dim);border-radius:8px;padding:7px 14px;font-size:13px;margin:0;cursor:pointer}
.tab.on{background:#223257;color:#cfe0ff;border-color:#3b5aa0}
textarea{resize:vertical}
.sharebox{margin-top:8px;background:#0b101c;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12.5px;word-break:break-all;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.sharebox a{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#userbar{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 14px;margin-bottom:14px;font-size:13px;flex-wrap:wrap}
#userbar .cr{color:var(--warn);font-weight:bold}
#userbar .sp{flex:1}
#authcard{max-width:420px;margin:40px auto}
#authcard h1{text-align:center}
.formrow{margin-top:12px}
.pgrid{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.pcard{width:74px;cursor:pointer;border:2px solid var(--line);border-radius:10px;overflow:hidden;position:relative;flex:0 0 auto}
.pcard.sel{border-color:var(--acc);box-shadow:0 0 10px rgba(91,140,255,.4)}
.pcard img{width:100%;height:74px;object-fit:cover;display:block}
.pcard .del{position:absolute;top:2px;right:2px;background:rgba(0,0,0,.55);border:0;border-radius:6px;color:#fff;font-size:10px;padding:1px 4px;cursor:pointer}
#adminbox table{font-size:12.5px}
#adminbox .box-title{font-size:15px;font-weight:bold;margin-bottom:6px}
@media (max-width:640px){
  body{padding:10px 8px;font-size:13px}
  h1{font-size:18px}
  .card{padding:12px 10px;border-radius:10px;overflow-x:auto}
  .row{gap:8px}.row>div{min-width:0;flex:1 1 100%}
  /* 手机上别让表格撑破整页：以前统一 min-width:560px，账单/后台表只能左右拖着看，
     第11轮走查实测管理后台 users_table 把整页顶得可横向拖动，末列按钮点在屏幕外。
     改为随容器收缩换行（长文本靠 word-break 兜住），任务表另有更细的列宽规则。 */
  table{min-width:0}
  td,th{word-break:break-word}
  button{min-height:44px}
  /* 按钮里是中文时，「最小内容宽度」= 一个汉字。只要外层容器稍微窄一点，
     按钮就会变成一个字一行的竖排（实测「保存模板」就长这样）。
     按钮文案本身就很短，永远不该换行；需要多行的是说明文字，不是按钮。 */
  button{white-space:nowrap}
  button.mini,button.ghost,.tab{min-height:44px;padding:10px 12px;font-size:13px}
  .pcard .del{padding:6px 10px;font-size:12px}
  #userbar{gap:6px;padding:8px 10px}
  #cmp_grid{grid-template-columns:1fr!important;gap:10px}
  .compare{flex-direction:column}
  .compare video{max-height:240px}
  .shots{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}

  /* ── 移动端专项（2026-10-08 第5轮，依据 iPhone14 390x844 实测）──
     ① 任务表原本 min-width:560px，在 374px 容器里只能左右拖着看。
        这里放开宽度、收窄各列，并把最不常用的「创建时间」整列隐藏
        （详情里依然看得到），让手机上真正能一屏看全一行。
     ② 触控目标：Apple HIG 建议 ≥44px。实测复选框只有 13x13，
        尤其是「已确认授权与合规」这种必须勾的框，手指极难点中。 */
  #jobs_table{min-width:0}
  #jobs_table th,#jobs_table td{padding:6px 4px;vertical-align:middle}
  /* 第一列是选择框：td 本身给它留出足够的点击面积（22px 的框 + 上下各 14px padding ≈ 50px） */
  #jobs_table th:nth-child(1),#jobs_table td:nth-child(1){width:30px;max-width:30px;padding:14px 4px}
  #jobs_table th:nth-child(2),#jobs_table td:nth-child(2){width:auto;max-width:none;min-width:96px}
  #jobs_table th:nth-child(3),#jobs_table td:nth-child(3){width:62px}
  #jobs_table th:nth-child(4),#jobs_table td:nth-child(4){width:54px}
  #jobs_table th:nth-child(5),#jobs_table td:nth-child(5){width:46px}
  #jobs_table th:nth-child(6),#jobs_table td:nth-child(6){display:none}
  #jobs_table th:nth-child(7),#jobs_table td:nth-child(7){width:auto;white-space:nowrap}
  #jobs_table td{font-size:12px}
  #jobs_table .small{font-size:11px}

  /* 管理后台各表：手机上收掉最没用的那一列（用户表的注册 IP 长且可用搜索代替），
     并把单元格压小一点，让「变动」输入框和「确定」按钮留在首屏内。 */
  #users_table th:nth-child(4),#users_table td:nth-child(4){display:none}
  #users_table td,#users_table th,#orders_admin_table td,#orders_admin_table th,
  #logs_table td,#logs_table th,#redeem_table td,#redeem_table th,
  #feedback_table td,#feedback_table th,#tpl_table td,#tpl_table th{padding:6px 4px;font-size:12px}
  #users_table input,#redeem_table input{min-height:38px}
  /* 后台订单表的操作列并排放「确认到账 + 取消」两个按钮，390px 宽时右边缘 401px 顶出屏幕。
     按钮是 nowrap 的，光靠 white-space:normal 换不了行 —— 直接把操作列变成可换行的 flex 容器。 */
  #users_table td:last-child,#orders_admin_table td:last-child,#redeem_table td:last-child,
  #feedback_table td:last-child,#tpl_table td:last-child{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
  /* 352px 放 7 列 = 每列 50px，而「确认到账」按钮本身 76px，flex 也救不了宽度不够。
     手机上把「时间/单号」两列收掉（订单详情里都看得到），并把后台按钮缩一号。 */
  #orders_admin_table th:nth-child(1),#orders_admin_table td:nth-child(1),
  #orders_admin_table th:nth-child(2),#orders_admin_table td:nth-child(2){display:none}
  #adminbox button.mini{padding:8px 7px;font-size:12px;min-height:38px}

  /* 复选框：行内 style="width:auto" 会盖住普通 CSS，只能上 !important */
  input[type=checkbox]{
    width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;
    flex:0 0 auto;vertical-align:middle;margin:0 4px 0 0}
  label:has(input[type=checkbox]){display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:4px 0}

  /* iOS Safari 在字号 <16px 的输入框聚焦时会自动放大整页，点完还得手动缩回去。
     桌面端 13px 看着舒服，但手机上一律拉到 16px。 */
  input:not([type=checkbox]):not([type=range]),
  select,textarea{font-size:16px;min-height:44px}
  /* 文件框原先被排除在外，于是「上传参考图」在 iPhone 上只有 13px 字 / 37px 高，
     是手机上唯一没被上面这条覆盖的文字控件 —— 而它是流程第一步，点不中就卡死。
     文件框不会弹软键盘，所以没有「聚焦放大」问题，但高度仍要够手指点。 */
  input[type=file]{font-size:16px;min-height:44px;padding:8px 6px}
  textarea{min-height:76px}

  /* 登录页「点这里留言」这类纯文字链接实测只有 16px 高，手指点不到 */
  a{min-height:auto;padding:8px 0;display:inline-block}
  #userbar a{padding:6px 0}
}
.pname{font-size:11px;padding:2px 4px;color:#c8d2ec;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pcard .ren{right:26px}
