  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html { -webkit-text-size-adjust: 100%; }
  body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f3f5f9; color: #1f2937; }
  #app { max-width: 430px; margin: 0 auto; min-height: 100vh; position: relative; background: #f3f5f9; padding-bottom: env(safe-area-inset-bottom); }
  .topbar { background: #12264a; color: #fff; padding: 14px 16px 40px; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; padding-top: calc(14px + env(safe-area-inset-top)); }
  .topbar .sub { font-size: 12px; color: rgba(255,255,255,.6); font-weight: 400; }
  /* R1130：登录页页眉 Logo（横向约 2.2:1），白底圆角承载，等比缩放不拉伸 */
  .topbar .brand-logo { height: 30px; width: auto; max-width: 96px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 4px; flex-shrink: 0; }
  .back { cursor: pointer; font-size: 22px; line-height: 1; padding: 0 6px 0 0; color: #fff; min-width: 32px; }
  .content { padding: 0 14px 76px; margin-top: -24px; }
  .card { background: var(--c-surface); border-radius: var(--r-lg); padding: 14px; margin-bottom: var(--sp-4); box-shadow: var(--sh-1); }
  .card h3 { font-size: 14px; color: #12264a; margin-bottom: 8px; }
  .row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: #4b5563; gap: 8px; }
  .row b { color: #1f2937; font-weight: 600; text-align: right; word-break: break-all; }
  .tag { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); }
  .tag-orange { background: var(--c-accent-soft); color: var(--c-accent); }
  .tag-blue { background: var(--c-info-soft); color: var(--c-info); }
  .tag-green { background: var(--c-success-soft); color: var(--c-success); }
  .tag-gray { background: var(--c-neutral-soft); color: var(--c-text-muted); }
  .fchip { position: relative; display: inline-block; padding: 9px 14px; border-radius: 6px; font-size: 13px; background: transparent; color: #6b7280; cursor: pointer; }
  .fchip-on { background: transparent; color: #f97316; font-weight: 600; }
  .fchip-on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -1px; width: 20px; height: 3px; border-radius: 3px; background: #f97316; }
  .tag-red { background: var(--c-danger-soft); color: var(--c-danger); }
  .tag-settled { background: var(--c-neutral-50); color: var(--st-cancelled); }
  .btn { display: block; width: 100%; border: none; border-radius: var(--r-btn); padding: 13px; font-size: var(--fs-lg); font-weight: 600; cursor: pointer; margin-top: 8px; min-height: 46px; }
  .btn-primary { background: var(--c-accent); color: var(--c-surface); }
  .btn-dark { background: var(--c-brand); color: var(--c-surface); }
  .btn-line { background: var(--c-surface); color: var(--c-brand); border: 1px solid var(--c-line-strong); }
  .btn:disabled { opacity: .5; cursor: not-allowed; }
  .btn-sm { display: inline-block; width: auto; padding: 8px 14px; font-size: 13px; margin: 4px 6px 4px 0; min-height: 36px; }
  .btn-sm.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .input, select, textarea { width: 100%; border: 1px solid #dbe2ec; border-radius: 8px; padding: 11px 12px; font-size: 16px; margin: 6px 0; background: #fff; min-height: 44px; text-align: center; }
  #sp-origin, #sp-dest { text-align: left; } /* 地址长文本左对齐（与小程序 .addr-input 齐平） */
  /* WB-R5/B：逐点卡片（站名/操作/货主/件数/删除/↑↓）；stop-input 类名不占 .input 序号，保护 mp-fulltest */
  .stop-input { border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 8px; font-size: 13px; height: 36px; line-height: 36px; box-sizing: border-box; background: #fff; margin: 0; min-height: 36px; text-align: left; }
  .stop-op-pick { border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 8px; font-size: 12px; color: #374151; background: #fff; flex-shrink: 0; height: 36px; min-height: 36px; }
  /* WB-R5/C：回货信息字段（关联回货运单号/回程货信息）；ret-input 类名不占 .input 序号 */
  .ret-input { width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 4px 8px; font-size: 13px; height: 36px; line-height: 36px; box-sizing: border-box; background: #fff; margin: 6px 0; min-height: 36px; text-align: center; }
  /* WB-R6：列表失败重试条（与 MP .err-bar 逐字齐平） */
  .err-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
  .err-txt { font-size: 12px; color: #dc2626; flex: 1; min-width: 0; }
  .err-btn { flex-shrink: 0; font-size: 12px; color: #fff; background: #dc2626; border-radius: 6px; padding: 3px 10px; cursor: pointer; }
  /* 分页列表底部：加载更多 / 加载中 / 到底结束（订单、账单共用） */
  .page-foot { text-align: center; font-size: 12px; color: #9ca3af; padding: 14px 0 8px; }
  .page-more { display: inline-block; min-width: 180px; padding: 9px 14px; border: 1px solid #dbe2ec; border-radius: 8px; background: #fff; color: #12264a; font-size: 13px; cursor: pointer; }
  .label { font-size: 12px; color: #6b7280; margin-top: 6px; display: block; }
  /* UX-01：地址整行化——label 在上、输入框独占整行、带出/选点收进框内 28px 图标 */
  .addr-field { position: relative; margin: 4px 0; }
  .addr-field .input { margin: 0; padding: 10px 74px 10px 12px; line-height: 1.5; word-break: break-all; overflow-wrap: anywhere; resize: none; text-align: left; }
  .addr-ico { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 1px solid #cbd5e1; background: #f8fafc; color: #12264a; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
  .addr-ico.book { right: 40px; } .addr-ico.pin { right: 6px; }
  .fld-hint { font-size: 11px; color: #9ca3af; font-weight: 400; margin-left: 4px; }
  .field-err { display: none; color: #dc2626; font-size: 12px; margin: 2px 0 6px; }
  .field-err.show { display: block; }
  .req { color: #dc2626; font-weight: 700; margin-right: 2px; }
  .stops-sec { display: none; margin-top: 6px; }
  .stops-sec.show { display: block; }
  .fee-details { margin-top: 6px; font-size: 12px; color: #7c2d12; }
  .fee-details summary { cursor: pointer; color: #9a3412; }
  .tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: var(--c-surface); display: flex; border-top: 1px solid var(--c-line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar .tab { flex: 1; text-align: center; padding: 9px 0 10px; font-size: var(--fs-xs); color: var(--c-text-muted); cursor: pointer; min-height: 48px; }
  .tabbar .tab.on { color: var(--c-accent); font-weight: 600; }
  .tabbar .tab .ic { font-size: 19px; display: block; margin-bottom: 2px; }
  .empty { text-align: center; color: #9ca3af; padding: 40px 0; font-size: 13px; }
  #toast { position: fixed; top: calc(18px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 99; max-width: 90%; background: rgba(18,38,74,.95); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; display: none; }
  .step-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
  .ok { background: #10b981; } .wait { background: #d1d5db; } .cur { background: #f97316; }
  .section-title { font-size: 14px; font-weight: 600; color: #12264a; margin: 14px 2px 8px; }
  .switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; margin: 6px 12px 6px 0; }
  /* 轨迹弹层 */
  #track-layer { position: fixed; inset: 0; background: #fff; z-index: 50; display: flex; flex-direction: column; }
  #track-layer .map-box { flex: 1; min-height: 260px; background: #eef1f6; position: relative; }
  #track-layer .map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; }
  #track-layer .track-list { max-height: 42%; overflow-y: auto; background: #fff; }
  #track-layer .track-list .row { font-size: 12px; }
  #track-layer .track-list .row b { font-size: 12px; }
  .map-tip { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 2; background: rgba(18,38,74,.85); color: #fff; font-size: 11px; padding: 6px 10px; border-radius: 8px; }
  /* 凭证缩略图与详情弹层 */
  .evid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  .evid img, .evid video { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid #e2e8f0; }
  .evid video { object-fit: cover; }
  #lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 80; display: none; align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
  #lightbox img, #lightbox video { max-width: 96%; max-height: 80%; border-radius: 8px; }
  #lightbox .lb-close { color: #fff; font-size: 13px; padding: 14px; position: absolute; top: 0; right: 0; }
  #modal { position: fixed; inset: 0; background: rgba(18,38,74,.45); z-index: 70; display: none; align-items: flex-end; justify-content: center; }
  #modal .m-body { width: 100%; max-width: 430px; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 82%; overflow-y: auto; }
  #modal .m-body.center { border-radius: 16px; max-height: 86%; }
  #modal .m-title { font-size: 15px; font-weight: 600; color: #12264a; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
  #modal .m-title .x { color: #9ca3af; font-size: 20px; cursor: pointer; padding: 0 4px; }
  .clickable { cursor: pointer; }
  @media (max-width: 360px) {
    .btn { padding: 12px; font-size: 14px; }
    .row { font-size: 12px; }
    .card { padding: 12px; }
  }

/* ===== 任务卡片 · 信封风格（立体感） ===== */
.task-card {
  position: relative;
  /* 立体式卡片：白底渐变 + 细边框 + 左侧主色条 + 三层阴影 */
  border: 1px solid #e2e9f2;
  border-left: 3px solid #12264a;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 2px rgba(15, 40, 80, 0.08), 0 4px 10px rgba(15, 40, 80, 0.08), 0 10px 24px rgba(15, 40, 80, 0.10);
  padding: 14px 14px 16px;
  margin: 14px 4px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.task-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,40,80,.10), 0 8px 16px rgba(15,40,80,.12), 0 14px 30px rgba(15,40,80,.14); }
/* 任务号徽标 */
.task-card .task-no {
  display: inline-block;
  background: #12264a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 6px;
}


  /* ===== 运单卡片（图片风格） ===== */
  .oc-list { padding-top: 4px; }
  .oc-card { position: relative; background: var(--c-surface); border: 1.5px dashed rgba(210,60,60,.4); border-radius: var(--r-xl); padding: 14px; margin-bottom: 16px; box-shadow: 0 2px 6px rgba(249,115,22,.06), 0 12px 26px rgba(249,115,22,.10); cursor: pointer; }
  /* AUD-12：印章原 right:-16px + rotate(14deg) 使包围盒在 390px 下右溢 9px；改为不越出卡片右边界 */
  .oc-seal { position: absolute; top: -22px; right: 0; width: 72px; height: 72px; border: 1.5px dashed; border-radius: 50%; transform: rotate(14deg); opacity: .22; display: flex; align-items: center; justify-content: center; box-sizing: border-box; pointer-events: none; }
  .oc-seal-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; }
  .oc-seal-in { width: 48px; height: 48px; border: 1px solid; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
  .oc-seal-text { font-size: 11px; font-weight: 600; white-space: nowrap; }
  .oc-in { position: relative; z-index: 1; }
  .oc-top { display: flex; justify-content: space-between; align-items: center; }
  .oc-no { font-family: Consolas, monospace; font-size: var(--fs-md); font-weight: 600; color: var(--c-ink); }
  .oc-chip { font-size: var(--fs-sm); font-weight: 500; padding: 2px 10px; border-radius: var(--r-chip); color: var(--c-surface); }
  .oc-route { display: flex; align-items: center; margin-top: 12px; }
  .oc-ep { flex: 1; min-width: 0; }
  .oc-ep.right { text-align: right; }
  .oc-city { display: block; font-size: 16px; font-weight: 500; color: var(--c-ink); }
  .oc-addr { display: block; font-size: var(--fs-sm); color: var(--c-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .oc-mid { flex: none; display: flex; align-items: center; width: 88px; margin: 0 6px; }
  .oc-dash { flex: 1; border-top: 1px dashed rgba(210,60,60,.4); }
  .oc-arrow { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
  .oc-goods { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 8px; background: var(--c-surface-3); border-radius: var(--r-md); padding: 10px 12px; margin-top: 12px; }
  .oc-g-label { display: block; font-size: 12px; color: #999; margin-bottom: 2px; }
  .oc-g-value { display: block; font-size: var(--fs-base); font-weight: 500; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .oc-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
  .oc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 500; padding: 2px 8px; border-radius: var(--r-chip); }
  .oc-tag.temp { color: #2E5AAC; background: rgba(46,90,172,.09); border: 1px dashed rgba(46,90,172,.55); }
  .oc-tag.back { color: #2E9E5B; background: rgba(46,158,91,.08); border: 1px dashed rgba(46,158,91,.45); }
  .oc-times { display: flex; align-items: center; margin-top: 10px; gap: 6px; }
  .oc-t { display: flex; align-items: center; gap: 4px; min-width: 0; }
  .oc-t-label { font-size: 12px; color: #999; }
  .oc-t-value { font-size: var(--fs-base); font-weight: 500; color: var(--c-ink); white-space: nowrap; }
  .oc-t-value.urgent { color: var(--c-urgent); }
  .oc-sep { flex: 1; text-align: center; color: #ccc; }
  .oc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(210,60,60,.28); }
  /* R4/§5.5-3：卡片内操作底栏（删除/编辑重提/再来一单），必须嵌在 oc-card 容器内 */
  .oc-ops { display: flex; gap: 8px; padding: 10px 0 0; margin-top: 8px; border-top: 1px dashed rgba(210,60,60,.18); }
  /* UX-17：订单卡「主 + 次 + 更多」——主操作实心、次操作描边、更多为「⋯」图标 */
  .oc-btn { flex: 1; min-height: 34px; border-radius: var(--r-md); font-size: var(--fs-md); font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .oc-btn-primary { background: var(--c-accent); color: var(--c-surface); border: 1px solid var(--c-accent); }
  .oc-btn-line { background: var(--c-surface); color: var(--c-brand); border: 1px solid var(--c-line-strong); }
  .oc-more { flex: none; width: 40px; min-height: 34px; border-radius: var(--r-md); background: var(--c-surface); color: var(--c-text-2); border: 1px solid var(--c-line-strong); font-size: 18px; line-height: 1; cursor: pointer; }
  /* UX-24：详情底部固定主操作区（主操作实心 + 「⋯」，其余操作进弹层） */
  .detail-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; display: flex; gap: 10px; align-items: center; background: #fff; border-top: 1px solid #e5eaf2; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
  /* UX-31/64：司机任务详情底部 dock（主操作 + 工具区 + 安全区），与小程序结构对齐 */
  .detail-dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: var(--c-surface); border-top: 1px solid var(--c-line); z-index: 30; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: var(--sh-dock); }
  .dock-main { display: flex; gap: 8px; align-items: stretch; }
  .dock-btn { flex: 1; min-height: 52px; border-radius: var(--r-btn); border: none; font-size: var(--fs-lg); font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .dock-btn.primary { background: linear-gradient(135deg, var(--c-brand-2), var(--c-brand)); color: var(--c-surface); }
  .dock-btn.primary em { font-style: normal; font-size: 11px; font-weight: 400; opacity: .82; }
  .dock-btn.secondary { flex: 0 0 auto; padding: 0 18px; background: #f4f6fa; color: #12264a; border: 1px solid #e3e8ef; font-size: 14px; }
  .dock-empty { flex: 1; text-align: center; color: var(--st-cancelled); font-size: var(--fs-md); padding: 14px 0; }
  .dock-util { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .dock-util-btn { flex: 1 0 auto; min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid #dbe3ee; background: #fff; color: #334155; font-size: 12px; cursor: pointer; }
  /* UX-30：再来一单失效提示（黄条，与 MP .reorder-warn 同视觉） */
  .reorder-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 8px 12px; font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
  .oc-fee { color: var(--c-accent); font-weight: 700; font-size: var(--fs-base); }
  .oc-veh { font-size: 12px; color: #999; }
  .oc-go { font-size: var(--fs-md); font-weight: 500; color: var(--c-accent); }
  .exp-card{display:flex;justify-content:space-between;align-items:center;padding:12px;border:1px solid #e3e8ef;border-radius:10px;margin-bottom:8px;background:#fff;cursor:pointer}
  .exp-card:active{background:#f8fafc}
  .exp-l{min-width:0;flex:1}
  .exp-name{font-size:14px;color:#12264a;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .exp-sub{font-size:11px;color:#9ca3af;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .exp-r{display:flex;flex-direction:column;align-items:flex-end;gap:2px;margin-left:8px}
  .exp-amt{font-size:15px;color:#f97316;font-weight:700}
  .msg-headbar{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:#fff;border-radius:10px;margin-bottom:8px}
  .msg-h-title{font-size:15px;font-weight:600;color:#12264a}
  .msg-card{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff;border-radius:10px;margin-bottom:8px;cursor:pointer}
  .msg-card:active{background:#f8fafc}
  .msg-ico{width:38px;height:38px;border-radius:50%;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
  .msg-m{min-width:0;flex:1}
  .msg-t{font-size:14px;color:#12264a;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .msg-s{font-size:12px;color:#6b7280;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .msg-time{font-size:11px;color:#9ca3af;flex-shrink:0;margin-left:6px}

/* 运费明细单据（与小程序端一致） */
.fee-bill { border: 1px solid #e2e8f0; border-radius: 8px; padding: 2px 14px 8px; background: #fcfcfd; }
.fb-head { font-size: 13px; font-weight: 600; color: #12264a; padding: 10px 0 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 2px; }
.fb-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed #e2e8f0; font-size: 13px; color: #334155; }
.fb-name { flex: 1; }
.fb-val { font-weight: 500; color: #12264a; font-variant-numeric: tabular-nums; }
.fb-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 2px; }
.fb-total-label { font-size: 13px; font-weight: 600; color: #12264a; }
.fb-total-val { font-size: 17px; font-weight: 700; color: #f97316; font-variant-numeric: tabular-nums; }
.fb-note { padding: 6px 0 0; font-size: 11px; color: #9ca3af; border-top: 1px dashed #e2e8f0; }
