:root {
  --ink: #1a1a1c;
  --ink-2: #45454d;
  --muted: #7a7a85;
  --line: #e7e4dd;
  --line-2: #f0ede7;
  --bg: #f6f4ef;
  --card: #ffffff;
  --brand: #0e7a63;
  --brand-2: #0a5f4d;
  --brand-soft: #e4f2ee;
  --amber: #b06a08;
  --amber-soft: #fbf0dc;
  --danger: #b02a1f;
  --danger-soft: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(26, 26, 28, 0.04), 0 8px 24px -12px rgba(26, 26, 28, 0.18);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

button, .btn, a, .chip, .ops-chip { -webkit-tap-highlight-color: transparent; }

/* 暂停的订单：整体置灰、按钮不可点 */
.view.locked .task .box { opacity: 0.35; pointer-events: none; }
.view.locked .btn.sm, .view.locked .btn.primary { opacity: 0.45; pointer-events: none; }
.view.locked .stage { opacity: 0.75; }
.view.locked .chip { opacity: 0.8; }

/* 手机上输入框 16px，避免 iOS 聚焦时页面被放大 */
@media (max-width: 960px) {
  .input, .select, .textarea, input, select, textarea { font-size: 16px; }
  .modal { max-height: 86vh; border-radius: 14px; }
  .topbar { padding: 0 14px; }
}

a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
::selection { background: var(--brand-soft); }

/* ------------------------------- 布局 ------------------------------- */
.app { display: flex; min-height: 100vh; }

.side {
  width: 212px;
  flex: 0 0 212px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; letter-spacing: -0.04em;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.brand-sub { font-size: 11px; color: var(--muted); line-height: 1.2; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.nav a:hover { background: var(--bg); }
.nav a.on { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.nav .ico { width: 16px; text-align: center; opacity: 0.75; font-size: 13px; }

.side-foot { margin-top: auto; border-top: 1px solid var(--line-2); padding-top: 12px; }
.who { display: flex; align-items: center; gap: 9px; padding: 6px 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 12px;
  display: grid; place-items: center; font-weight: 600;
}
.who-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.who-role { font-size: 11px; color: var(--muted); }
.logout { font-size: 12px; color: var(--muted); padding: 6px 8px; cursor: pointer; background: none; border: 0; }
.logout:hover { color: var(--danger); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(246, 244, 239, 0.86);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.page-title { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.page-sub { font-size: 12.5px; color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; }

.view { padding: 8px 28px 60px; max-width: 1280px; width: 100%; }

/* ------------------------------- 组件 ------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 14.5px; }
.card-h .hint { font-size: 12px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: 0.15s;
}
.btn:hover { border-color: #cfcac1; background: #fdfcfa; }
.btn:active { transform: translateY(0.5px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg); color: var(--ink); }
.btn.danger { color: var(--danger); border-color: #f0d3cf; background: #fff; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  outline: none; transition: 0.15s;
}
.textarea { height: auto; padding: 9px 11px; min-height: 84px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 122, 99, 0.1); }
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.label .req { color: var(--danger); margin-left: 2px; }
.help { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--bg); color: var(--ink-2);
}
.chip.green { background: var(--brand-soft); color: var(--brand-2); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--danger-soft); color: var(--danger); }
.chip.gray { background: #f1efea; color: var(--muted); }

.tag { font-size: 11.5px; color: var(--muted); }

.progress { height: 6px; border-radius: 999px; background: #eeebe5; overflow: hidden; min-width: 60px; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.3s; }
.progress.amber > i { background: var(--amber); }
.progress.full > i { background: var(--brand); }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 25px; font-weight: 650; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat.accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.stat.accent .k, .stat.accent .d { color: rgba(255, 255, 255, 0.72); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fbfaf7;
}
table.tb td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tbody tr:hover { background: #fdfcfa; }
table.tb .num { font-variant-numeric: tabular-nums; text-align: right; }
table.tb .strong { font-weight: 600; }
table.tb .clickable { cursor: pointer; }

/* 任务清单 */
.stage { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.stage-h {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 15px; background: #fbfaf7; border-bottom: 1px solid var(--line-2);
  font-size: 13px; font-weight: 600;
}
.stage-h .count { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.task {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 15px; border-bottom: 1px solid var(--line-2);
}
.task:last-child { border-bottom: 0; }
.task:hover { background: #fdfcfa; }
.task .box {
  width: 19px; height: 19px; flex: 0 0 19px; margin-top: 2px;
  border: 1.6px solid #cfcac1; border-radius: 6px; background: #fff;
  display: grid; place-items: center; cursor: pointer; transition: 0.15s;
}
.task .box:hover { border-color: var(--brand); }
.task.done .box { background: var(--brand); border-color: var(--brand); }
.task .box svg { width: 11px; height: 11px; opacity: 0; }
.task.done .box svg { opacity: 1; }
.task .body { flex: 1; min-width: 0; }
.task .t { font-size: 13.5px; line-height: 1.5; }
.task.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9c4ba; }
.task .m { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.task .m .od { color: var(--danger); font-weight: 600; }
.task .acts { display: flex; gap: 4px; opacity: 0; }
.task:hover .acts { opacity: 1; }
.task .acts button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 11.5px; padding: 2px 4px; }
.task .acts button:hover { color: var(--ink); }

/* 空状态 */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 26px; opacity: 0.4; margin-bottom: 8px; }
.empty p { margin: 0; font-size: 13px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(26, 26, 28, 0.42);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 88vh; overflow: auto; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.4);
  animation: pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } }
.modal-h { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: start; }
.modal-h h3 { font-size: 16px; }
.modal-b { padding: 16px 22px 8px; }
.modal-f { padding: 12px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; }
.x { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; padding: 2px 6px; }

/* 提示 */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 200; box-shadow: var(--shadow); animation: pop 0.18s;
  max-width: 80vw;
}
.toast.err { background: var(--danger); }

/* 分段控件 */
.seg { display: inline-flex; background: #eeebe5; padding: 3px; border-radius: 9px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 7px;
  font-size: 12.5px; font-weight: 550; color: var(--ink-2); cursor: pointer;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; font-size: 13.5px; font-weight: 550;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }

/* 订单详情头 */
.oh { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.oh h1 { font-size: 24px; letter-spacing: -0.03em; }
.oh .sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.oh .kpis { display: flex; gap: 26px; }
.kpi .k { font-size: 11.5px; color: var(--muted); }
.kpi .v { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* 登录 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(900px 500px at 12% -10%, #e8f1ec 0%, transparent 60%),
    radial-gradient(700px 400px at 100% 0%, #f6ece0 0%, transparent 55%), var(--bg);
}
.login { width: 100%; max-width: 372px; }
.login .card { padding: 30px 28px 26px; }
.login h1 { font-size: 22px; letter-spacing: -0.03em; }
.login .sub { color: var(--muted); font-size: 13px; margin: 4px 0 22px; }
.demo-hint { margin-top: 16px; font-size: 11.5px; color: var(--muted); line-height: 1.9; }
.demo-hint code { background: #f1efea; padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 11px; }

/* 移动端标签栏 */
.tabbar { display: none; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .side { display: none; }
  .topbar { padding: 0 16px; height: 56px; }
  .view { padding: 6px 16px 86px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1; text-align: center; font-size: 10.5px; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0;
  }
  .tabbar a .ico { font-size: 17px; line-height: 1; }
  .tabbar a.on { color: var(--brand); font-weight: 600; }
  .oh .kpis { gap: 18px; }
  .oh h1 { font-size: 20px; }
  .hide-sm { display: none !important; }
}

@media (max-width: 560px) {
  .row { flex-direction: column; gap: 0; }
  .stat .v { font-size: 21px; }
}

/* ---------------------------- v2 新增组件 ---------------------------- */
.recent-row { display:block; padding:10px 0; border-bottom:1px solid var(--line-2); }
.recent-row:last-child { border-bottom:0; }

.req-row {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:12px 0; border-bottom:1px solid var(--line-2);
}
.req-row:last-child { border-bottom:0; }
.req-t { font-size:13.5px; font-weight:600; }
.req-amt { font-size:15px; font-weight:650; font-variant-numeric:tabular-nums; }

.line-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:9px 0; border-bottom:1px solid var(--line-2);
}
.line-row:last-child { border-bottom:0; }

/* 账户卡 */
.acc-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:16px; }
.acc-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; }
.acc-type { font-size:11px; color:var(--muted); letter-spacing:.04em; }
.acc-name { font-size:13px; font-weight:600; margin-top:2px; }
.acc-bal { font-size:23px; font-weight:650; letter-spacing:-0.03em; margin-top:6px; font-variant-numeric:tabular-nums; }
.acc-sub { font-size:11.5px; color:var(--muted); margin-top:2px; }

/* 计价行 */
.calc-row {
  display:flex; align-items:center; gap:12px; padding:9px 10px;
  border-bottom:1px solid var(--line-2); border-radius:8px;
}
.calc-row.on { background:var(--brand-soft); }
.calc-name { flex:1; font-size:13px; }
.calc-name .tag { margin-left:8px; }
.calc-qty { display:flex; align-items:center; gap:4px; }
.calc-qty .qty { width:56px; height:30px; text-align:center; padding:0 4px; }
.step {
  width:28px; height:30px; border:1px solid var(--line); background:#fff;
  border-radius:7px; cursor:pointer; font-size:15px; line-height:1; color:var(--ink-2);
}
.step:hover { border-color:var(--brand); color:var(--brand); }
.calc-sum { width:78px; text-align:right; font-variant-numeric:tabular-nums; }
.calc-total {
  display:flex; justify-content:space-between; align-items:baseline;
  margin-top:12px; padding-top:12px; border-top:1px solid var(--line);
  font-size:13px; color:var(--muted);
}
.calc-total b { font-size:20px; color:var(--ink); letter-spacing:-0.02em; }

/* 权限勾选 */
.checkgrid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.checkgrid label { font-size:12.5px; display:flex; gap:6px; align-items:center; }
.perm-item { display:block; font-size:12.5px; padding:2px 0 2px 4px; color:var(--ink-2); }
.role-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 20px; border-top:1px solid var(--line-2);
}

@media (max-width: 960px) {
  .acc-grid { grid-template-columns:1fr; }
  .checkgrid { grid-template-columns:1fr; }
}

/* ---------------------- 建单：服务卡片 ---------------------- */
.addsvc { position: relative; margin-bottom: 10px; }
.addbtn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px dashed #c9c4ba; background: #fff; color: var(--brand);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.addbtn:hover { border-color: var(--brand); background: var(--brand-soft); }
.addmenu {
  position: absolute; top: 40px; left: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.25); padding: 6px;
  display: flex; flex-direction: column; gap: 2px; min-width: 180px;
}
.addmenu button {
  text-align: left; border: 0; background: none; padding: 9px 12px;
  border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink-2);
}
.addmenu button:hover { background: var(--bg); color: var(--ink); }

.scard {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; background: #fff;
}
.scard-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.scard-h b { flex: 1; font-size: 13.5px; }
.scard-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.mini { width: 62px; height: 30px; text-align: center; padding: 0 4px; }
.mini-sel {
  height: 30px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; padding: 0 6px; font-size: 12.5px; color: var(--ink-2);
}
.ops-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ops-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  font-size: 12px; cursor: pointer; color: var(--ink-2); user-select: none;
}
.ops-chip:hover { border-color: #b9ded4; }
.ops-chip.on { background: var(--brand-soft); border-color: #b9ded4; color: var(--brand-2); font-weight: 600; }

/* 三个服务按钮并排 */
.addsvc { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; position: static; }
.addsvc .addbtn { height: 36px; padding: 0 14px; }

.owner-box { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: #fbfaf7; }

.snip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.snip-row .ops-chip { font-size: 11.5px; }

.proof-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.proof { display: block; width: 88px; height: 88px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.proof img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proof-add {
  width: 88px; height: 88px; border: 1px dashed #c9c4ba; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px; color: var(--muted); cursor: pointer;
}
.proof-add:hover { border-color: var(--brand); color: var(--brand); }

/* =====================================================================
   移动端适配层（手机浏览器）
   目标：列表一行放不下就折两行、弹窗能看全、标签/分段可横向滑动
   ===================================================================== */
@media (max-width: 760px) {
  /* ---- 页面基础留白 ---- */
  .view { padding: 8px 12px calc(84px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 12px; }
  .card { border-radius: 14px; }
  .card-pad { padding: 12px 14px; }

  /* ---- 弹窗：底部抽屉式，头尾固定，中间滚动 ---- */
  .mask { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: sheet-up .22s cubic-bezier(.2,.9,.3,1);
  }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } }
  .modal > .modal-h { flex: 0 0 auto; padding: 16px 16px 8px; }
  .modal > .modal-b { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px 12px; }
  .modal > .modal-f {
    flex: 0 0 auto; padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-2); background: #fff; justify-content: stretch;
  }
  .modal > .modal-f .btn { flex: 1; }
  .modal > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .modal > form > .modal-b { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px 12px; }
  .modal > form > .modal-f {
    flex: 0 0 auto; padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-2); background: #fff;
  }
  .modal > form > .modal-f .btn { flex: 1; }

  /* ---- 统计卡：两列 ---- */
  .stats { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .stat { padding: 12px 12px; }
  .stat .k { font-size: 11px; }
  .stat .v { font-size: 19px; }
  .stat .d { font-size: 10.5px; }
  .acc-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* ---- 列表行：放不下就折两行 ---- */
  .line-row, .row2, .req-row {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 11px 0;
  }
  .line-row > div:first-child, .row2 > div:first-child, .req-row > div:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  .line-row > div:last-child, .row2 > div:last-child, .req-row > div:last-child {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }
  /* 按钮组整体换到第二行，靠右 */
  .line-row .btn, .row2 .btn, .req-row .btn { flex: 0 0 auto; }

  /* ---- 订单头 / 卡片头 ---- */
  .oh { gap: 10px; }
  .oh h1 { font-size: 19px; }
  .oh .kpis { gap: 14px; width: 100%; flex-wrap: wrap; }
  .card-h { flex-wrap: wrap; gap: 6px 8px; }
  .card-h .hint { flex: 1 1 100%; }
  .card-h > div:last-child { margin-left: auto; }

  /* ---- 表格：手机上变成「标签 + 值」的卡片列表 ---- */
  .table-wrap { overflow-x: visible; margin: 0; padding: 0; }
  table.tb { display: block; font-size: 13px; min-width: 0; }
  table.tb thead { display: none; }
  table.tb tbody { display: block; }
  table.tb tr {
    display: block; padding: 11px 2px;
    border-bottom: 1px solid #f1eee7;
  }
  table.tb tr:last-child { border-bottom: 0; }
  table.tb td {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; border: 0; padding: 3px 0; text-align: right !important;
    font-size: 12.5px; color: #4a544e;
  }
  table.tb td::before {
    content: attr(data-label);
    flex: 0 0 auto; text-align: left;
    font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  }
  /* 第一列当标题：去掉标签，加大字号 */
  table.tb td:first-child {
    display: block; text-align: left !important;
    font-size: 13.5px; font-weight: 700; letter-spacing: -.01em;
    padding: 2px 0 3px; color: var(--ink);
  }
  table.tb td:first-child::before { display: none; }
  table.tb td.hide-sm { display: none !important; }
  table.tb td.num { font-weight: 700; font-size: 14px; color: var(--ink); }
  table.tb td .chip { margin-left: 4px; }
  table.tb td .progress { flex: 1; max-width: 140px; }


  /* ---- 标签页 / 分段：横向滑动，不换行 ---- */
  .tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; scrollbar-width: none; margin-bottom: 12px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; padding: 9px 12px; font-size: 13px; white-space: nowrap; }
  .seg {
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; scrollbar-width: none; max-width: 100%;
  }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: 0 0 auto; white-space: nowrap; }

  /* ---- 表单 ---- */
  .row { flex-direction: column; gap: 0; }
  .field { margin-bottom: 10px; }
  .input, .select, .textarea { font-size: 16px; } /* 防 iOS 自动放大 */
  .help { font-size: 11px; }

  /* ---- 顶栏标题与操作按钮 ---- */
  .topbar .btn, .topbar .btn.sm { padding: 7px 10px; font-size: 12.5px; }
  .page-h { flex-wrap: wrap; gap: 10px; }
  .page-h .actions { width: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
  .page-h .actions .btn { flex: 1 1 auto; }

  /* ---- 查看类信息行 ---- */
  .kv { flex-wrap: wrap; gap: 2px 10px; }
  .kv .v { margin-left: auto; text-align: right; max-width: 68%; }

  /* 审批行：勾选框固定宽度，文字占满，按钮换行到右侧 */
  .req-row { align-items: flex-start; }
  .req-row > input[type=checkbox] { flex: 0 0 auto; margin-left: 2px !important; margin-top: 3px; }
  .req-row > div:nth-child(2) { flex: 1 1 auto; min-width: 0; }
  .req-row > div:last-child { flex: 1 1 100%; justify-content: flex-end; }

  /* 达人卡片：操作按钮换行排列，不压住文字 */
  .job-card .actions, .talent-actions { flex-wrap: wrap; }

  /* 详情页顶部操作按钮：换行不挤压标题 */
  .oh .actions { width: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
  .oh .actions .btn { flex: 0 1 auto; }

  /* ---- 顶栏标题与操作按钮 ---- */
  .topbar {
    height: auto; min-height: 56px; padding: 10px 12px;
    align-items: flex-start; flex-wrap: wrap; gap: 8px;
  }
  .page-title { font-size: 17px; }
  .page-sub { font-size: 11.5px; }
  .top-actions { width: 100%; display: flex; gap: 6px; flex-wrap: wrap; }
  .top-actions .btn { flex: 1 1 auto; justify-content: center; }
  .top-actions .btn.sm { padding: 7px 10px; }

  /* 防止任何元素把页面撑出横向滚动 */
  html, body { overflow-x: hidden; }
  .main { width: 100%; min-width: 0; }
  .card { max-width: 100%; }
  .card-pad { overflow-wrap: anywhere; }
  .tag, .chip, .help { overflow-wrap: anywhere; }

  /* ---- 提示条 ---- */
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 92vw; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr !important; }
  .oh h1 { font-size: 18px; }
  .line-row, .row2, .req-row { padding: 10px 0; }
}


/* =====================================================================
   v3 视觉系统（移动优先）
   目的：字号层级、色块、留白节奏、卡片质感
   ===================================================================== */
:root {
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --ink-3: #9aa39d;
  --tint-green: #f2f9f5;
  --tint-amber: #fdf7ec;
  --tint-red: #fdf2f0;
  --tint-blue: #f2f6fb;
  --hairline: #eeebe4;
}

/* ---------- 基础排版 ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}
.num, .v, .req-amt, .kpi .v, .stat .v { font-variant-numeric: tabular-nums; }

/* ---------- 页面容器 ---------- */
@media (max-width: 760px) {
  .view { padding: 12px 14px calc(88px + env(safe-area-inset-bottom)); }

  /* ---------- 卡片：更软的边、更细的影 ---------- */
  .card {
    border-radius: var(--r-lg);
    border: 1px solid var(--hairline);
    box-shadow: 0 1px 2px rgba(20,26,22,.03), 0 10px 30px -22px rgba(20,26,22,.35);
    background: #fff;
    margin-bottom: 14px;
  }
  .card + .card { margin-top: 0; }
  .card-pad { padding: 16px; }

  /* 卡片标题：色点 + 字号层级 */
  .card-h { align-items: center; gap: 8px; padding-bottom: 2px; }
  .card-h h3 {
    font-size: 14px; font-weight: 700; letter-spacing: -.01em;
    display: flex; align-items: center; gap: 7px;
  }
  .card-h h3::before {
    content: ""; width: 3px; height: 13px; border-radius: 2px;
    background: linear-gradient(180deg, var(--brand), #34c59a);
    flex: 0 0 3px;
  }
  .card-h .hint { font-size: 11.5px; color: var(--ink-3); }

  /* ---------- KPI 色块 ---------- */
  .stats { gap: 10px; margin-bottom: 14px; }
  .stat {
    position: relative; overflow: hidden;
    border-radius: var(--r-md);
    padding: 13px 14px 12px;
    background: linear-gradient(180deg, #ffffff, #fbfaf6);
    border: 1px solid var(--hairline);
    box-shadow: 0 1px 2px rgba(20,26,22,.03);
  }
  .stat::after {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 3px; border-radius: 0 3px 3px 0; background: #d8d4cb;
  }
  .stat.accent::after { background: linear-gradient(180deg, var(--brand), #34c59a); }
  .stat:nth-child(2)::after { background: #d9a441; }
  .stat:nth-child(3)::after { background: #6f9bd1; }
  .stat:nth-child(4)::after { background: #c07a6a; }
  .stat .k { font-size: 11px; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
  .stat .v { font-size: 21px; font-weight: 750; letter-spacing: -.03em; margin-top: 3px; }
  .stat .d { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

  /* ---------- 列表行 ---------- */
  .line-row, .row2, .req-row {
    padding: 13px 2px;
    border-bottom: 1px solid #f1eee7;
    gap: 6px 10px;
  }
  .line-row > div:first-child > div:first-child,
  .row2 > div:first-child > div:first-child,
  .req-row > div:nth-child(2) > div:first-child {
    font-size: 13.5px !important; font-weight: 650; letter-spacing: -.01em;
  }
  .line-row .tag, .row2 .tag, .req-row .tag { font-size: 11.5px; color: var(--ink-3); }

  /* ---------- 状态标签 ---------- */
  .chip {
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 999px; letter-spacing: .01em;
  }
  .chip.green { background: #e8f6ef; color: #0a6a4c; }
  .chip.amber { background: #fdf2df; color: #9a6216; }
  .chip.red { background: #fdeeec; color: #a83a2f; }
  .chip.gray { background: #f2f0eb; color: #6f7973; }
  .tag { font-size: 11.5px; color: var(--ink-3); }

  /* ---------- 按钮 ---------- */
  .btn {
    height: 38px; border-radius: 11px; font-size: 13.5px; font-weight: 650;
    padding: 0 14px; border: 1px solid #e6e2d9; background: #fff;
    box-shadow: 0 1px 2px rgba(20,26,22,.04);
  }
  .btn.primary {
    background: linear-gradient(150deg, #0d6b4f, #17855f);
    border-color: transparent; color: #fff;
    box-shadow: 0 8px 18px -12px rgba(13,107,79,.9);
  }
  .btn.sm { height: 32px; font-size: 12.5px; padding: 0 11px; border-radius: 9px; }
  .btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--brand); }
  .btn.danger { color: #a83a2f; border-color: #f0d3cf; background: #fff7f6; }

  /* ---------- 顶栏 ---------- */
  .topbar {
    background: rgba(250,249,245,.86);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid rgba(0,0,0,.05);
    position: sticky; top: 0; z-index: 20;
  }
  .page-title { font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
  .page-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

  /* ---------- 标签页：胶囊式 ---------- */
  .tabs {
    border-bottom: 0; gap: 6px; padding: 4px 0 6px; margin-bottom: 12px;
  }
  .tabs button {
    border: 1px solid transparent; border-radius: 999px;
    padding: 7px 13px; font-size: 12.5px; font-weight: 600;
    color: #6f7973; background: #fff; border-color: var(--hairline);
  }
  .tabs button.on {
    background: #10382c; color: #fff; border-color: #10382c;
    box-shadow: 0 6px 14px -8px rgba(16,56,44,.9);
  }

  /* ---------- 分段 ---------- */
  .seg { background: #efede6; border-radius: 12px; padding: 3px; }
  .seg button { border-radius: 9px; font-size: 12px; padding: 6px 11px; }
  .seg button.on { box-shadow: 0 2px 6px rgba(20,26,22,.10); font-weight: 650; }

  /* ---------- 表单 ---------- */
  .label { font-size: 12px; font-weight: 600; color: #4a544e; margin-bottom: 6px; }
  .input, .select, .textarea {
    border: 1px solid #e4e0d7; border-radius: 12px; background: #fff;
  }
  .input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,107,79,.10);
  }

  /* ---------- 弹窗：抽屉 + 顶部把手 ---------- */
  .modal { border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px -12px rgba(0,0,0,.28); }
  .modal > .modal-h, .modal > form > .modal-h { position: relative; }
  .modal > .modal-h::before, .modal > form > .modal-h::before {
    content: ""; position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 99px; background: #e2ded5;
  }
  .modal > .modal-h, .modal > form > .modal-h { padding-top: 20px; }
  .modal-h h3 { font-size: 16px; font-weight: 750; letter-spacing: -.02em; }

  /* ---------- 表格卡片化 ---------- */
  table.tb tr { padding: 14px 2px; }
  table.tb td:first-child { font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
  table.tb td { font-size: 12.5px; color: #4a544e; }
  table.tb td.num { font-weight: 700; color: var(--ink); font-size: 15px; }

  /* ---------- 空状态 ---------- */
  .empty { padding: 46px 20px; }
  .empty p { font-size: 13px; color: var(--ink-3); }

  /* ---------- 底部导航 ---------- */
  .tabbar {
    border-top: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 -8px 24px -18px rgba(0,0,0,.5);
  }
  .tabbar a { font-size: 10px; gap: 3px; padding: 5px 0; }
  .tabbar a.on { color: var(--brand); }
  .tabbar a.on .ico { transform: translateY(-1px); }
}


/* ---------- 订单列表卡片 ---------- */
.olist { display: block; }
.orow {
  display: block; padding: 15px 16px; border-bottom: 1px solid #f1eee7;
  color: inherit; text-decoration: none; transition: background .15s;
}
.orow:last-child { border-bottom: 0; }
.orow:active { background: #faf9f5; }
.orow-top { display: flex; align-items: baseline; gap: 10px; }
.orow-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.orow-amt { font-size: 16px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.orow-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.orow-meta .mono { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.orow-bar { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.orow-bar .progress { height: 6px; }
.orow-pct { font-size: 11.5px; font-weight: 650; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.orow-foot {
  display: flex; gap: 16px; margin-top: 9px;
  font-size: 11.5px; color: var(--ink-3);
}
.orow-foot b { font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .orow { padding: 14px 14px; }
  .orow-name { font-size: 15.5px; }
  .orow-amt { font-size: 17px; }
  .orow-foot { justify-content: space-between; gap: 8px; }
}

/* 看板两栏：手机上竖排 */
@media (max-width: 900px) {
  .dash-cols { grid-template-columns: 1fr !important; gap: 14px !important; }
}
/* 单号不断行 */
.mono { white-space: nowrap; }

/* ---------- 收尾打磨 ---------- */
/* 表格最后一列（操作按钮）不显示标签，靠右 */
@media (max-width: 760px) {
  table.tb td:last-child { justify-content: flex-end; padding-top: 8px; }
  table.tb td:last-child::before { display: none; }
  table.tb td:last-child .btn { margin-left: 6px; }
}

/* 高亮 KPI 卡：深绿底，文字反白 */
.stat.accent {
  background: linear-gradient(150deg, #0d6b4f, #12855f) !important;
  border-color: transparent !important;
  color: #fff;
  box-shadow: 0 10px 26px -18px rgba(13,107,79,.9);
}
.stat.accent .k { color: rgba(255,255,255,.78) !important; }
.stat.accent .v { color: #fff !important; }
.stat.accent .d { color: rgba(255,255,255,.72) !important; }
.stat.accent::after { display: none; }

/* 金额数字统一等宽 */
.money-num, .orow-amt, .stat .v, .kpi .v, .req-amt, table.tb td.num { font-variant-numeric: tabular-nums; }

/* 卡片之间呼吸感 */
@media (max-width: 760px) {
  .view > .card + .card,
  .view > div + .card,
  .view > .card + div { margin-top: 14px; }
  .stats + .card, .stats + div { margin-top: 14px; }
}

/* 待办条目：勾选框和文字对齐 */
.task-row, .task-item { align-items: flex-start; }
.task-row input[type=checkbox], .task-item input[type=checkbox] { margin-top: 3px; }


/* =====================================================================
   v5 紧凑版：字号加大一点、行距收紧、每行用色块区分
   ===================================================================== */
@media (max-width: 760px) {
  /* ---------- 整体字号上调 ---------- */
  body { font-size: 15.5px; }
  .view { padding: 10px 12px calc(84px + env(safe-area-inset-bottom)); }
  .card-pad { padding: 14px; }
  .card { margin-bottom: 12px; border-radius: 16px; }

  .page-title { font-size: 19px; }
  .page-sub { font-size: 12px; }

  /* ---------- 卡片标题 ---------- */
  .card-h h3 { font-size: 15px; }
  .card-h .hint { font-size: 12px; }

  /* ---------- KPI ---------- */
  .stats { gap: 9px; margin-bottom: 12px; }
  .stat { padding: 12px 13px 11px; border-radius: 13px; }
  .stat .k { font-size: 12px; }
  .stat .v { font-size: 22px; margin-top: 2px; }
  .stat .d { font-size: 11.5px; margin-top: 1px; }

  /* ---------- 表格行：变成一块一块的色卡 ---------- */
  table.tb tr {
    margin: 7px 0; padding: 10px 12px;
    background: #fbfaf7;
    border: 1px solid #f0ece3;
    border-radius: 13px;
    border-bottom: 1px solid #f0ece3;
  }
  table.tb tr:nth-child(even) { background: #f6faf8; border-color: #e8f1ec; }
  table.tb tr:last-child { border-bottom: 1px solid #f0ece3; }
  table.tb td { padding: 2px 0; font-size: 13px; }
  table.tb td::before { font-size: 12px; }
  table.tb td:first-child { font-size: 14.5px; padding: 0 0 3px; }
  table.tb td.num { font-size: 15px; }

  /* ---------- 订单卡：色块 + 紧凑 ---------- */
  .orow {
    margin: 8px 0; padding: 11px 13px;
    background: #fbfaf7; border: 1px solid #f0ece3; border-radius: 14px;
    border-bottom: 1px solid #f0ece3;
  }
  .orow:nth-child(even) { background: #f6faf8; border-color: #e8f1ec; }
  .orow-name { font-size: 16px; }
  .orow-amt { font-size: 18px; }
  .orow-meta { margin-top: 5px; gap: 5px; }
  .orow-meta .mono { font-size: 11.5px; }
  .orow-bar { margin-top: 9px; }
  .orow-foot { margin-top: 6px; font-size: 12px; }
  .orow-foot b { font-size: 12.5px; }

  /* ---------- 普通列表行：也用浅色块区分 ---------- */
  .line-row, .row2 {
    margin: 6px 0; padding: 10px 12px;
    background: #fbfaf7; border: 1px solid #f0ece3; border-radius: 12px;
    border-bottom: 1px solid #f0ece3;
  }
  .line-row:nth-child(even), .row2:nth-child(even) { background: #f6faf8; border-color: #e8f1ec; }
  .line-row > div:first-child > div:first-child,
  .row2 > div:first-child > div:first-child { font-size: 14.5px !important; }
  .line-row .tag, .row2 .tag { font-size: 12px; }

  /* ---------- 审批行 ---------- */
  .req-row {
    margin: 7px 0; padding: 10px 12px;
    background: #fff; border: 1px solid #f0ece3; border-radius: 12px;
    border-bottom: 1px solid #f0ece3;
  }
  .req-t { font-size: 14.5px; }
  .req-row .tag { font-size: 12px; }
  .req-amt { font-size: 16px; }

  /* ---------- 待办条目 ---------- */
  .task-row, .task-item { padding: 8px 2px; }
  .task-row .tt, .task-item .tt { font-size: 14px; }

  /* ---------- 标签 ---------- */
  .chip { font-size: 11.5px; padding: 3px 9px; }
  .tag { font-size: 12px; }

  /* ---------- 表单更紧凑 ---------- */
  .field { margin-bottom: 9px; }
  .label { font-size: 12.5px; margin-bottom: 5px; }
  .help { font-size: 11.5px; margin-top: 4px; }
  .input, .select, .textarea { font-size: 15.5px; }
}

/* 色块左右留出内缩，像一张张卡片 */
@media (max-width: 760px) {
  table.tb tr { margin: 7px 8px; }
  .orow { margin: 8px 8px; }
  .line-row, .row2 { margin: 6px 6px; }
  .req-row { margin: 7px 6px; }
  /* 卡片本身不再留额外 padding，避免双重缩进 */
  .card > .table-wrap { padding: 2px 0; }
}


/* =====================================================================
   紧凑列表（达人 / 商家）：两行一条，左名右数
   ===================================================================== */
.clist { display: block; }
.crow {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 8px; padding: 9px 12px;
  background: #fbfaf7; border: 1px solid #f0ece3; border-radius: 12px;
  color: inherit; text-decoration: none;
}
.crow:nth-child(even) { background: #f6faf8; border-color: #e8f1ec; }
.crow:active { background: #f2f6f3; }
.crow-l { flex: 1; min-width: 0; }
.crow-name {
  font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crow-sub {
  font-size: 11.5px; color: var(--ink-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crow-r { flex: 0 0 auto; text-align: right; }
.crow-amt {
  font-size: 15px; font-weight: 750; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .crow { margin: 5px 6px; padding: 9px 11px; }
  .crow-name { font-size: 15px; }
  .crow-sub { font-size: 12px; }
  .crow-amt { font-size: 16px; }
}


/* =====================================================================
   v6 模块化视觉：每张卡片有彩色标题区，账户/流水有色块
   ===================================================================== */
@media (max-width: 760px) {
  /* 卡片标题变成色带 */
  .card-h {
    background: linear-gradient(180deg, #f4faf7, #f8fcfa);
    margin: -14px -14px 10px;
    padding: 11px 14px;
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid #e6efe9;
  }
  .card-h h3 { font-size: 14.5px; }
  .card-h h3::before { height: 14px; }
  .card-h .hint { color: #79a292; }

  /* 标题区里的次级按钮缩小 */
  .card-h .btn.sm { height: 28px; font-size: 12px; }
}

/* 账户卡：按类型分色 */
.acc-card {
  border-radius: 14px; padding: 14px 15px;
  border: 1px solid #f0ece3; background: #fbfaf7;
  position: relative; overflow: hidden;
}
.acc-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #d8d4cb;
}
.acc-card:nth-child(1)::before { background: linear-gradient(180deg, #0d6b4f, #34c59a); }
.acc-card:nth-child(2)::before { background: #6f9bd1; }
.acc-card:nth-child(3)::before { background: #d9a441; }
.acc-type { font-size: 11px; letter-spacing: .08em; color: #8d978f; font-weight: 600; }
.acc-name { font-size: 12.5px; color: #5a655e; margin-top: 1px; }
.acc-bal { font-size: 21px; font-weight: 750; letter-spacing: -.03em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.acc-sub { font-size: 11px; color: #9aa39d; margin-top: 2px; }

/* 资金流水：收/支用色块标出来 */
@media (max-width: 760px) {
  table.tb tr { position: relative; }
  table.tb td:first-child { position: relative; }
}

/* 审批分组头：更强的色块 */
@media (max-width: 760px) {
  .card-pad > .card-h + div, .card-pad + .card { }
}

/* 详情页内的小色块：kv 行 */
@media (max-width: 760px) {
  .kv {
    padding: 9px 2px; border-bottom: 1px solid #f2efe8;
    font-size: 13.5px;
  }
  .kv .k { font-size: 12.5px; color: #8d978f; }
  .kv .v { font-size: 13.5px; font-weight: 600; }
}

/* 空状态 */
.empty { font-size: 13.5px; }


/* ---------- 待办分组：色块标题 ---------- */
.tgroup { margin: 10px 0 4px; }
.tgroup-h {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; margin: 0 4px 6px;
  background: linear-gradient(90deg, #e9f5ef, #f5fbf8);
  border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0;
  text-decoration: none; color: inherit;
}
.tgroup-name { font-size: 13.5px; font-weight: 750; color: #0a5a42; }
.tgroup-no { font-size: 11px; color: #6f9c8b; font-family: var(--mono); }
.tgroup-n { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--brand); }


/* ---------- 资金流水：收/支左侧色条 ---------- */
@media (max-width: 760px) {
  table.tb tr.flow { border-left: 3px solid transparent; padding-left: 9px; }
  table.tb tr.flow-in { border-left-color: #16a37a; background: #f5fbf8; }
  table.tb tr.flow-out { border-left-color: #d98b6a; background: #fdf8f4; }
}

/* ---------- 审批分组头 ---------- */
@media (max-width: 760px) {
  .card-pad[style*="f3f8f6"] { border-radius: 12px; margin: 0 6px 8px !important; }
}


/* ---------- 商家筛选区：三段紧凑排布 ---------- */
.mfilter { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mfilter .seg { align-self: flex-start; }
.mfilter-range { display: flex; align-items: center; gap: 6px; }
.mfilter-range .input { flex: 1; min-width: 0; height: 38px; font-size: 13px; padding: 0 8px; }
.mfilter-sep { color: var(--ink-3); font-size: 12px; flex: 0 0 auto; }
.mfilter-range .btn { flex: 0 0 auto; height: 38px; }
.mfilter-search { display: flex; align-items: center; gap: 6px; }
.mfilter-search .input { flex: 1; height: 38px; font-size: 14px; }

@media (max-width: 760px) {
  .mfilter-range .input { font-size: 12.5px; }
  /* 账户卡：三张时最后一张占满一行 */
  .acc-grid { grid-template-columns: 1fr 1fr; }
  .acc-card:last-child:nth-child(odd) { grid-column: span 2; }
  .acc-bal { font-size: 20px; }
  /* 订单卡底部金额行更紧凑 */
  .orow-foot { margin-top: 5px; font-size: 11.5px; }
  .orow { padding: 11px 12px; }
  .orow-meta { margin-top: 4px; }
  .orow-bar { margin-top: 8px; }
}


/* ---------- 更多菜单 ---------- */
.moregrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.moreitem {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: #fbfaf7; border: 1px solid #f0ece3; font-size: 13px; font-weight: 600;
}
.moreitem:active { background: #f2f7f4; }
.moreitem .ico { color: var(--brand); }
.moreuser {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 12px 14px; border-radius: 14px; background: #f7f9f7; border: 1px solid #edf0ec;
}


/* ---------- 顶栏菜单按钮 ---------- */
.menu-btn {
  width: 38px; height: 38px; padding: 0; border-radius: 11px;
  font-size: 17px; line-height: 1; display: grid; place-items: center;
  color: var(--ink-2); border-color: #e6e2d9; background: #fff;
}
.menu-btn:active { background: #f2f6f3; }
@media (min-width: 961px) {
  .menu-btn { display: none; }   /* 电脑上左边有完整菜单，不用这个 */
}
@media (max-width: 760px) {
  .top-actions .menu-btn { flex: 0 0 auto; }
}


/* =====================================================================
   固定顶栏 AppBar：两行（标题+菜单），滚动时常驻
   ===================================================================== */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 249, 245, 0.88);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(20, 26, 22, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 24px -22px rgba(0, 0, 0, 0.5);
}

.appbar-top {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 6px;
}
.ab-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid #e6e2d9; background: #fff; color: var(--ink-2);
  font-size: 15px; line-height: 1; display: none; place-items: center;
}
.ab-btn:active { background: #f2f6f3; }
.appbar-title { flex: 1; min-width: 0; }
.appbar-title .page-title {
  font-size: 18px; font-weight: 780; letter-spacing: -.025em; line-height: 1.2;
}
.appbar-title .page-sub {
  font-size: 11.5px; color: var(--ink-3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-actions { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.appbar-actions .btn { height: 32px; font-size: 12.5px; padding: 0 11px; border-radius: 9px; }
.appbar-actions .btn.primary { box-shadow: 0 6px 14px -10px rgba(13,107,79,.9); }

/* 第二行：模块导航（可横滑） */
.appbar-nav {
  display: flex; gap: 6px; padding: 2px 12px 9px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.appbar-nav::-webkit-scrollbar { display: none; }
.ab-tab {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
  color: #5f6b64; text-decoration: none;
  background: #fff; border: 1px solid #eae6dd;
}
.ab-tab.on {
  background: linear-gradient(150deg, #10382c, #17573f);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 14px -9px rgba(16,56,44,.95);
}

@media (max-width: 960px) {
  .ab-btn { display: grid; }
  .appbar-top { padding: 9px 12px 5px; }
  .appbar-nav { padding: 2px 10px 8px; }
}

/* 手机：顶栏更紧凑，操作按钮只留图标感 */
@media (max-width: 760px) {
  .appbar-title .page-title { font-size: 17px; }
  .appbar-actions .btn { height: 30px; font-size: 12px; padding: 0 9px; }
  /* 内容区顶部不再重复留白 */
  .view { padding-top: 10px; }
}


/* ---------- 顶栏与内容区拉开：白底 + 顶部品牌线 ---------- */
.appbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid #e8e4da !important;
  box-shadow: 0 1px 0 #fff inset, 0 10px 26px -20px rgba(20, 26, 22, 0.55) !important;
}
.appbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #0d6b4f, #16a37a 45%, #4bbf94);
}
.appbar { position: sticky; top: 0; }
.appbar-nav { border-top: 1px solid #f2efe8; padding-top: 7px; margin-top: 2px; }

/* 页面底色更深一点，和白顶栏对比出来 */
@media (max-width: 960px) {
  body { background: #f2f0e9; }
  .view { background: transparent; }
}

/* 底部导航也统一成白色，和顶栏呼应 */
.tabbar {
  background: rgba(255,255,255,0.96) !important;
  border-top: 1px solid #e8e4da !important;
}


/* ---------- 顶栏 v2：左标题、右上少量入口、操作单独一行 ---------- */
.appbar-top {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px 8px;
}
.appbar-title { flex: 1; min-width: 0; }
.appbar-title .page-title {
  font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2;
}
.appbar-title .page-sub {
  font-size: 11.5px; color: var(--ink-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 右上角：审批 / 设置 */
.appbar-links { display: flex; gap: 6px; flex: 0 0 auto; padding-top: 2px; }
.ab-link {
  font-size: 12.5px; font-weight: 600; color: #5f6b64; text-decoration: none;
  padding: 5px 10px; border-radius: 999px; background: #f4f2ec; border: 1px solid #eae6dd;
}
.ab-link.on { background: linear-gradient(150deg,#10382c,#17573f); color: #fff; border-color: transparent; }

/* 操作按钮单独一行，不和标题抢位置 */
.appbar-actions {
  display: flex; gap: 8px; padding: 0 14px 11px;
}
.appbar-actions .btn { flex: 1 1 auto; height: 40px; font-size: 14px; border-radius: 11px; }
.appbar-actions .btn.primary { box-shadow: 0 8px 18px -12px rgba(13,107,79,.95); }
.appbar-actions .btn:only-child { flex: 0 0 auto; padding: 0 18px; }

@media (max-width: 760px) {
  .appbar-title .page-title { font-size: 19px; }
  .appbar-actions { gap: 7px; padding: 0 12px 10px; }
  .appbar-actions .btn { height: 38px; font-size: 13.5px; }
}


/* ---------- 新建订单：手机上单列，不再并排挤 ---------- */
.neworder-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) {
  .neworder-grid { grid-template-columns: 1fr; gap: 12px; }
  .neworder-grid > div > .card[style*="sticky"] { position: static !important; top: auto !important; }
}
@media (max-width: 760px) {
  /* 门店选择 + 新门店按钮：一行放得下就一行 */
  #storeBox > div[style*="display:flex"] { flex-wrap: wrap; }
  #storeBox .select { flex: 1 1 60%; min-width: 0; }
  /* 服务按钮：两个一行 */
  .addsvc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .addsvc .addbtn { width: 100%; height: 40px; font-size: 13px; }
  /* 结算方式下拉不要被裁切 */
  .select, .input { width: 100%; min-width: 0; }
}


/* ---------- 商家搜索选择器 ---------- */
.msearch { display: flex; gap: 8px; align-items: center; }
.msearch .input { flex: 1; min-width: 0; }
.msearch .btn { flex: 0 0 auto; height: 42px; padding: 0 12px; white-space: nowrap; }

.sug-box { margin-top: 6px; }
.sug-box:empty { display: none; }
.sug-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: #fbfaf7; border: 1px solid #f0ece3; margin-bottom: 5px;
}
.sug-item:active { background: #f0f6f2; }
.sug-main { font-size: 13.5px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-sub { font-size: 11.5px; color: var(--ink-3); flex: 0 0 auto; }
.sug-empty { font-size: 12px; color: var(--ink-3); padding: 8px 2px; }


/* ---------- 内容方向：两列标签，填满宽度 ---------- */
.checkgrid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tagopt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 11px; border-radius: 11px; cursor: pointer;
  background: #fbfaf7; border: 1px solid #f0ece3;
  font-size: 13px; color: var(--ink-2); line-height: 1.3;
}
.tagopt input {
  width: 17px; height: 17px; flex: 0 0 17px; margin: 0;
  accent-color: #0d6b4f;
}
.tagopt:has(input:checked) {
  background: #eef8f2; border-color: #bfe3d2; color: #0a5a42; font-weight: 600;
}
.tagopt span { flex: 1; min-width: 0; }

@media (max-width: 420px) {
  .checkgrid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tagopt { padding: 9px 9px; font-size: 12.5px; }
}


/* ---------- 拍摄套餐 ---------- */
.pkg-row {
  background: #fbfaf7; border: 1px solid #f0ece3; border-radius: 12px;
  padding: 10px 11px; margin-bottom: 8px;
}
.pkg-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pkg-line .input { flex: 1; height: 38px; font-size: 13.5px; }
.pkg-del {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid #f0d3cf; background: #fff7f6; color: #a83a2f;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.pkg-row .textarea { min-height: 56px; font-size: 13px; line-height: 1.7; }

/* 订单详情里的套餐展示 */
.pkgview { border-left: 3px solid var(--brand); background: #f6faf8; border-radius: 0 12px 12px 0; padding: 10px 13px; margin-bottom: 8px; }
.pkgview-name { font-size: 13.5px; font-weight: 700; color: #0a5a42; }
.pkgview-body { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.7; white-space: pre-wrap; }


/* ---------- 套餐输入框加大 ---------- */
.pkg-row { padding: 12px 12px 11px; }
.pkg-line .input { height: 44px; font-size: 14.5px; }
.pkg-row .textarea {
  min-height: 104px; font-size: 14px; line-height: 1.8;
  padding: 10px 12px;
}
@media (max-width: 760px) {
  .pkg-row .textarea { min-height: 120px; }
}


/* ---------- 建单页分区快速跳转 ---------- */
.secnav {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 10px; padding-bottom: 2px;
}
.secnav::-webkit-scrollbar { display: none; }
.secnav a {
  flex: 0 0 auto; cursor: pointer; text-decoration: none;
  font-size: 12.5px; font-weight: 650; color: #0a5a42;
  background: #f2f9f5; border: 1px solid #d9ece3;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.secnav a:active { background: #e3f3ea; }

/* 滚动定位时留出顶栏高度 */
#sec1, #sec2, #sec3, #sec4, #sec5 { scroll-margin-top: 120px; }


/* ---------- 执行清单里的阶段可点 ---------- */
.stage-h.clickable { cursor: pointer; }
.stage-h.clickable:active { background: #f0f7f3; }
.stage-h.clickable::after {
  content: "去处理 ›"; margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--brand); opacity: .75;
}


/* ---------- 财务自检结果 ---------- */
.audit-row {
  border-radius: 12px; padding: 12px 13px; margin-bottom: 9px;
  background: #fbfaf7; border: 1px solid #f0ece3; border-left: 4px solid #d8d4c9;
}
.audit-row.error { border-left-color: #c0392b; background: #fdf6f5; }
.audit-row.warn { border-left-color: #d99a1b; background: #fffbf1; }
.audit-row.info { border-left-color: #4b7fbf; background: #f6f9fd; }
.audit-t { font-size: 13.5px; font-weight: 700; }
.audit-d { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.7; }
.audit-f { font-size: 12px; color: var(--ink-3); margin-top: 5px; }


/* ---------- 未收款明细：设计与可读性 ---------- */
.urow {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; text-decoration: none; color: var(--ink);
  border-top: 1px solid #f2efe8;
  position: relative;
}
.urow:first-of-type { border-top: 0; }
.urow.alt { background: #fbfaf7; }
.urow:active { background: #f4f9f6; }
.urow::before {
  content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: #e0705f;
}
.urow-l { flex: 1; min-width: 0; }
.urow-name {
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.urow-meta {
  font-size: 11.5px; color: var(--ink-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.urow-bar {
  height: 4px; border-radius: 999px; background: #f0ece3; margin-top: 8px;
  max-width: 190px; overflow: hidden;
}
.urow-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #16a37a, #0d6b4f); }
.urow-r { flex: 0 0 auto; text-align: right; }
.urow-amt {
  font-size: 16px; font-weight: 780; color: #c0392b;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.urow-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }


/* ---------- 按模块派单 ---------- */
.modlist { display: flex; flex-direction: column; gap: 8px; }
.modrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid #f0ece3; border-radius: 12px;
  padding: 10px 12px;
}
.modrow-l { min-width: 0; flex: 1; }
.modrow-name {
  font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px;
}
.modrow-cnt {
  font-size: 11px; font-weight: 650; color: var(--ink-3);
  background: #f4f2ec; padding: 1px 7px; border-radius: 999px;
}
.modrow-cnt.ok { background: #e6f6ee; color: #0a5a42; }
.modrow-who { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
@media (max-width: 760px) {
  .modrow { align-items: flex-start; }
  .modrow .btn { height: 30px; font-size: 12px; padding: 0 10px; }
}


/* =====================================================================
   微信阅读感：手机端字号与行距（桌面端不变，保持信息密度）
   ===================================================================== */
@media (max-width: 760px) {
  html, body { font-size: 17px; line-height: 1.62; }
  body { -webkit-text-size-adjust: 100%; }

  /* 标题层级：标题 > 正文 > 辅助 */
  .page-title { font-size: 22px !important; font-weight: 780; letter-spacing: -.03em; }
  .page-sub, .appbar-title .page-sub { font-size: 13px !important; line-height: 1.5; }
  .card-h h3 { font-size: 19px !important; font-weight: 760; letter-spacing: -.02em; }
  .sec-h h2, .sec-h { font-size: 19px !important; }
  .stage-h { font-size: 15.5px !important; font-weight: 700; }

  /* 正文与列表 */
  .crow-name, .orow-name, .urow-name, .modrow-name { font-size: 17px !important; }
  .crow-sub, .orow-meta, .urow-meta, .modrow-who { font-size: 13.5px !important; line-height: 1.55; }
  .tag { font-size: 13px !important; line-height: 1.5; }
  .help { font-size: 13px !important; line-height: 1.65; }
  .chip { font-size: 13px !important; }
  .btn { font-size: 15px !important; }
  .btn.sm { font-size: 13.5px !important; }

  /* 表单：16px 以下 iOS 会自动放大页面，统一提到 16 */
  .input, .select, .textarea, select, input, textarea { font-size: 16px !important; }
  .label { font-size: 14px !important; font-weight: 600; }

  /* 表格 */
  th { font-size: 12.5px !important; }
  td { font-size: 15px !important; line-height: 1.55; }
  td::before { font-size: 12.5px !important; }

  /* 数字类保持等宽，金额更醒目 */
  .num, .crow-amt, .urow-amt, .orow-amt { font-variant-numeric: tabular-nums; }
  .crow-amt, .urow-amt { font-size: 17px !important; }
}


/* ---------- 标签删除 ---------- */
.ops-chip.snip { display: inline-flex; align-items: center; gap: 2px; padding-right: 4px; }
.snip-x {
  display: inline-grid; place-items: center;
  width: 17px; height: 17px; border-radius: 50%;
  font-size: 12px; font-weight: 700; line-height: 1;
  color: #b0a89a; background: #f2efe8; cursor: pointer;
  font-style: normal;
}
.snip-x:active { background: #f0d3cf; color: #a83a2f; }


/* ---------- 建单页：汇总/提交放到最下面，填完顺手提交 ---------- */
.neworder-grid { grid-template-columns: 1fr !important; }
.neworder-grid > div > .card[style*="sticky"] { position: static !important; top: auto !important; }

/* 提交区做成醒目的收尾 */
#preview { font-size: 13.5px; line-height: 1.8; }


/* ---------- 建单页：单列但收窄，别拉太宽 ---------- */
@media (min-width: 761px) {
  .neworder-grid { max-width: 760px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .neworder-grid { max-width: 100%; }
}


/* ---------- 建单页分区导航居中 ---------- */
.secnav { justify-content: center; }
@media (max-width: 760px) {
  .secnav { justify-content: flex-start; }   /* 手机上太窄，左对齐更稳 */
}


/* =====================================================================
   手机版安全网：防挤压、防撑破、防横滚
   ===================================================================== */
@media (max-width: 760px) {
  /* 行内容可换行，不再硬挤 */
  .line-row { flex-wrap: wrap; gap: 6px; }

  /* 长单号 / 链接 / 标签允许换行 */
  .tag, .chip, .help, .crow-sub, .urow-meta, .modrow-who {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  /* 卡片和弹窗不横向溢出 */
  .card, .modal-b, .stage, .task, .snip-row { overflow-wrap: anywhere; }
  .modal-b { overflow-x: hidden; }

  /* 标签页可横滑，不换行挤成两排 */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs > button { flex: 0 0 auto; }

  /* 账户卡两列 */
  .acc-grid { grid-template-columns: 1fr 1fr !important; }

  /* 弹窗底部按钮铺满，好点 */
  .modal-f { flex-wrap: wrap; }
  .modal-f .btn { flex: 1 1 auto; }
}


/* ---------- 必填项颜色提醒 ---------- */
.req { color: var(--danger); font-weight: 700; margin-left: 2px; }

/* 必填字段给一层很淡的暖底，扫一眼就知道哪些要填 */
.field:has(> .label .req) > .input,
.field:has(> .label .req) > .select,
.field:has(> .label .req) > .textarea {
  background: #fffdf6;
  border-color: #e8dfc9;
}
.field:has(> .label .req) > .input:focus,
.field:has(> .label .req) > .select:focus,
.field:has(> .label .req) > .textarea:focus {
  background: #fff;
}

/* 没填就点了提交 / 点了新商家：红框提示 */
.input.need, .select.need, .textarea.need {
  border-color: #e0574a !important;
  background: #fff7f5 !important;
  box-shadow: 0 0 0 3px rgba(224, 87, 74, .13);
  animation: needPulse .5s ease;
}
@keyframes needPulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 87, 74, .3); }
  100% { box-shadow: 0 0 0 3px rgba(224, 87, 74, .13); }
}


/* ---------- 订单只读模式 ---------- */
.viewonly .task-check,
.viewonly .taskbox,
.viewonly [data-act="taskToggle"],
.viewonly [data-act="taskAdd"],
.viewonly [data-act="talentAdd"],
.viewonly [data-act="talentDel"] {
  pointer-events: none;
  opacity: .55;
}


/* ---------- 订单正文收窄，卡片别一拉到底 ---------- */
.order-body { max-width: 880px; margin: 0 auto; }
@media (max-width: 1100px) { .order-body { max-width: 100%; } }


/* ---------- Brief 折叠 ---------- */
.brief-text.clamp {
  max-height: 62px;
  overflow: hidden;
  position: relative;
}
.brief-text.clamp::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: linear-gradient(180deg, rgba(251,250,247,0), #fbfaf7 80%);
}


/* Brief 再紧凑一点 */
.brief-text.clamp { max-height: 46px; }
.brief-text { line-height: 1.7 !important; }


/* Brief 服务切换标签 */
.brief-tab {
  border: 0; background: none; padding: 8px 14px; font-size: 14px; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer;
}
.brief-tab.on { color: var(--brand); border-bottom-color: var(--brand); }

/* 服务卡片按类型区分（左侧色条，一眼分清） */
.scard { border-left: 4px solid var(--line); }
.scard-video, .scard-video_ops { border-left-color: #0d6b4f; }
.scard-live { border-left-color: #c0392b; }
.scard-shoot { border-left-color: #2f6f9f; }
.scard-edit { border-left-color: #8a6d3b; }


/* ③ 服务分段控件：一眼看出是标签页 */
.sec3-tabs {
  display: flex; gap: 4px; background: #f3f1ea; border: 1px solid #e7e3d9;
  border-radius: 12px; padding: 4px; margin-bottom: 14px; overflow-x: auto;
}
.sec3-tabs .brief-tab {
  flex: 1 0 auto; border: 0; border-radius: 9px; background: transparent;
  padding: 9px 16px; font-size: 13.5px; font-weight: 650; color: var(--ink2);
  white-space: nowrap; cursor: pointer;
}
.sec3-tabs .brief-tab.on {
  background: #fff; color: var(--brand);
  box-shadow: 0 1px 3px rgba(20, 32, 26, .12);
  border-bottom: 0;
}
@media (max-width: 760px) {
  .sec3-tabs .brief-tab { padding: 8px 12px; font-size: 13px; }
}


/* ---- 订单列表收窄 + 进度看得清 ---- */
@media (min-width: 900px) {
  .olist { max-width: 1040px; margin-left: 0; }
}

/* 进度条：加高、加深轨道，一眼看出是进度不是分割线 */
.progress {
  height: 10px;
  border-radius: 999px;
  background: #e9e4d8;
  box-shadow: inset 0 1px 2px rgba(20, 32, 26, .06);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #17a67c, #0d6b4f);
  transition: width .3s;
}
.orow { padding: 18px 18px 16px; }
.orow + .orow { border-top: 1px solid #f1eee7; border-bottom: 0; }


/* ---- 订单卡独立成块，别靠进度条当分割线 ---- */
.olist { max-width: 1040px; margin-left: 0; }
.olist .orow {
  background: #fff;
  border: 1px solid #ece8de;
  border-radius: 14px;
  margin-bottom: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(20, 32, 26, .03);
}
.olist .orow + .orow { border-top: 1px solid #ece8de; }
.olist .orow:last-child { margin-bottom: 0; }
.olist .orow:active { background: #fbfaf7; }

/* 进度条再稳一点，别像分隔线 */
.olist .progress { height: 8px; background: #e8e2d5; }
.orow .progress { margin: 10px 0 8px; }


/* ---- 订单行：不嵌套圆角，改成悬停高亮 ---- */
.olist { max-width: 1040px; }
.olist .orow {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 18px 20px;
  transition: background .15s;
}
.olist .orow + .orow { border-top: 1px solid #f2eee6; }
.olist .orow:hover { background: #fbfaf7; }
.olist .orow:active { background: #f7f5ef; }
.olist .orow:last-child { margin-bottom: 0; }


/* 商家名右侧的进度：紧凑一条 */
.orow-top { display: flex; align-items: center; gap: 12px; }
.orow-prog { flex: 0 0 auto; }
.orow-prog .progress { height: 6px; background: #e9e4d8; width: 120px; }
.orow-prog .orow-pct { font-size: 11.5px; color: var(--muted); min-width: 32px; text-align: right; }
.orow-amt { margin-left: 12px; }


/* 金额定宽，进度条才能对齐 */
.orow-amt { min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.orow-prog { margin-left: auto; }


/* ---- 内容区收窄：别铺满整屏 ---- */
.main { max-width: 1280px; }
.view { max-width: 1120px; }
.appbar { max-width: 1120px; }
@media (max-width: 1300px) {
  .main, .view, .appbar { max-width: 100%; }
}






/* ---- 订单行状态色：逾期 / 已交付未收 / 亏损 ---- */
.olist .orow.orow-late { background: #fff6f5 !important; box-shadow: inset 4px 0 0 #b3392f; }
.olist .orow.orow-unpaid { background: #fffdf5 !important; box-shadow: inset 4px 0 0 #b4691b; }
.olist .orow.orow-loss { background: #fffaf9 !important; box-shadow: inset 4px 0 0 #b3392f; }
.olist .orow.orow-late:hover { background: #ffeceb !important; }
.olist .orow.orow-unpaid:hover { background: #fff9ea !important; }


/* ---- 手机：订单操作按钮全部显示，不横着溢出 ---- */
@media (max-width: 760px) {
  .appbar-actions {
    flex-wrap: wrap;
    flex: 1 1 auto;
    padding: 0 12px 8px;
    gap: 6px;
  }
  .appbar-actions .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    height: 34px;
    font-size: 13px;
  }
  .appbar-actions .btn.chip { flex: 0 0 100%; }
  .appbar-links { display: none; }            /* 顶部入口收进「更多」 */
  .appbar-top { padding: 8px 12px 4px; }
  .page-title { font-size: 18px; line-height: 1.3; }
  .page-sub { font-size: 12.5px; }
}


/* ---- 手机：审批/财务 的筛选与操作区适配 ---- */
@media (max-width: 760px) {
  /* 审批/财务 tab 手机可横滑，不挤成两行 */
  .seg {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
  }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: 0 0 auto; white-space: nowrap; }

  /* 审批：业务员卡片头部按钮换行铺满 */
  .req-row { flex-wrap: wrap; gap: 8px; }
  .req-row .btn { flex: 0 0 auto; }
  .req-t { font-size: 14px; }
  .req-amt { font-size: 16px; }

  /* 报销台账的账户卡：一行一个 */
  .card.card-pad[style*="min-width:200px"],
  .card.card-pad[style*="min-width:220px"] { min-width: 100% !important; }

  /* 审批里「整批付款」按钮占满一行更好点 */
  .card-pad > div[style*="flex-wrap:wrap"] .btn { min-height: 34px; }
}


/* ---- 销售订单：紧凑表格，桌面不横向滚动 ---- */
.sale-table-wrap { overflow-x: hidden; padding: 0 4px; }
.sale-table { table-layout: fixed; width: 100%; }
.sale-table th, .sale-table td { padding: 9px 7px; font-size: 12.6px; vertical-align: top; word-break: break-word; }
.sale-table th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.sale-table td .tag { font-size: 11.4px; margin-top: 2px; }
.sale-table .cell-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.sale-table .nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sale-table th:nth-child(1), .sale-table td:nth-child(1) { width: 12%; }
.sale-table th:nth-child(2), .sale-table td:nth-child(2) { width: 10%; }
.sale-table th:nth-child(3), .sale-table td:nth-child(3) { width: 10%; }
.sale-table th:nth-child(4), .sale-table td:nth-child(4) { width: 22%; }
.sale-table th:nth-child(5), .sale-table td:nth-child(5) { width: 10%; }
.sale-table th:nth-child(6), .sale-table td:nth-child(6) { width: 10%; }
.sale-table th:nth-child(7), .sale-table td:nth-child(7) { width: 9%; }
.sale-table th:nth-child(8), .sale-table td:nth-child(8),
.sale-table th:nth-child(9), .sale-table td:nth-child(9),
.sale-table th:nth-child(10), .sale-table td:nth-child(10),
.sale-table th:nth-child(11), .sale-table td:nth-child(11) { width: 8.5%; text-align: right; }
.sale-cards { display: none; }
@media (max-width: 760px) {
  .sale-table-wrap { display: none; }
  .sale-cards { display: block; }
}
.sale-table th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.sale-table td .tag { font-size: 11.5px; margin-top: 2px; }
.sale-table th:nth-child(1), .sale-table td:nth-child(1) { width: 13%; }
.sale-table th:nth-child(2), .sale-table td:nth-child(2) { width: 11%; }
.sale-table th:nth-child(3), .sale-table td:nth-child(3) { width: 11%; }
.sale-table th:nth-child(4), .sale-table td:nth-child(4) { width: 13%; }
.sale-table th:nth-child(5), .sale-table td:nth-child(5) { width: 14%; }
.sale-table th:nth-child(6), .sale-table td:nth-child(6) { width: 6%; }
.sale-table th:nth-child(7), .sale-table td:nth-child(7),
.sale-table th:nth-child(8), .sale-table td:nth-child(8),
.sale-table th:nth-child(9), .sale-table td:nth-child(9),
.sale-table th:nth-child(10), .sale-table td:nth-child(10) { width: 9%; text-align: right; }

/* 手机上用卡片，不用表格 */
.sale-cards { display: none; }
@media (max-width: 760px) {
  .sale-table-wrap { display: none; }
  .sale-cards { display: block; }
}

/* 建单弹窗：宽屏一屏放下 */
.modal.wide { max-width: 880px; width: calc(100vw - 48px); }
.modal.wide .modal-b { padding: 14px 20px; max-height: calc(100vh - 150px); }
.modal.wide .field { margin-bottom: 10px; }
.modal.wide .label { margin-bottom: 4px; }
.modal.wide .input, .modal.wide .select { padding: 8px 10px; }
.modal.wide .row { gap: 10px; }
.modal.wide .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ---- 订单行（手机清晰版） ---- */
.orow { display: block; padding: 14px 16px; }
.orow-name { font-size: 16px; font-weight: 650; line-height: 1.35; word-break: break-word; }
.orow-name .chip { font-size: 11.5px; vertical-align: middle; }
.orow-meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.orow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.orow-prog { display: flex; align-items: center; gap: 8px; }
.orow-amt { font-size: 17px; font-weight: 650; white-space: nowrap; }
.orow-foot { margin-top: 8px; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.orow-foot b { font-weight: 600; }

.orow-no { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }

.orow-prog { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.orow-pct { font-size: 11.5px; color: var(--muted); }
.orow-foot { margin-top: 8px; display: flex; gap: 14px; align-items: baseline; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.orow-amt { font-size: 17px; font-weight: 650; color: var(--ink); margin-right: 4px; }

/* 整行当进度条：左侧填充到 progress% */
.orow { position: relative; overflow: hidden; }
.orow::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--p, 0%);
  background: rgba(26, 138, 103, .09);
  pointer-events: none;
  transition: width .3s ease;
}
.orow > * { position: relative; z-index: 1; }
.orow-pct { font-size: 12.5px; font-weight: 600; color: var(--brand-dark, #14785a); }

/* 订单卡片之间留白，区分更清楚 */
.olist { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 14px; }
.orow {
  margin: 0;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ece9e2;
  box-shadow: 0 1px 3px rgba(24, 30, 27, .05);
}
.orow::before { border-radius: 0; }
.orow-late { border-color: #e7c9c9; }
.orow-loss { border-color: #e7d9c9; }

.input-err { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(200, 60, 60, .15) !important; }

/* 达人状态：蓝=已接单/已结算，紫=待审核 */
.chip.blue { background: #e8f0fb; color: #1f5fbf; }
.chip.purple { background: #f0ebfa; color: #6b3fa0; }
