:root {
  --bg: #f5f6f8;
  --ink: #1f2329;
  --muted: #8f959e;
  --line: #e5e6eb;
  --card: #ffffff;
  --accent: #1677ff;
  --accent-dark: #0e5fd8;
  --wx: #07c160;
  --ali: #1677ff;
  --danger: #f53f3f;
  --ok: #00b42a;
  --shadow: 0 8px 24px rgba(31, 35, 41, 0.06);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- 通用后台 ---- */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #eef3ff 0%, #f5f6f8 40%);
}
.box {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.box h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form input, .form textarea, .form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  max-width: 100%;
}
.form textarea { min-height: 90px; resize: vertical; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-danger { background: var(--danger); }
.btn-wx { background: var(--wx); }
.btn-ali { background: var(--ali); }
.err { color: var(--danger); }
.ok { color: var(--ok); }
.muted { color: var(--muted); font-size: 14px; }

.admin-body {
  margin: 0;
  background: #eef1f6;
  min-height: 100vh;
  overflow-x: hidden;
}
.admin-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f1c2e 0%, #162a45 55%, #1a3354 100%);
  border-right: 0;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  box-shadow: 4px 0 24px rgba(15, 28, 46, 0.12);
}
.admin-brand {
  display: grid;
  gap: 4px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.admin-brand strong {
  font-size: 18px;
  color: #fff;
  line-height: 1.3;
}
.admin-brand .muted {
  color: rgba(255, 255, 255, 0.55);
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.admin-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.admin-nav a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(22, 119, 255, 0.35);
}
.admin-nav a.admin-nav-ext {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}
.admin-nav a.admin-nav-ext:hover {
  color: rgba(255, 255, 255, 0.75);
}
.admin-nav a.admin-nav-logout {
  margin-top: auto;
  color: #ff9f9f;
}
.admin-nav a.admin-nav-logout:hover {
  background: rgba(255, 80, 80, 0.12);
  color: #ffb4b4;
}
.account-form {
  max-width: 420px;
}
.admin-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 20px 24px 40px;
  max-width: none;
}
.admin-main-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-main-head h1 {
  margin: 0;
  font-size: 22px;
  flex: 1;
  min-width: 0;
}
.admin-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
}
.admin-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.admin-overlay {
  display: none;
}
.admin-main-body { min-width: 0; }

/* 数据大屏 */
.dash { display: grid; gap: 16px; }
.dash-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #0f1c2e 0%, #1a3a5c 55%, #0d6efd 140%);
  color: #fff; border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 12px 30px rgba(15, 28, 46, 0.18);
}
.dash-kicker { font-size: 12px; opacity: .72; letter-spacing: .08em; text-transform: uppercase; }
.dash-title { margin: 6px 0 4px; font-size: 28px; font-weight: 700; }
.dash-sub { margin: 0; font-size: 13px; opacity: .78; }
.dash-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-tag {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
}
.dash-tag.on { background: rgba(46, 204, 113, .22); border-color: rgba(46, 204, 113, .45); }
.dash-tag.off { background: rgba(255,255,255,.08); opacity: .75; }

