/* =========================================================
   自动售货机商城 —— 统一样式（前台 + 后台）
   现代简洁深色风格
   ========================================================= */

:root {
    --bg: #0f1220;
    --bg-soft: #181c2e;
    --bg-card: #1d2138;
    --bg-hover: #252a47;
    --border: #2c3253;
    --text: #eef0f8;
    --text-dim: #9aa1bf;
    --primary: #ff5a76;
    --primary-hover: #ff4062;
    --accent: #ffb03a;
    --green: #2ecc8f;
    --red: #ff5a5a;
    --blue: #4a9eff;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
    font-family: inherit;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }

/* ---------- 顶部导航 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 18, 32, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { font-size: 20px; font-weight: 700; color: var(--text); }
.cart-link { position: relative; display: flex; align-items: center; }
.cart-icon { font-size: 22px; }
.cart-badge {
    display: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 40px 0 30px;
}
.hero h1 { font-size: 34px; letter-spacing: 1px; }
.hero p { color: var(--text-dim); margin-top: 8px; }

/* ---------- 商品网格 ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 10px;
}
.product-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.hot-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: linear-gradient(135deg, #ff5a76, #ff8a3a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255, 90, 118, .4);
}
.hot-tag.big { position: static; display: inline-block; margin-bottom: 10px; }
.card-img {
    position: relative;
    height: 200px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.img-fallback {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #252a47, #1d2138);
}
.card-body { padding: 14px; }
.card-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}
.card-desc {
    font-size: 13px;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
    margin-bottom: 10px;
}
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.item-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.stock { font-size: 12px; color: var(--text-dim); }
.stock.out { color: var(--red); }

/* ---------- 分页 ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}
.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all .2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-info { text-align: center; color: var(--text-dim); font-size: 13px; margin-top: 10px; }

/* ---------- 通用页面卡片 ---------- */
.page-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.page-card h2 { margin-bottom: 20px; font-size: 24px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all .2s;
}
.btn:hover { background: var(--bg-hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.bar { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* ---------- 购物车 ---------- */
.empty-cart { text-align: center; padding: 70px 20px; }
.empty-emoji { font-size: 64px; margin-bottom: 14px; }
.empty-cart p { color: var(--text-dim); margin-bottom: 20px; }
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    flex-wrap: wrap;
}
.cart-img {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    flex-shrink: 0;
}
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 140px; }
.cart-name { font-weight: 600; font-size: 15px; }
.cart-price { color: var(--primary); font-weight: 700; margin-top: 4px; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; }
.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-num { min-width: 24px; text-align: center; font-weight: 700; }
.cart-subtotal { font-weight: 700; color: var(--primary); min-width: 70px; text-align: right; }
.cart-del { background: none; border: none; color: var(--red); font-size: 13px; }
.cart-del:hover { text-decoration: underline; }
.checkout-bar {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.checkout-info { font-size: 15px; }
.total-count, .total-price { color: var(--primary); font-weight: 700; font-size: 20px; }

/* ---------- 结算 ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-dim); }
.form-grid .full { grid-column: 1 / -1; }
textarea { resize: vertical; min-height: 80px; }
.order-summary { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.order-summary h3 { margin-bottom: 12px; }
.summary-list { display: flex; flex-direction: column; gap: 8px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; }
.summary-total { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); text-align: right; }
.summary-total strong { color: var(--primary); font-size: 20px; }

/* ---------- 支付 ---------- */
.payment-header { margin-bottom: 18px; color: var(--text-dim); }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.pay-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 12px;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
}
.pay-method input { position: absolute; opacity: 0; }
.pay-method:hover { border-color: var(--primary); }
.pay-method:has(input:checked) { border-color: var(--primary); background: rgba(255, 90, 118, .08); }
.pm-logo { font-size: 34px; }
.pm-name { font-weight: 600; }
.qr-preview { margin-bottom: 18px; text-align: center; }
.fake-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    background: #fff;
    color: #333;
    font-weight: 700;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 auto;
}
.payment-info { color: var(--text-dim); font-size: 13px; text-align: center; margin-bottom: 16px; }

/* ---------- 成功页 ---------- */
.success-page { text-align: center; padding: 60px 20px; }
.success-icon { font-size: 72px; margin-bottom: 16px; }
.success-tip { margin: 14px 0; }
.success-tip strong { color: var(--primary); }
.success-page .btn { margin-top: 20px; }

