/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ========== App Layout ========== */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f7fa;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ========== Header ========== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  display: flex; align-items: center;
  padding: 12px 16px; height: 52px;
  border-bottom: 1px solid #eef0f3;
}
.header-back { width: 36px; height: 36px; display: none; align-items: center; justify-content: center; cursor: pointer; color: #333; flex-shrink: 0; }
.header-back.visible { display: flex; }
.header-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-action { width: 36px; flex-shrink: 0; }

/* ========== Main Content ========== */
.main-content { flex: 1; padding-bottom: 72px; }
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ========== Tab Bar ========== */
.tab-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 64px;
  background: #fff; border-top: 1px solid #eef0f3;
  display: flex; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-bar.hidden { display: none; }
.tab-bar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #999; font-size: 11px; cursor: pointer;
  transition: color 0.2s; -webkit-tap-highlight-color: transparent;
}
.tab-bar-item svg { width: 24px; height: 24px; }
.tab-bar-item.active { color: #1677FF; }
.tab-bar-item.active svg path, .tab-bar-item.active svg line,
.tab-bar-item.active svg rect, .tab-bar-item.active svg circle { stroke: #1677FF; }
.tab-bar-item.active svg[fill] { fill: #1677FF; }

/* ========== Hero ========== */
.hero {
  text-align: center; padding: 32px 24px 24px;
  background: linear-gradient(135deg, #1677FF 0%, #4096FF 100%);
  color: #fff; border-radius: 0 0 24px 24px;
}
.hero-icon { margin-bottom: 12px; }
.hero-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.hero-desc { font-size: 14px; opacity: 0.85; }

/* ========== Quick Actions ========== */
.quick-actions {
  display: flex; gap: 12px;
  padding: 20px 16px 8px;
  margin-top: -20px;
  position: relative; z-index: 1;
}
.quick-btn {
  flex: 1; background: #fff;
  border-radius: 14px; padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  cursor: pointer; transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
  font-size: 13px; font-weight: 500; color: #333;
}
.quick-btn:active { transform: scale(0.96); }
.quick-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.upload-icon { background: #e8f4ff; }
.order-icon { background: #f0fff4; }
.camera-icon { background: #fff3e8; }

/* ========== Section Card ========== */
.section-card {
  margin: 16px; background: #fff;
  border-radius: 14px; padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.section-header h3 { font-size: 16px; font-weight: 600; color: #1a1a2e; }
.section-count { font-size: 13px; color: #999; }

/* ========== Plate List ========== */
.plate-list { display: flex; flex-direction: column; gap: 10px; }
.plate-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: #f9faff;
  border-radius: 12px; cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.plate-item:active { background: #e8f4ff; }
.plate-thumb {
  width: 48px; height: 48px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0; background: #f0f0f0;
}
.plate-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plate-info { flex: 1; min-width: 0; }
.plate-name { font-size: 14px; font-weight: 600; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.plate-time { font-size: 11px; color: #999; }
.plate-channels { display: flex; gap: 3px; }
.plate-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; transition: background 0.2s;
}
.btn-icon:active { background: #f0f0f0; }

/* Mini channel badges */
.mini-ch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px;
  font-size: 9px; font-weight: 700; color: #fff;
}
.wechat-bg { background: #07c160; }
.alipay-bg { background: #1677FF; }
.union-bg { background: #e6212a; }

/* ========== Upload Page ========== */
.page-upload { padding: 16px; }
.upload-card {
  background: #fff; border-radius: 16px;
  padding: 20px; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.upload-area {
  border: 2px dashed #d0d7e2;
  border-radius: 14px;
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.2s;
  overflow: hidden; position: relative;
}
.upload-area:active { border-color: #1677FF; background: rgba(22,119,255,0.03); }
.upload-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px; text-align: center;
}
.upload-tip { font-size: 15px; font-weight: 500; color: #333; }
.upload-sub { font-size: 12px; color: #999; }
.upload-preview { width: 100%; position: relative; }
.preview-img { width: 100%; display: block; border-radius: 12px; min-height: 200px; object-fit: cover; }
.preview-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; font-size: 14px; color: #1677FF; font-weight: 500;
  border-radius: 12px;
}

/* Decode Result */
.decode-result, .decode-fail {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}
.result-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; margin-bottom: 14px;
}
.result-badge span { color: #1a1a2e; }
.fail-result .result-badge span { color: #ff4d4f; }
.fail-badge { color: #ff4d4f; }
.fail-tip { font-size: 13px; color: #999; margin-bottom: 14px; text-align: center; }

.result-content { margin-bottom: 16px; }
.result-content label {
  display: block; font-size: 12px; color: #999;
  margin-bottom: 4px; margin-top: 12px;
}
.result-content label:first-child { margin-top: 0; }

.form-input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #1677FF; }
.form-textarea {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid #e0e0e0; border-radius: 10px;
  font-size: 13px; outline: none; resize: vertical;
  font-family: 'SF Mono', monospace; color: #666;
  background: #f9f9f9;
}

/* Channel Tags */
.channel-tags { display: flex; gap: 8px; margin-top: 4px; }
.channel-tag {
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  background: #f0f0f0; color: #999;
  transition: all 0.2s;
}
.channel-tag.active.wechat { background: #e6f9ee; color: #07c160; }
.channel-tag.active.alipay { background: #e8f4ff; color: #1677FF; }
.channel-tag.active.union { background: #fff1f0; color: #e6212a; }

/* Upload Guide */
.upload-guide {
  margin-top: 16px; background: #fff;
  border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.upload-guide h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #1a1a2e; }
.guide-items { display: flex; flex-direction: column; gap: 8px; }
.guide-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #666;
}
.guide-icon { font-size: 16px; }

/* ========== Order Page ========== */
.page-order { padding: 16px; }
.order-card-main {
  background: #fff; border-radius: 16px;
  padding: 22px 20px; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.order-section { margin-bottom: 4px; }
.order-label { font-size: 13px; color: #999; margin-bottom: 10px; font-weight: 500; }
.order-divider { height: 1px; background: #f0f0f0; margin: 16px 0; }

/* Plate Selector */
.plate-selector { min-height: 60px; }
.plate-selector-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px; border: 2px dashed #e0e0e0; border-radius: 12px;
  cursor: pointer; color: #999; font-size: 13px;
  transition: border-color 0.2s;
}
.plate-selector-empty:active { border-color: #1677FF; }
.plate-options { display: flex; gap: 10px; flex-wrap: wrap; }
.plate-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #f5f7fa;
  border-radius: 10px; cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s; flex: 1; min-width: 130px;
  -webkit-tap-highlight-color: transparent;
}
.plate-option.selected { border-color: #1677FF; background: #e8f4ff; }
.plate-option:active { transform: scale(0.98); }
.plate-opt-thumb {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.plate-opt-name { flex: 1; font-size: 13px; font-weight: 500; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate-opt-check { color: #1677FF; font-weight: 700; font-size: 16px; }

/* Amount Input */
.amount-input-wrap {
  display: flex; align-items: center;
  background: #f9faff; border-radius: 12px;
  padding: 4px 16px; border: 2px solid #eef0f3;
  transition: border-color 0.2s;
}
.amount-input-wrap:focus-within { border-color: #1677FF; }
.amount-symbol { font-size: 28px; font-weight: 700; color: #1a1a2e; margin-right: 6px; }
.amount-input {
  flex: 1; border: none; outline: none;
  font-size: 28px; font-weight: 700; color: #1a1a2e;
  padding: 14px 0; background: transparent; width: 100%;
}
.amount-input::placeholder { color: #ccc; font-weight: 400; }

.amount-presets { display: flex; gap: 8px; margin-top: 10px; }
.preset-btn {
  flex: 1; padding: 8px;
  background: #f5f7fa; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #666;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.preset-btn:active { background: #e8f4ff; color: #1677FF; }

.btn-submit-order { margin-top: 20px; font-size: 17px; padding: 15px 28px; }

/* Platform Info */
.platform-info {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 16px;
}
.platform-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #bbb;
}
.platform-channels { display: flex; gap: 5px; }
.ch-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 5px;
  font-size: 11px; font-weight: 700; color: #fff;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 12px;
  font-size: 16px; font-weight: 600;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, #1677FF, #4096FF); color: #fff; }
.btn-primary:active { background: linear-gradient(135deg, #0958d9, #1677FF); }
.btn-outline { border: 1.5px solid #e0e0e0; color: #666; background: #fff; }
.btn-outline:active { background: #f5f5f5; }
.btn-block { width: 100%; }

/* ========== Processing Page ========== */
.page-processing { padding: 16px; }
.processing-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center;
}
.processing-title { font-size: 18px; font-weight: 600; margin-top: 24px; }
.processing-desc { font-size: 14px; color: #999; margin-top: 8px; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid #e8f0fe; border-top-color: #1677FF;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Result Page ========== */
.page-result { padding: 16px; }
.result-card {
  background: #fff; border-radius: 16px;
  padding: 40px 24px 24px; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.result-icon { margin-bottom: 16px; }
.result-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.result-desc { font-size: 14px; color: #999; margin-bottom: 24px; }
.result-detail {
  background: #f9f9f9; border-radius: 10px;
  padding: 16px; margin-bottom: 24px;
  font-size: 14px; color: #666; text-align: left;
}
.result-detail .detail-row { display: flex; justify-content: space-between; padding: 4px 0; }
.result-actions { display: flex; flex-direction: column; gap: 10px; }

.result-qr { text-align: center; margin-bottom: 20px; }
.result-qr-tip { font-size: 13px; color: #666; margin-bottom: 12px; }
.result-qr-img {
  width: 200px; height: 200px; border-radius: 12px;
  border: 2px solid #e8f0fe; padding: 8px; background: #fff;
}

/* ========== Orders Page ========== */
.orders-tabs {
  display: flex; background: #fff; padding: 8px 16px; gap: 16px;
  border-bottom: 1px solid #eef0f3;
  position: sticky; top: 52px; z-index: 10;
}
.tab {
  font-size: 14px; color: #999; cursor: pointer;
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: all 0.2s; -webkit-tap-highlight-color: transparent;
}
.tab.active { color: #1677FF; border-bottom-color: #1677FF; font-weight: 600; }
.orders-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.order-card {
  background: #fff; border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-name { font-size: 15px; font-weight: 600; }
.order-status { font-size: 12px; padding: 2px 10px; border-radius: 20px; font-weight: 500; }
.order-status.success { background: #f0fff4; color: #52c41a; }
.order-status.pending { background: #fff8e6; color: #faad14; }
.order-status.failed { background: #fff1f0; color: #ff4d4f; }
.order-card-body { display: flex; justify-content: space-between; align-items: flex-end; }
.order-info { font-size: 12px; color: #999; }
.order-info div { margin-bottom: 3px; }
.order-amount { font-size: 18px; font-weight: 700; color: #1a1a2e; }
.order-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; overflow: hidden; }

/* ========== Profile Page ========== */
.profile-header {
  text-align: center; padding: 32px 24px;
  background: linear-gradient(135deg, #1677FF, #4096FF); color: #fff;
}
.profile-avatar {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.profile-name { font-size: 18px; font-weight: 600; }
.profile-badge {
  display: inline-block; margin-top: 6px;
  font-size: 12px; background: rgba(255,255,255,0.2);
  padding: 2px 12px; border-radius: 20px;
}
.profile-stats {
  display: flex; background: #fff;
  margin: -20px 16px 0; border-radius: 14px;
  padding: 20px; box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: relative; z-index: 1;
}
.stat-item { flex: 1; text-align: center; }
.stat-value { font-size: 18px; font-weight: 700; color: #1677FF; }
.stat-label { font-size: 12px; color: #999; margin-top: 4px; }
.profile-menu {
  margin: 20px 16px; background: #fff;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.menu-item {
  display: flex; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #f5f5f5;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #f9f9f9; }
.menu-icon { font-size: 20px; margin-right: 14px; }
.menu-text { flex: 1; font-size: 15px; }
.menu-arrow { color: #ccc; font-size: 20px; font-weight: 300; }

/* ========== Empty State ========== */
.empty-state { text-align: center; padding: 60px 24px; color: #ccc; }
.empty-state svg { margin-bottom: 16px; }
.empty-state p { font-size: 14px; }

/* ========== IP Location Banner ========== */
.ip-banner {
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-size: 13px;
}
.ip-locating {
  display: flex; align-items: center; gap: 10px; color: #999;
}
.spinner-small {
  width: 18px; height: 18px;
  border: 2.5px solid #e8f0fe; border-top-color: #1677FF;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.ip-located {
  display: flex; flex-direction: column; gap: 6px;
}
.ip-info {
  display: flex; align-items: center; gap: 6px; font-weight: 500; color: #1a1a2e;
}
.ip-icon { font-size: 16px; }
.ip-city { font-size: 15px; font-weight: 600; color: #1677FF; }
.ip-province { font-size: 12px; color: #999; }
.ip-match { font-size: 12px; }
.match-success { color: #52c41a; font-weight: 500; }
.match-info { color: #faad14; }
.ip-fail { font-size: 13px; color: #999; }

/* ========== City Filter Tags ========== */
.city-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.city-tag {
  padding: 4px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  background: #f5f5f5; color: #666;
  cursor: pointer; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.city-tag:active { transform: scale(0.95); }
.city-tag.active { background: #e8f4ff; color: #1677FF; }

/* ========== Plate City Badge ========== */
.plate-city-badge {
  display: inline-block;
  font-size: 10px; font-weight: 500;
  background: #f5f5f5; color: #999;
  padding: 1px 8px; border-radius: 10px;
  vertical-align: middle; margin-left: 4px;
}
.plate-city-badge.matched {
  background: #e8f4ff; color: #1677FF;
}
.plate-city-badge.prov-matched {
  background: #fff7e6; color: #fa8c16;
}
.plate-platform-badge {
  display: inline-block;
  font-size: 9px; font-weight: 600;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100;
  padding: 1px 7px; border-radius: 8px;
  vertical-align: middle; margin-left: 2px;
  border: 1px solid #ffcc80;
}
.plate-item.city-matched {
  background: #f0f9ff;
  border-left: 3px solid #1677FF;
}
.plate-item.province-matched {
  background: #fffbf0;
  border-left: 3px solid #fa8c16;
}

/* ========== City Input ========== */
.city-input-wrap {
  display: flex; gap: 8px; align-items: center;
}
.city-input-wrap .form-input { flex: 1; }
.btn-auto-city {
  flex-shrink: 0;
  padding: 8px 12px; border-radius: 10px;
  background: #e8f4ff; color: #1677FF;
  font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-auto-city:active { background: #d0e8ff; }

/* ========== IP Auto Tag ========== */
.ip-auto-tag {
  font-size: 11px; font-weight: 500;
  background: #f0fff4; color: #52c41a;
  padding: 2px 10px; border-radius: 12px;
  margin-left: 8px; vertical-align: middle;
}

/* ========== Toast ========== */
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.78); color: #fff;
  padding: 12px 24px; border-radius: 10px;
  font-size: 14px; z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 999;
  display: none; align-items: center; justify-content: center; padding: 32px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 340px; overflow: hidden;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 20px 24px 0; font-size: 17px; font-weight: 600; text-align: center; }
.modal-body { padding: 16px 24px; font-size: 14px; color: #666; text-align: center; line-height: 1.6; }
.modal-footer { display: flex; gap: 0; border-top: 1px solid #f0f0f0; }
.modal-footer .btn { flex: 1; border-radius: 0; padding: 14px; font-size: 16px; }
.modal-footer .btn:first-child { border-right: 1px solid #f0f0f0; }

/* ========== 支付方式选择器 ========== */
.pay-method-group {
  display: flex; gap: 10px;
}
.pay-method-item {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 14px 12px; border-radius: 12px;
  border: 2px solid #e8e8e8; background: #fff;
  cursor: pointer; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.pay-method-item:active { transform: scale(0.97); }
.pay-method-item.active {
  border-color: #1677FF; background: #f0f5ff;
}
.pay-method-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.pay-method-icon.alipay-bg { background: linear-gradient(135deg, #1677FF, #0958d9); }
.pay-method-icon.wechat-bg { background: linear-gradient(135deg, #07c160, #059b4b); }
.pay-method-icon.auto-bg { background: linear-gradient(135deg, #fa8c16, #d46b08); }
.pay-method-name { font-size: 14px; color: #333; font-weight: 500; }
.pay-method-check {
  display: none; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: #1677FF; font-size: 16px; font-weight: 700;
}
.pay-method-item.active .pay-method-check { display: block; }
.pay-method-item.active .pay-method-name { color: #1677FF; }

/* ========== 城市选择器下拉 ========== */
.city-input-wrap { position: relative; }
.city-picker-dropdown {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 100;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 280px; overflow-y: auto;
  margin-top: 4px;
}
.city-picker-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.city-pick-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 6px 10px; border-radius: 8px; background: #f5f7fa; color: #333;
  font-size: 12px; cursor: pointer; border: 1px solid transparent;
  transition: all 0.15s; white-space: nowrap;
}
.city-pick-btn:active { background: #1677FF; color: #fff; transform: scale(0.97); }
.city-pick-btn small { color: #aaa; font-size: 10px; }
.city-pick-btn:active small { color: rgba(255,255,255,0.7); }
.city-province-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px; border-radius: 8px; background: #f0f5ff; color: #1677FF;
  font-size: 12px; cursor: pointer; border: 1px solid #d6e4ff;
  transition: all 0.15s; font-weight: 500;
}
.city-province-item:active { background: #1677FF; color: #fff; }
.province-count { font-size: 10px; color: #99c0ff; font-weight: 400; }
.city-province-item:active .province-count { color: rgba(255,255,255,0.7); }
.city-picker-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid #f0f0f0;
  font-size: 13px; color: #666; font-weight: 500;
}
.city-back-btn {
  color: #1677FF; cursor: pointer; font-size: 13px; font-weight: 500;
  padding: 2px 6px; border-radius: 6px;
}
.city-back-btn:active { background: #f0f5ff; }
.city-no-result {
  padding: 16px; text-align: center; color: #999; font-size: 13px;
}

/* ========== Safe Area ========== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .tab-bar { padding-bottom: env(safe-area-inset-bottom); }
  .main-content { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ========== Plate Filter Bar ========== */
.plate-filter-bar {
  padding: 8px 0 4px;
}
.filter-search {
  margin-bottom: 8px;
}
.filter-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
}
.filter-search input:focus {
  border-color: #1677FF;
  background: #fff;
}
.filter-search input::placeholder {
  color: #bbb;
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #666;
  transition: all 0.15s;
  user-select: none;
}
.platform-tag:active {
  transform: scale(0.95);
}
.platform-tag.active {
  background: #1677FF;
  color: #fff;
  border-color: #1677FF;
}
.platform-tag .tag-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
}
.platform-tag.active .tag-icon {
  background: rgba(255,255,255,0.3);
  color: #fff;
}
.filter-result-count {
  font-size: 11px;
  color: #999;
  padding: 2px 0 4px;
}

/* ========== Login Page ========== */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  margin: auto 0;
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.login-logo h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.login-logo p {
  font-size: 12px;
  color: #999;
}
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: #f5f7fa;
  border-radius: 10px;
  padding: 3px;
}
.login-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.login-tab.active {
  background: #fff;
  color: #1677FF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e8ecf0;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
}
.login-input:focus {
  border-color: #667eea;
}
.form-group {
  margin-bottom: 14px;
}
.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}
.login-btn:active {
  opacity: 0.85;
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.login-error {
  text-align: center;
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 12px;
}
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f5ff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  color: #1677FF;
  margin: 8px 16px;
}

/* ========== Order Detail ========== */
.page-order-detail { padding: 16px; }
.order-detail-card {
  background: #fff;
  border-radius: 16px;
  padding: 4px 20px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.detail-rows { padding: 16px 0; }
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f7f7f7;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
  margin-right: 12px;
}
.detail-value {
  font-size: 13px;
  color: #333;
  text-align: right;
  flex: 1;
  word-break: break-word;
}
.order-detail-actions { padding-top: 16px; }

/* ========== Admin Panel ========== */
.page-admin { padding: 16px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.admin-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.admin-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: #1677FF;
}
.admin-stat-label {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}
.admin-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.admin-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}
.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f8f9fc;
  border-radius: 10px;
}
.admin-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.admin-user-meta {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex-shrink: 0;
  margin-left: 8px;
  max-width: 220px;
  justify-content: flex-end;
}
.admin-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  background: #1677FF;
  color: #fff;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.admin-btn:active { opacity: 0.8; }
.admin-btn-info {
  background: #52c41a;
}
.admin-btn-edit {
  background: #faad14;
}
.admin-btn-warn {
  background: #ff7a00;
}
.admin-btn-ok {
  background: #52c41a;
}
.admin-btn-danger {
  background: #ff4d4f;
}
.admin-card-disabled {
  opacity: 0.6;
  background: #f0f0f0 !important;
}
.admin-tag-disabled {
  display: inline-block;
  font-size: 10px;
  background: #ff4d4f;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.admin-create-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 14px;
  -webkit-tap-highlight-color: transparent;
}
.admin-create-btn:active { opacity: 0.85; }

/* ========== Pay Link Section ========== */
.pay-link-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pay-link-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.pay-link-desc {
  font-size: 12px;
  color: #999;
  margin-bottom: 14px;
  line-height: 1.5;
}
.pay-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pay-link-row label {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  min-width: 60px;
}
.pay-link-range {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.pay-link-range input {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  text-align: center;
  min-width: 0;
}
.pay-link-range input:focus { border-color: #667eea; }
.pay-link-range span { color: #999; font-size: 14px; }
.pay-link-row select {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.pay-link-result {
  margin-top: 12px;
  padding: 12px;
  background: #f5f7fa;
  border-radius: 8px;
}
.pay-link-url {
  font-size: 12px;
  color: #1677FF;
  word-break: break-all;
  line-height: 1.5;
  font-family: monospace;
}

/* ========== Order Page Auto Flow ========== */
.order-ip-status {
  padding: 10px 12px;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 13px;
  color: #666;
}
.ip-match-success { line-height: 1.6; }
.amount-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.amount-range-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f5f7fa;
  border-radius: 10px;
  padding: 8px 12px;
}
.amount-range-input span {
  font-size: 16px;
  font-weight: 600;
  color: #667eea;
}
.amount-range-input input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  text-align: center;
  min-width: 0;
  color: #333;
}
.range-sep {
  color: #999;
  font-size: 16px;
  font-weight: 500;
}
.order-flow-hint {
  text-align: center;
  font-size: 11px;
  color: #999;
  margin-top: 10px;
  line-height: 1.5;
}