.dash-kpi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.dash-kpi-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.dash-kpi-card.accent {
  background: linear-gradient(160deg, #1677ff, #3aa0ff);
  color: #fff; border-color: transparent;
}
.dash-kpi-label { font-size: 13px; color: var(--muted); }
.dash-kpi-card.accent .dash-kpi-label { color: rgba(255,255,255,.82); }
.dash-kpi-value {
  margin-top: 8px; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; line-height: 1.15;
}
.dash-kpi-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
.dash-kpi-card.accent .dash-kpi-foot { color: rgba(255,255,255,.78); }

.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.dash-panel h2 { margin: 0 0 16px; }
.dash-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.dash-panel-head h2 { margin: 0; }

.dash-bars {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  min-height: 180px; padding-top: 8px;
}
.dash-bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
}
.dash-bar {
  width: 100%; max-width: 42px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #4ea1ff, #1677ff);
  box-shadow: 0 6px 14px rgba(22, 119, 255, .22);
}
.dash-bar-val {
  font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.dash-bar-label { font-size: 12px; color: var(--ink); font-weight: 600; }
.dash-bar-count { font-size: 11px; color: var(--muted); }

.dash-paylist { display: grid; gap: 16px; }
.dash-pay-head {
  display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px;
}
.dash-pay-track {
  height: 10px; border-radius: 999px; background: #eef2f7; overflow: hidden;
}
.dash-pay-track i {
  display: block; height: 100%; border-radius: inherit;
}
.dash-pay-track i.pt-wxpay { background: #07c160; }
.dash-pay-track i.pt-alipay { background: #1677ff; }
.dash-pay-track i.pt-qrcode { background: #6b7280; }
.dash-pay-foot { margin-top: 4px; font-size: 12px; color: var(--muted); }

.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

@media (max-width: 980px) {
  .dash-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dash-kpi { grid-template-columns: 1fr; }
  .dash-title { font-size: 22px; }
  .dash-kpi-value { font-size: 24px; }
}

/* 兼容旧类名，避免残留引用撑破布局 */
.admin-wrap { max-width: none; margin: 0; padding: 0; }
.admin-top { display: none; }

.admin-subnav {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px;
}
.admin-subnav a {
  font-size: 13px; padding: 6px 10px; border-radius: 8px;
  background: #eef2f7; color: var(--ink); border: 1px solid transparent;
  text-decoration: none;
}
.admin-subnav a:hover { border-color: var(--line); }
.admin-subnav a.active,
.settings-tabs a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.check-row {
  display: flex !important; flex-direction: row !important; align-items: center; gap: 8px;
}
.check-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: end;
}
@media (max-width: 720px) {
  .check-grid { grid-template-columns: 1fr; }
}

/* 支付方式展示卡片 */
.pay-show-list { display: grid; gap: 12px; }
.pay-show-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
}
.pay-show-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.pay-show-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pay-show-brand strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}
.pay-show-brand .muted {
  display: block;
  font-size: 12px;
}
.pay-show-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-show-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.pay-show-name {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}
.pay-show-name input {
  font-size: 15px;
  color: var(--ink);
}

.pay-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.pay-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.pay-switch i {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background .2s ease;
  flex-shrink: 0;
}
.pay-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: transform .2s ease;
}
.pay-switch input:checked + i {
  background: #34c759;
}
.pay-switch input:checked + i::after {
  transform: translateX(20px);
}
.pay-switch em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  min-width: 42px;
}
.pay-switch .pay-switch-on { display: none; color: #1a7f37; font-weight: 600; }
.pay-switch .pay-switch-off { display: inline; }
.pay-switch input:checked ~ .pay-switch-on { display: inline; }
.pay-switch input:checked ~ .pay-switch-off { display: none; }

.channel-enable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.channel-enable strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.channel-enable .muted {
  display: block;
  font-size: 12px;
}

.admin-toast-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .14);
  animation: adminToastIn .22s ease;
}
.admin-toast-wrap.hide {
  animation: adminToastOut .26s ease forwards;
}
.admin-toast {
  min-width: 220px;
  max-width: min(88vw, 360px);
  padding: 18px 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 28, 46, .22);
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}
.admin-toast.ok { color: #1a7f37; }
.admin-toast.err { color: #c0392b; }
@keyframes adminToastIn {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes adminToastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.sticky-save {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 12px; background: rgba(255,255,255,.92); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
@media (max-width: 860px) {
  .admin-menu-btn {
    display: inline-flex;
  }
  .admin-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  body.admin-nav-open .admin-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 130;
    width: min(78vw, 260px);
    height: 100%;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 8px 0 28px rgba(15, 28, 46, .16);
    padding: 18px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.admin-nav-open .admin-sidebar {
    transform: translateX(0);
  }
  .admin-brand {
    padding: 4px 8px 8px;
    text-align: left;
  }
  .admin-brand strong {
    font-size: 16px;
    display: block;
    overflow: visible;
  }
  .admin-brand .muted {
    display: block;
    font-size: 12px;
  }
  .admin-nav a {
    padding: 11px 14px;
    font-size: 15px;
    text-align: left;
  }
  .admin-nav a.admin-nav-logout,
  .admin-nav a.admin-nav-ext {
    margin-top: 8px;
    font-size: 13px;
  }
  .admin-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 10px calc(24px + env(safe-area-inset-bottom));
  }
  .admin-main-head {
    margin-bottom: 10px;
  }
  .admin-main-head h1 {
    font-size: 17px;
  }
  .admin-main-body {
    width: 100%;
    max-width: 100%;
  }
  body.admin-nav-open {
    overflow: hidden;
  }

  .card {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
  }
  .card h2 { font-size: 15px; margin-bottom: 10px; }
  .admin-subnav {
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .admin-subnav::-webkit-scrollbar { display: none; }
  .admin-subnav a {
    font-size: 12px;
    padding: 7px 10px;
    flex-shrink: 0;
  }
  .sticky-save {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 10px;
    gap: 8px;
  }
  .sticky-save .btn {
    width: 100%;
  }

  /* 手机端表格改卡片，无需横向滑动 */
  .table-cards thead { display: none; }
  .table-cards tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff;
  }
  .table-cards tbody tr:last-child { margin-bottom: 0; }
  .table-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border: 0;
    white-space: normal;
    word-break: break-word;
    text-align: right;
  }
  .table-cards tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    text-align: left;
    min-width: 4.5em;
  }
  .table-cards tbody td.actions-cell {
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    margin-top: 4px;
  }
  .table-cards tbody td.actions-cell::before { display: none; }
  .table-cards tbody td > .badge { margin-left: 4px; }

  .dash { gap: 10px; }
  .dash-hero {
    padding: 14px;
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .dash-title { font-size: 18px; }
  .dash-sub { font-size: 12px; }
  .dash-hero-tags { gap: 6px; }
  .dash-tag { font-size: 11px; padding: 4px 8px; }
  .dash-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .dash-kpi-card { padding: 10px 12px; }
  .dash-kpi-label { font-size: 12px; }
  .dash-kpi-value { font-size: 18px; margin-top: 4px; }
  .dash-kpi-foot { font-size: 11px; margin-top: 4px; }
  .dash-grid { grid-template-columns: 1fr; gap: 10px; }
  .dash-bars { min-height: 120px; gap: 3px; padding-top: 4px; }
  .dash-bar { max-width: 100%; }
  .dash-bar-val { font-size: 9px; }
  .dash-bar-label { font-size: 11px; }
  .dash-bar-count { font-size: 10px; }
  .dash-panel-head { margin-bottom: 8px; }
  .dash-panel-head .btn { padding: 8px 12px; font-size: 13px; }

  .pay-show-top,
  .channel-enable {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pay-switch { justify-content: space-between; width: 100%; }
  .pay-show-item { padding: 12px; }
  .channel-enable { gap: 10px; }
  .check-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .actions { gap: 6px; }
  .actions .btn { flex: 1; min-width: 0; padding: 9px 10px; font-size: 13px; }
  .btn { padding: 10px 14px; font-size: 15px; }
  .form input, .form textarea, .form select {
    font-size: 16px;
  }
  .account-form { max-width: none; }
}
.card h2 { margin: 0 0 14px; font-size: 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #eee;
}
.badge-ok { background: #e8ffea; color: var(--ok); }
.badge-wait { background: #fff7e8; color: #d25f00; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.pay-waiting { text-align: center; padding: 40px 20px; }
.qr {
  width: 220px; height: 220px; margin: 18px auto; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  display: grid; place-items: center; padding: 12px;
}
.qr img { width: 100%; height: 100%; object-fit: contain; }
.total { font-size: 22px; font-weight: 700; color: #ff3b30; font-family: var(--num); }

/* ---- iOS 收银台 ---- */
.ios-body {
  background: #f2f2f7;
  min-height: 100vh;
  color: #000;
  font-family: var(--font);
}
.ios-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px calc(34px + env(safe-area-inset-bottom));
}
.ios-nav {
  text-align: center;
  padding: 10px 0 8px;
}
.ios-nav h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #000;
}
.ios-nav-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8e8e93;
}

.ios-section-label {
  margin: 18px 4px 6px;
  font-size: 13px;
  color: #6d6d72;
  text-transform: none;
}

.ios-group {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.ios-row,
.ios-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  min-height: 44px;
  background: #fff;
  position: relative;
}
.ios-row + .ios-row::before,
.ios-cell + .ios-cell::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 0.5px;
  background: rgba(60, 60, 67, 0.29);
}
.ios-row .k {
  color: #000;
  font-size: 17px;
  flex-shrink: 0;
}
.ios-row .v {
  color: #8e8e93;
  font-size: 17px;
  text-align: right;
  word-break: break-all;
}
.ios-row .v.mono {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.amount-group { margin-top: 8px; }
.amount-cell {
  display: block;
  padding: 16px;
}
.amount-caption {
  font-size: 13px;
  color: #8e8e93;
  margin-bottom: 8px;
}
.amount-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.amount-row .yen {
  font-size: 34px;
  font-weight: 600;
  color: #000;
  font-family: var(--num);
  line-height: 1;
}
.amount-row input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 40px;
  font-weight: 600;
  font-family: var(--num);
  color: #000;
  padding: 0;
  caret-color: #007aff;
  letter-spacing: -0.03em;
}
.amount-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: #8e8e93;
  line-height: 1.4;
}
.quick-cell {
  display: block;
  padding: 12px 16px 14px;
}
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ios-chip {
  border: 0;
  background: #f2f2f7;
  color: #000;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ios-chip.active {
  background: #007aff;
  color: #fff;
}
.ios-chip:active { opacity: 0.75; }

.pay-row {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pay-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-icon img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}
.pay-label {
  flex: 1;
  font-size: 17px;
  color: #000;
}
.ios-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #c7c7cc;
  position: relative;
  flex-shrink: 0;
}
.pay-row.active .ios-check {
  border-color: #007aff;
  background: #007aff;
}
.pay-row.active .ios-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ios-actions {
  margin-top: 28px;
}
.ios-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  min-height: 50px;
  background: #007aff;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ios-btn:active { opacity: 0.82; }