/* ---------- 详情弹窗 ---------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.overlay.show { display: flex; }
.modal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    box-shadow: var(--shadow);
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    z-index: 3;
}
.modal-close:hover { border-color: var(--primary); color: var(--primary); }
.pay-qr-modal { max-width: 440px; }
.pay-qr-box { text-align: center; }
.pay-qr-box h3 { font-size: 18px; margin-bottom: 16px; }
.pay-qr-imgwrap { margin-bottom: 14px; }
.pay-qr-img {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.pay-qr-empty {
    padding: 48px 20px;
    color: var(--text-dim);
    background: var(--bg-soft);
    border-radius: 10px;
    font-size: 14px;
}
.pay-qr-tip { color: var(--text-dim); font-size: 13px; margin-bottom: 4px; }
.pay-qr-box .bar { justify-content: center; }
#detailContent { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-image {
    position: relative;
    background: var(--bg-soft);
    border-radius: 12px;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-image img { width: 100%; height: 100%; object-fit: contain; }
.big-fallback { font-size: 110px; }
.detail-info { display: flex; flex-direction: column; }
.detail-name { font-size: 22px; margin-bottom: 10px; }
.detail-desc { color: var(--text-dim); margin-bottom: 16px; }
.detail-price { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.detail-stock { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.detail-qty { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.detail-add-btn { width: 100%; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--primary);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all .3s;
    z-index: 400;
    box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   后台样式
   ========================================================= */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #1d2138, #0f1220);
}
.login-box {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 34px;
    box-shadow: var(--shadow);
}
.login-box h1 { font-size: 22px; text-align: center; }
.login-sub { text-align: center; color: var(--text-dim); margin: 8px 0 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-dim); }

.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    flex-shrink: 0;
}
.admin-logo { padding: 0 20px 20px; font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--border); }
.admin-side nav { padding: 14px 0; display: flex; flex-direction: column; }
.side-link {
    padding: 13px 22px;
    color: var(--text-dim);
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: all .2s;
}
.side-link:hover { color: var(--text); background: var(--bg-hover); }
.side-link.active { color: var(--primary); border-left-color: var(--primary); background: rgba(255, 90, 118, .08); }
.side-link.danger { color: var(--red); }

.admin-main { flex: 1; padding: 24px 28px; overflow-x: auto; }
.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.admin-title { font-size: 22px; font-weight: 700; }
.admin-user { color: var(--text-dim); font-size: 14px; }

.flash {
    background: rgba(46, 204, 143, .12);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}
