* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --brand: #2f6bff;
  --brand-dark: #1f4fd0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a1d26;
  --muted: #6b7280;
  --line: #e6e9f0;
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  position: sticky; top: 0; z-index: 10;
}
.ver-badge {
  position: absolute; top: 2px; left: 8px;
  font-size: 10px; line-height: 1; letter-spacing: .02em;
  color: #a3a9b3; pointer-events: none; user-select: none;
}
.topbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-weight: 700; font-size: 17px; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.role-tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #eef2ff; color: var(--brand); white-space: nowrap; }
h2 { font-size: 16px; margin: 0 0 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); background: #fff; }
textarea { min-height: 72px; resize: vertical; }
.field { margin-bottom: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 18px;
  border: none; border-radius: 10px;
  background: var(--brand); color: #fff;
  cursor: pointer;
  width: 100%;
}
.btn:active { background: var(--brand-dark); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; font-weight: 500; border-radius: 8px; }
.btn-ghost { background: #eef2ff; color: var(--brand); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-ok { background: #dcfce7; color: var(--ok); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 28px 8px; }
.order {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.order-title { font-weight: 600; font-size: 15px; line-height: 1.45; word-break: break-all; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.pending { background: #fff7ed; color: #c2410c; }
.badge.accepted { background: #eef2ff; color: var(--brand); }
.badge.delivering { background: #ecfeff; color: #0e7490; }
.badge.picked { background: #f5f3ff; color: #6d28d9; }
.badge.timeout { background: #f3f4f6; color: #6b7280; }
.badge.done { background: #f0fdf4; color: var(--ok); }
.badge.cancelled { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.meta { font-size: 13px; color: var(--muted); line-height: 1.9; }
.meta b { color: var(--text); font-weight: 500; }
.order-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.stat .num { font-size: 22px; font-weight: 700; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.tab {
  font: inherit; font-size: 13px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #1a1d26; color: #fff; font-size: 14px; padding: 11px 18px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s;
  z-index: 99; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; }
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* 账单样式 */
.bill-day { font-size: 12px; color: var(--muted); margin: 16px 2px 8px; font-weight: 600; letter-spacing: .3px; }
.bill-day:first-child { margin-top: 4px; }
.bill-sum { font-size: 13px; color: var(--muted); background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.8; }
.bill-sum b { color: var(--brand); font-weight: 600; }
