/* 加油站 H5 付款页面样式 — 适老化放大版式 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #ff6a00;
  --primary-dark: #e25600;
  --primary-light: #fff3ea;
  --text: #1f2329;
  --text-2: #4e5969;
  --text-3: #86909c;
  --border: #e5e6eb;
  --bg: #f5f6f7;
  --success: #00b42a;
  --danger: #f53f3f;
  --ok: #00b42a;
}
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}
input, button { font-family: inherit; }
.hidden { display: none !important; }

.page { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 48px; }

/* 顶部 Hero */
.hero {
  background: linear-gradient(135deg, #ff6a00 0%, #ff9244 100%);
  padding: 24px 20px 36px;
  color: #fff;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.22);
}
.hero-inner { display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.brand-title { font-size: 22px; font-weight: 700; }
.brand-sub { font-size: 14px; opacity: 0.9; margin-top: 4px; }

/* Tabs — 放大 */
.tabs,
.tabs-lg {
  display: flex; margin: 20px 16px 0;
  background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.tab {
  flex: 1; text-align: center; padding: 14px 0;
  font-size: 17px; color: var(--text-2);
  border-radius: 10px; cursor: pointer; transition: all .2s;
  font-weight: 600;
}
.tab.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px rgba(255,106,0,0.32);
}
.tab:active { transform: scale(0.98); }

/* 表单 */
.form { padding: 20px 16px 0; }
.field-group { margin-bottom: 22px; }
.label {
  display: block; font-size: 15px; color: var(--text-2);
  margin-bottom: 10px; font-weight: 600;
}
.label-lg { font-size: 18px; margin-bottom: 12px; color: var(--text); letter-spacing: 0.3px; }
.req { color: var(--danger); margin-left: 2px; }
.req-lg { font-size: 18px; }

.input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 18px; color: var(--text); background: #fff;
  outline: none; transition: all .2s;
}
.input-lg { height: 60px; font-size: 20px; padding: 0 18px; border-radius: 14px; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.input::placeholder { color: var(--text-3); font-size: 16px; }
.input-lg::placeholder { font-size: 17px; }

/* 枪号输入框状态 */
.gun-wrap { position: relative; }
.gun-input.has-error { border-color: var(--danger); background: #fff6f6; box-shadow: 0 0 0 3px #ffece8; }
.gun-input.has-value { border-color: var(--ok); box-shadow: 0 0 0 3px #e8ffea; }
.gun-input.has-value:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

/* 枪号错误提示 */
.err-tip {
  min-height: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-3);
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  transition: all .2s;
  display: none;
}
.err-tip.show { display: block; }
.err-tip.err { color: var(--danger); background: #fff1f0; border: 1px solid #ffd1cc; font-weight: 500; }
.err-tip.ok { color: var(--ok); background: #f0fff4; border: 1px solid #b7ebc1; font-weight: 500; }

/* 枪号输入错误震动动画 */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.input.shake { animation: shake .3s ease; }

.input-suffix { position: relative; }
.input-suffix .input { padding-right: 72px; }
.input-suffix-lg .input-lg { padding-right: 80px; }
.input-suffix .suffix {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 15px; font-weight: 500; pointer-events: none;
}
.suffix-lg { font-size: 18px !important; }

/* 油号选择 — 放大卡片 */
.oil-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.oil-grid-lg { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.oil-item {
  height: 64px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); border-radius: 14px;
  font-size: 20px; font-weight: 700; color: var(--text-2);
  background: #fff; cursor: pointer; transition: all .15s;
  position: relative;
  padding: 4px 6px;
  flex-direction: column;
  gap: 2px;
}
.oil-item .oil-price-tag {
  position: static; font-size: 14px; color: var(--primary);
  font-weight: 500; line-height: 1.3;
}
.oil-item:active { transform: scale(0.96); }
.oil-item.active {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 3px 10px rgba(255,106,0,0.15);
}
.oil-custom { font-size: 14px; color: var(--text-3); }

/* 单价展示框(只读) */
.price-box {
  height: 52px; padding: 0 16px;
  border: 1.5px dashed var(--border); border-radius: 12px;
  background: var(--bg); display: flex; align-items: center;
  font-size: 18px; color: var(--text); font-weight: 700;
}
.price-box-lg { height: 60px; font-size: 20px; border-radius: 14px; padding: 0 18px; }
.price-box.has-price {
  border-style: solid; border-color: #ffb58a; background: #fff6ee; color: var(--primary);
  box-shadow: inset 0 0 0 1px #ffd9b8;
}

/* 金额卡片 */
.amount-card {
  background: linear-gradient(135deg, #fff6ee 0%, #fff 100%);
  border: 2px solid #ffb58a; border-radius: 18px;
  padding: 20px; margin: 12px 0 20px; text-align: center;
}
.amount-card-lg { padding: 24px; margin: 16px 0 24px; border-radius: 20px; }
.amount-label { font-size: 16px; color: var(--text-2); font-weight: 500; letter-spacing: 1px; }
.amount-value {
  font-size: 40px; font-weight: 800; color: var(--primary);
  margin-top: 6px; letter-spacing: -0.5px;
}
.amount-value-lg { font-size: 48px; margin-top: 10px; }

/* 提示 */
.tips { font-size: 14px; color: var(--danger); min-height: 20px; margin-bottom: 10px; padding: 6px 8px; font-weight: 500; }
.tips-lg { font-size: 16px; min-height: 24px; padding: 8px 12px; }

/* 提交按钮 */
.btn-pay {
  width: 100%; height: 58px; border: none; border-radius: 14px;
  background: var(--primary); color: #fff; font-size: 18px; font-weight: 700;
  cursor: pointer; transition: all .2s; letter-spacing: 2px;
  box-shadow: 0 8px 20px rgba(255,106,0,0.32);
  position: relative;
  margin-top: 4px;
}
.btn-pay-lg { height: 68px; font-size: 22px; border-radius: 18px; letter-spacing: 3px; box-shadow: 0 10px 24px rgba(255,106,0,0.36); }
.btn-pay:active { transform: translateY(2px); box-shadow: 0 4px 12px rgba(255,106,0,0.3); background: var(--primary-dark); }
.btn-pay:disabled {
  background: #c9cdd4; color: #fff; box-shadow: none; cursor: not-allowed;
}
.btn-pay.loading .btn-text { visibility: hidden; }
.btn-pay.loading::after {
  content: ''; position: absolute;
  width: 26px; height: 26px; left: 50%; top: 50%;
  margin: -13px 0 0 -13px;
  border: 3px solid rgba(255,255,255,0.5); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 通知 */
.notice { margin-top: 24px; padding: 14px 16px; background: #fafbfc; border-radius: 12px; border: 1px solid var(--border); }
.notice-lg { padding: 16px 18px; }
.notice p { font-size: 14px; color: var(--text-3); line-height: 2; }
.notice-lg p { font-size: 16px; line-height: 2.2; }

/* 遮罩 */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.mask-card {
  background: #fff; border-radius: 16px; padding: 36px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  min-width: 240px;
}
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--primary-light); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.mask-text { font-size: 16px; color: var(--text-2); font-weight: 500; }

/* 结果弹窗 */
.result-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 999;
  padding: 24px;
}
.result-card {
  background: #fff; border-radius: 20px; padding: 36px 28px 28px;
  width: 100%; max-width: 380px; text-align: center;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-icon {
  width: 80px; height: 80px; margin: 0 auto 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: #fff;
  background: var(--success);
}
.result-icon.fail { background: var(--danger); }
.result-icon.pending { background: #faad14; }
.result-title { font-size: 22px; font-weight: 700; }
.result-desc { font-size: 15px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.result-detail {
  margin: 20px 0 26px; padding: 16px; background: var(--bg);
  border-radius: 12px; font-size: 15px; color: var(--text-2); text-align: left;
  line-height: 2;
}
.result-detail .row { display: flex; justify-content: space-between; }
.result-detail .row .val { color: var(--text); font-weight: 600; }
.btn-confirm {
  width: 100%; height: 54px; border: none; border-radius: 14px;
  background: var(--primary); color: #fff; font-size: 18px; font-weight: 700;
  cursor: pointer; letter-spacing: 2px;
  transition: all .2s;
}
.btn-confirm:active { background: var(--primary-dark); transform: translateY(1px); }

/* ============ Toast 轻提示 ============ */
#toast {
  position: fixed; top: 36%; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 14px 24px;
  border-radius: 12px; font-size: 16px; z-index: 9999;
  max-width: 80%; white-space: pre-wrap; text-align: center;
  display: none;
  animation: toastIn .25s ease;
}
#toast.show { display: block; }
#toast.error { background: rgba(245, 63, 63, 0.92); }
#toast.success { background: rgba(0, 180, 42, 0.92); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 顶部账户栏(用户信息) */
.user-bar {
  background: rgba(255,255,255,0.25);
  padding: 8px 12px; border-radius: 20px;
  display: flex; align-items: center; gap: 8px;
  font-size: 15px;
}
.user-bar .logout {
  margin-left: 4px; padding: 2px 10px;
  background: rgba(255,255,255,0.85); color: var(--primary);
  border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.user-bar .logout:active { background: rgba(255,255,255,0.6); }

/* ============ 右上角小头像 + 下拉菜单 ============ */
.hero-inner { justify-content: space-between; align-items: center; }
.avatar-wrap { position: relative; }
.avatar-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.22);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}
.avatar-btn:active { transform: scale(0.95); background: rgba(255,255,255,0.35); }
.avatar-btn svg { display: block; }

.avatar-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 6px 0;
  z-index: 100;
  animation: avMenuIn .18s ease;
  overflow: hidden;
}
@keyframes avMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.avatar-menu::before {
  content:'';
  position: absolute;
  top: -6px; right: 18px;
  width: 12px; height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}
.av-menu-phone {
  padding: 12px 16px;
}
.av-menu-label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.av-menu-value {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}
.av-menu-divider { height: 1px; background: #f2f3f5; margin: 2px 0; }
.av-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
}
.av-menu-item:active { background: var(--primary-light); }
.av-menu-icon { font-size: 18px; width: 22px; text-align: center; }
.av-menu-logout { color: var(--danger); }
.av-menu-logout:active { background: #fff1f0; }

/* ============ 我的订单弹窗 ============ */
.orders-modal .orders-card {
  max-width: 480px;
  padding: 24px 20px 20px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.orders-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.orders-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.orders-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: #f2f3f5;
  color: var(--text-2);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.orders-close:active { background: #e5e6eb; color: var(--text); }
.orders-total {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.orders-total b { color: var(--primary); font-size: 16px; margin: 0 2px; }
.orders-list {
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 120px;
}
.empty-orders {
  padding: 40px 10px;
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.8;
}
.order-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: all .15s;
}
.order-item:active { background: #fafbfc; }
.order-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.order-no {
  font-size: 13px;
  color: var(--text-3);
  font-family: Consolas, monospace;
  word-break: break-all;
  max-width: 60%;
}
.order-status-tag {
  flex-shrink: 0;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.order-st-paid { background: #e8ffea; color: var(--success); }
.order-st-offline { background: #eef3ff; color: #1664ff; }
.order-st-pending { background: #fff7e6; color: #d46b08; }
.order-st-cancel { background: #f2f3f5; color: var(--text-3); }

.order-item-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: 14px;
  color: var(--text-2);
}
.order-item-body .kv { display: flex; line-height: 1.7; }
.order-item-body .kv .k { color: var(--text-3); margin-right: 6px; flex-shrink: 0; }
.order-item-body .kv .v { color: var(--text); font-weight: 500; word-break: break-all; }
.order-item-amount {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.order-amount-label { color: var(--text-2); font-size: 14px; }
.order-amount-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}

/* ========== 支付方式选择 ========== */
.pay-channels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.pay-channel {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; padding: 12px 10px;
  background: #fff; border: 2px solid var(--border); border-radius: 14px;
  font-size: 17px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all .15s;
  user-select: none;
}
.pay-channel:active { transform: scale(0.97); }
.pay-channel-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 auto;
}
.pay-channel-icon.icon-wx { background: #07c160; }
.pay-channel-icon.icon-ali {
  background: #1677ff; font-size: 19px; font-weight: 800;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.pay-channel-check {
  position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--border); background: #fff;
}
.pay-channel-check::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
}
.pay-channel.active[data-channel="wx"] {
  border-color: #07c160; background: #f0fbf4;
  box-shadow: 0 3px 10px rgba(7,193,96,0.15);
  color: #06a352;
}
.pay-channel.active[data-channel="alipay"] {
  border-color: #1677ff; background: #f0f6ff;
  box-shadow: 0 3px 10px rgba(22,119,255,0.15);
  color: #0f63d6;
}
.pay-channel.active .pay-channel-check {
  border-color: transparent;
}
.pay-channel.active[data-channel="wx"] .pay-channel-check { background: #07c160; }
.pay-channel.active[data-channel="alipay"] .pay-channel-check { background: #1677ff; }
.pay-channel.active .pay-channel-check::after { transform: rotate(45deg) scale(1); }

/* JSAPI 授权回跳页 */
.pay-redirect-card {
  background: #fff; border-radius: 18px; padding: 36px 24px;
  width: 84%; max-width: 340px; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.pay-redirect-card .spinner { margin: 0 auto 18px; }
.pay-redirect-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.pay-redirect-desc { font-size: 14px; color: var(--text-3); line-height: 1.7; word-break: break-all; }
.pay-redirect-btn {
  display: none; margin-top: 20px; width: 100%; height: 48px;
  border: none; border-radius: 12px;
  background: var(--primary); color: #fff; font-size: 17px; font-weight: 700;
  cursor: pointer;
}
.pay-redirect-btn.show { display: block; }

/* ========== 适老化响应式:大屏手机/平板(更大) ========== */
@media (min-width: 420px) {
  .brand-title { font-size: 24px; }
  .tab { font-size: 18px; padding: 16px 0; }
  .label-lg { font-size: 19px; }
  .input-lg { font-size: 21px; height: 64px; }
  .oil-item { height: 72px; font-size: 22px; }
  .amount-value-lg { font-size: 52px; }
  .btn-pay-lg { height: 72px; font-size: 24px; }
  .pay-channel { min-height: 70px; font-size: 18px; }
}