.warn-row {
  color: #ff3b30;
  font-size: 15px;
  justify-content: center;
  text-align: center;
}

.ios-footer {
  margin: 18px 8px 0;
  text-align: center;
  font-size: 13px;
  color: #8e8e93;
}

/* 兼容旧等待页 */
.mall { max-width: 720px; margin: 0 auto; padding: 28px 16px; }
.cashier-body, .h5-pay { background: #f2f2f7; }
.pay-waiting { text-align: center; }

.pay-page .pay-summary { text-align: center; padding: 24px 16px; }
.pay-amount {
  font-size: 40px;
  font-weight: 600;
  font-family: var(--num);
  color: #000;
  letter-spacing: -0.03em;
}
.pay-meta {
  margin-top: 8px;
  font-size: 14px;
  color: #8e8e93;
}
.pay-meta.mono { font-size: 13px; font-variant-numeric: tabular-nums; }

.qr-panel { text-align: center; padding: 20px 16px 24px; }
.qr-tip { margin: 0 0 16px; font-size: 15px; color: #000; }
.qr-box {
  width: 240px;
  height: 240px;
  margin: 0 auto;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(60,60,67,0.12);
  border-radius: 12px;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-wait { margin: 16px 0 0; font-size: 13px; color: #8e8e93; }
.ios-footer a { color: #007aff; text-decoration: none; }

/* 点击支付后的订单详情弹层 */
body.sheet-open { overflow: hidden; }
.pay-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.pay-sheet[hidden] { display: none !important; }
.pay-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.pay-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.pay-sheet-status {
  margin: 0;
  padding: 18px 16px 14px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
}
.pay-sheet-rows {
  padding: 4px 0;
}
.pay-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 15px;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
}
.pay-sheet-row:last-child { border-bottom: 0; }
.pay-sheet-row span {
  color: #000;
  flex-shrink: 0;
}
.pay-sheet-row strong {
  font-weight: 400;
  color: #8e8e93;
  text-align: right;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
.pay-sheet-err {
  margin: 0;
  padding: 12px 16px 16px;
  text-align: center;
  color: #ff3b30;
  font-size: 14px;
}