.flash.error {
    background: rgba(255, 90, 90, .12);
    border-color: var(--red);
    color: var(--red);
}

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
}
.stat-card.warn { border-color: var(--accent); }
.stat-card.danger { border-color: var(--red); }
.stat-num { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-card.warn .stat-num { color: var(--accent); }
.stat-card.danger .stat-num { color: var(--red); }
.stat-label { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

/* 面板与表格 */
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.panel-head h3 { font-size: 19px; }
.panel h3 { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; background: var(--bg-soft); white-space: nowrap; }
tbody tr:hover { background: var(--bg-hover); }
.p-name { max-width: 260px; }
.empty { text-align: center; color: var(--text-dim); padding: 30px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; white-space: nowrap; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.stock-input { width: 80px; padding: 6px 8px; }
.hot-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: var(--bg-soft);
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.hot-badge.on { background: rgba(255, 90, 118, .15); color: var(--primary); border-color: var(--primary); }

.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}
.status.pending { color: var(--accent); border-color: var(--accent); }
.status.paid { color: var(--blue); border-color: var(--blue); }
.status.shipped { color: var(--green); border-color: var(--green); }
.status.completed { color: var(--green); border-color: var(--green); }
.status.cancelled { color: var(--red); border-color: var(--red); }

.order-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.order-total { color: var(--primary); font-size: 20px; font-weight: 700; }
.status-form { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.status-form label { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }

/* 商品表单 */
.form-grid label.checkbox { flex-direction: row; align-items: center; gap: 8px; }
.form-actions { display: flex; gap: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
    #detailContent { grid-template-columns: 1fr; }
    .payment-methods { grid-template-columns: 1fr; }
    .admin-shell { flex-direction: column; }
    .admin-side { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-side nav { flex-direction: row; flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 右下角购物车悬浮按钮 ---------- */
.float-cart {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 150;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 14px;
    background: #7c3aed;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.float-cart:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.55);
}
.float-cart:active { transform: translateY(0); }
.float-cart-icon {
    width: 28px;
    height: 28px;
    flex: none;
}
.float-cart-label {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .float-cart { right: 16px; bottom: 16px; }
}

/* ---------- 商品卡片「加入购物车」按钮 ---------- */
.add-cart-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 0;
    background: #ff5a6e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}
.add-cart-btn:hover { background: #f0485c; }
.add-cart-btn:active { transform: scale(.98); }
.add-cart-btn:disabled {
    background: #d9d9d9;
    color: #999;
    cursor: not-allowed;
}

/* ---------- 后台支付设置：收款码缩略图列表 ---------- */
.pay-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}
.pay-qr-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.pay-qr-card h4 {
    font-size: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.count-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 90, 118, .15);
    color: var(--primary);
    border: 1px solid var(--primary);
}
.qr-thumb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    max-height: 320px;
    overflow-y: auto;
}
.qr-thumb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.qr-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    flex: none;
    border: 1px solid var(--border);
}
.qr-thumb-info {
    flex: 1;
    min-width: 0;
}
.qr-thumb-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}
.qr-thumb-src {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qr-del-form { flex: none; }
.qr-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 10px;
}
.qr-form { margin: 0; }
.qr-add-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.qr-file {
    flex: none;
    max-width: 200px;
}
.qr-input {
    flex: 1;
    min-width: 160px;
}
@media (max-width: 720px) {
    .pay-qr-grid { grid-template-columns: 1fr; }
    .qr-add-row { flex-direction: column; align-items: stretch; }
    .qr-file { max-width: none; }
}

/* ---------- 支付流程改造：结账页 ---------- */
.checkout-page h2 { margin-bottom: 20px; }
.order-detail {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 22px;
}
.order-detail h3 { margin-bottom: 12px; }
.pay-select { margin-bottom: 20px; }
.pay-select h3 { margin-bottom: 12px; }
.pay-select-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: all .2s;
}
.ps-icon { font-size: 22px; }
.pay-select-btn.alipay { color: #1677ff; border-color: rgba(22, 119, 255, .45); background: rgba(22, 119, 255, .07); }
.pay-select-btn.alipay.active { background: #1677ff; border-color: #1677ff; color: #fff; }
.pay-select-btn.wechat { color: #07c160; border-color: rgba(7, 193, 96, .45); background: rgba(7, 193, 96, .07); }
.pay-select-btn.wechat.active { background: #07c160; border-color: #07c160; color: #fff; }
.pay-select-btn:hover { filter: brightness(1.05); }
.pay-safe-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 18px;
}
.checkout-back { text-align: center; }

/* ---------- 支付流程改造：扫码支付页 ---------- */
.payment-page h2 { text-align: center; margin-bottom: 18px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 8px;
}
.pay-order-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 18px;
}
.pay-order-info strong { color: var(--text); }
.pay-qr-panel {
    max-width: 340px;
    margin: 0 auto 22px;
    padding: 22px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
}
.pay-qr-panel.alipay { background: #e6f1ff; border-color: #1677ff; }
.pay-qr-panel.wechat { background: #e8f9ef; border-color: #07c160; }
.pay-recommend {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
}
.pay-qr-panel.alipay .pay-recommend { color: #1677ff; }
.pay-qr-panel.wechat .pay-recommend { color: #07c160; }
.pay-qr-imgwrap { margin-bottom: 12px; }
.pay-scan-tip { font-size: 13px; color: var(--text-dim); }
.pay-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
    margin: 0 auto;
}
.proof-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    background: transparent;
    border: 2px dashed #ff5a6e;
    color: #ff5a6e;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.proof-upload-btn:hover { background: rgba(255, 90, 110, .06); }
.camera-icon { width: 20px; height: 20px; flex: none; }
.paid-btn { width: 100%; }
.back-home-btn { width: 100%; }

/* ---------- 后台订单支付凭证 ---------- */
.proof-box {
    margin-bottom: 18px;
    padding: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.proof-box h4 { margin-bottom: 10px; }
.proof-preview { text-align: center; margin-bottom: 8px; }
.proof-img {
    max-width: 220px;
    max-height: 220px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}
