/* =========================================================
   M2 充值中心 · 样式表
   深色游戏风：墨蓝底 + 鎏金强调色
   ========================================================= */

:root {
    --bg: #080b12;
    --bg-2: #0c111b;
    --panel: rgba(20, 26, 39, .86);
    --panel-solid: #141a27;
    --panel-2: #1a2130;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);
    --text: #e9eef8;
    --muted: #8c97ac;
    --gold: #f2c469;
    --gold-2: #d79b33;
    --cyan: #55d6c8;
    --green: #46d18a;
    --red: #ff6f6f;
    --amber: #f0b45a;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #ffd98a; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: .2px; }
p { margin: 0; }
ol, ul { margin: 0; padding-left: 18px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.center { text-align: center; }
.right { text-align: right; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.sub-title { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: .4px; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* hidden 属性统一生效（卡片自身没有 display 声明，这里兜底避免被后续样式覆盖） */
[hidden] { display: none !important; }

/* ---------- 背景装饰 ---------- */
.bg-deco {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(900px 480px at 12% -10%, rgba(242, 196, 105, .10), transparent 60%),
        radial-gradient(760px 420px at 92% 0%, rgba(85, 214, 200, .08), transparent 62%),
        radial-gradient(900px 600px at 50% 110%, rgba(80, 110, 220, .10), transparent 65%),
        linear-gradient(180deg, #080b12 0%, #0a0f19 55%, #080b12 100%);
}

/* ---------- 布局 ---------- */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.page { position: relative; z-index: 1; padding-top: 26px; padding-bottom: 60px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 11, 18, .72);
    backdrop-filter: blur(12px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f7d089, #c8892a);
    color: #23170a;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .5px;
    box-shadow: 0 6px 18px rgba(215, 155, 51, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16.5px; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .6px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.contact { color: var(--muted); font-size: 13px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    background: rgba(255, 255, 255, .03);
}
.pill-live i {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(70, 209, 138, .16);
}

/* ---------- Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: end;
    padding: 10px 0 26px;
}
.hero h1 {
    font-size: 40px;
    line-height: 1.15;
    background: linear-gradient(120deg, #fff 10%, #f2c469 55%, #d79b33 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub { margin-top: 10px; color: var(--muted); max-width: 520px; }
.hero-badges { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--gold);
    background: rgba(242, 196, 105, .08);
    border: 1px solid rgba(242, 196, 105, .22);
}
.hero-notice {
    position: relative;
    padding: 14px 16px 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(242, 196, 105, .06), rgba(255, 255, 255, .02));
    color: #d9e1ef;
    font-size: 13.5px;
}
.hero-notice::before {
    content: "";
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--gold), transparent);
}
.hero-notice-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 4px;
}

/* ---------- 卡片 ---------- */
.card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.card-quiet { background: rgba(16, 21, 32, .6); box-shadow: none; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.card-head h2 { font-size: 16px; display: flex; align-items: center; gap: 9px; }
.step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    color: #241705;
    background: linear-gradient(145deg, #f7d089, #d79b33);
}
.hint { margin-top: 12px; font-size: 12.5px; }
.hint.err { color: var(--red); }
.hint-ok { font-size: 12px; color: var(--green); }

/* ---------- 表单 ---------- */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; color: var(--muted); letter-spacing: .3px; }
.input {
    width: 100%;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: rgba(9, 13, 20, .85);
    color: var(--text);
    font-family: inherit;
    font-size: 14.5px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    appearance: none;
}
.input:focus {
    border-color: rgba(242, 196, 105, .55);
    box-shadow: 0 0 0 3px rgba(242, 196, 105, .12);
}
.input[readonly] { color: var(--gold); background: rgba(242, 196, 105, .05); }
select.input {
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}
textarea.input { resize: vertical; }

.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #cfd7e6; }
.check input { width: 15px; height: 15px; accent-color: var(--gold-2); }

/* ---------- 商品 ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
}
.product {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 14px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
    cursor: pointer;
    overflow: hidden;
    transition: transform .16s ease, border-color .16s, box-shadow .16s;
}
.product:hover { transform: translateY(-2px); border-color: rgba(242, 196, 105, .4); }
.product input { position: absolute; opacity: 0; pointer-events: none; }
.product.is-active {
    border-color: rgba(242, 196, 105, .8);
    background: linear-gradient(180deg, rgba(242, 196, 105, .16), rgba(242, 196, 105, .04));
    box-shadow: 0 0 0 1px rgba(242, 196, 105, .25), 0 12px 30px rgba(215, 155, 51, .18);
}
.product.is-active::after {
    content: "✓";
    position: absolute;
    top: 8px; right: 10px;
    font-size: 12px;
    color: var(--gold);
}
.product-credit { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.product-credit em { font-size: 12px; font-weight: 500; font-style: normal; color: var(--muted); margin-left: 4px; }
.product-bonus { font-size: 11.5px; color: var(--gold); min-height: 17px; }
.product-price { margin-top: 6px; font-size: 19px; font-weight: 700; color: var(--gold); }
.product-price i { font-size: 12px; font-style: normal; margin-right: 2px; }
.product-tag {
    position: absolute;
    top: 0; left: 0;
    padding: 2px 9px;
    border-radius: 14px 0 12px 0;
    font-size: 10.5px;
    letter-spacing: .5px;
    color: #2a1c05;
    background: linear-gradient(135deg, #f7d089, #d79b33);
}

/* ---------- 结算条 ---------- */
.paybar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(242, 196, 105, .22);
    background: linear-gradient(180deg, rgba(26, 33, 48, .96), rgba(14, 19, 29, .98));
    box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
    backdrop-filter: blur(14px);
}
.paybar-info { display: flex; flex-direction: column; line-height: 1.3; }
.paybar-price { font-size: 24px; color: var(--gold); letter-spacing: -.5px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .14s, filter .14s, background .14s, border-color .14s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary {
    color: #241705;
    background: linear-gradient(135deg, #f7d089, #d79b33);
    box-shadow: 0 10px 26px rgba(215, 155, 51, .3);
}
.btn-primary:hover { filter: brightness(1.06); color: #241705; }
.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, .04);
    border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-lg { padding: 14px 30px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; margin-top: 6px; }
.btn-danger { color: #fff; background: #a33; }

.mini-btn {
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .04);
    color: #cfd7e6;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
}
.mini-btn:hover { border-color: rgba(242, 196, 105, .5); color: var(--gold); }
.mini-btn.danger:hover { border-color: rgba(255, 111, 111, .5); color: var(--red); }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions form { display: inline; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.row-actions form { display: inline; }

/* ---------- 收银台 ---------- */
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.order-head-main { display: flex; flex-direction: column; gap: 6px; }
.order-amount { font-size: 34px; color: var(--gold); letter-spacing: -1px; }
.countdown { text-align: right; }
.countdown b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--text); }

.channel-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.channel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
    transition: border-color .16s, background .16s;
}
.channel input { position: absolute; opacity: 0; pointer-events: none; }
.channel:hover { border-color: rgba(242, 196, 105, .35); }
.channel.is-active { border-color: rgba(242, 196, 105, .7); background: rgba(242, 196, 105, .07); }
.channel-icon { font-size: 22px; }
.channel-body { display: flex; flex-direction: column; flex: 1; line-height: 1.35; }
.channel-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    position: relative;
}
.channel.is-active .channel-dot { border-color: var(--gold); }
.channel.is-active .channel-dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--gold);
}

/* ---------- 结果页 ---------- */
.result { padding-top: 34px; padding-bottom: 30px; }
.state-icon {
    width: 64px; height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}
.state-done { background: rgba(70, 209, 138, .12); color: var(--green); border: 1px solid rgba(70, 209, 138, .35); }
.state-paid { background: rgba(242, 196, 105, .12); color: var(--gold); border: 1px solid rgba(242, 196, 105, .35); }
.state-pending { background: rgba(140, 151, 172, .12); color: var(--muted); border: 1px solid var(--line-strong); }
.state-closed { background: rgba(255, 111, 111, .1); color: var(--red); border: 1px solid rgba(255, 111, 111, .3); }
.result h2 { font-size: 22px; margin-bottom: 6px; }

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 26px 0 18px;
}
.step-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 12px;
    color: var(--muted);
}
.step-node i {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #232b3c;
    border: 1px solid var(--line-strong);
    z-index: 1;
}
.step-node::before {
    content: "";
    position: absolute;
    top: 7px;
    left: -50%;
    width: 100%;
    height: 1px;
    background: var(--line-strong);
}
.step-node:first-child::before { display: none; }
.step-node.is-done { color: var(--green); }
.step-node.is-done i { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px rgba(70, 209, 138, .12); }
.step-node.is-done::before { background: rgba(70, 209, 138, .5); }
.step-node.is-current { color: var(--gold); }
.step-node.is-current i { background: var(--gold); border-color: var(--gold); animation: pulse 1.6s infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 196, 105, .35); }
    50% { box-shadow: 0 0 0 7px rgba(242, 196, 105, 0); }
}

/* ---------- 详情列表 ---------- */
.detail { margin: 0; display: grid; gap: 11px; }
.detail > div { display: flex; gap: 16px; align-items: baseline; }
.detail dt { flex: 0 0 92px; color: var(--muted); font-size: 13px; }
.detail dd { margin: 0; flex: 1; word-break: break-all; }
.detail-compact { gap: 9px; }
.detail-compact dt { flex-basis: 80px; }

/* ---------- 提示 ---------- */
.flash {
    margin-bottom: 16px;
    padding: 11px 15px;
    border-radius: 11px;
    font-size: 13.5px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .04);
    position: relative;
    z-index: 1;
}
.flash-ok { border-color: rgba(70, 209, 138, .35); background: rgba(70, 209, 138, .08); color: #b7f0d2; }
.flash-err { border-color: rgba(255, 111, 111, .35); background: rgba(255, 111, 111, .08); color: #ffc7c7; }

/* ---------- 说明 ---------- */
.rules { display: grid; gap: 7px; color: #c3ccdc; font-size: 13.5px; }
.rules b { color: var(--gold); font-weight: 600; }

.empty {
    padding: 34px 10px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--line);
    padding: 22px 0 34px;
    text-align: center;
    font-size: 12.5px;
    color: #7b8699;
}
.footer p + p { margin-top: 4px; }

/* =========================================================
   后台
   ========================================================= */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: #0a0e16;
}
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 224px;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    background: #0c1119;
    border-right: 1px solid var(--line);
    z-index: 20;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px; }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand small { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #aab5c8;
    font-size: 14px;
}
.sidebar-link i { font-style: normal; width: 16px; text-align: center; opacity: .8; }
.sidebar-link:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.sidebar-link.is-active {
    background: linear-gradient(90deg, rgba(242, 196, 105, .16), rgba(242, 196, 105, .03));
    color: var(--gold);
    box-shadow: inset 2px 0 0 var(--gold);
}
.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px 4px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
}
.sidebar-foot a { color: var(--muted); }
.sidebar-foot a:hover { color: var(--gold); }

.admin-main {
    flex: 1;
    margin-left: 224px;
    padding: 22px 26px 50px;
    min-width: 0;
}
.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 14px;
}
.admin-top h1 { font-size: 21px; }
.admin-top-right { display: flex; align-items: center; gap: 10px; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.admin-content { display: flex; flex-direction: column; gap: 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat {
    padding: 15px 16px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel-solid);
}
.stat-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat strong { display: block; font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.stat small { display: block; margin-top: 4px; font-size: 11.5px; }
.stat-warn { border-color: rgba(240, 180, 90, .3); background: rgba(240, 180, 90, .06); }

.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.split > .stack { display: flex; flex-direction: column; gap: 18px; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 168px; padding-top: 22px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar {
    width: 100%;
    max-width: 42px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, rgba(242, 196, 105, .85), rgba(215, 155, 51, .25));
    min-height: 2px;
    transition: height .3s;
}
.bar-value { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bar-label { font-size: 11px; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 0 -6px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    font-weight: 500;
    font-size: 12px;
    color: var(--muted);
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 11px 10px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .022); }
.table a { color: #dbe3f1; }
.table a:hover { color: var(--gold); }

.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    border: 1px solid var(--line-strong);
    color: #c8d2e2;
    white-space: nowrap;
}
.tag-green { color: #9fe9c0; border-color: rgba(70, 209, 138, .35); background: rgba(70, 209, 138, .08); }
.tag-amber { color: #ffd79a; border-color: rgba(240, 180, 90, .38); background: rgba(240, 180, 90, .09); }
.tag-red { color: #ffb3b3; border-color: rgba(255, 111, 111, .35); background: rgba(255, 111, 111, .08); }
.tag-gray { color: #b9c3d4; border-color: var(--line-strong); }
.tag-slate { color: #8d98ab; border-color: var(--line); }
.tag-gold { color: var(--gold); border-color: rgba(242, 196, 105, .35); background: rgba(242, 196, 105, .08); margin-left: 6px; }

.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { width: auto; min-width: 150px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; align-items: center; }
.pager-link {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    color: #b9c3d4;
    font-size: 13px;
}
.pager-link.is-active { border-color: rgba(242, 196, 105, .6); color: var(--gold); background: rgba(242, 196, 105, .08); }

.link { font-size: 13px; }
.log-detail summary { cursor: pointer; color: #b9c3d4; }
.log-pre {
    margin: 8px 0 0;
    padding: 10px;
    border-radius: 8px;
    background: #0a0e16;
    border: 1px solid var(--line);
    font-size: 11.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 220px;
    overflow: auto;
    color: #a9b5c8;
}

/* ---------- 登录 ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}
.login-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 30px 28px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .brand-mark { margin: 0 auto 12px; width: 46px; height: 46px; }
.login-brand h1 { font-size: 19px; }
.login-brand p { font-size: 12px; margin-top: 2px; letter-spacing: 2px; }

code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .06);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 16px; }
    .hero h1 { font-size: 30px; }
    .split { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar {
        position: static;
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .sidebar-brand { padding: 0 8px 0 0; }
    .sidebar-brand div { display: none; }
    .sidebar-nav { flex-direction: row; gap: 4px; }
    .sidebar-link { white-space: nowrap; padding: 8px 10px; font-size: 13px; }
    .sidebar-link.is-active { box-shadow: none; }
    .sidebar-foot { display: none; }
    .admin-body { flex-direction: column; }
    .admin-main { margin-left: 0; padding: 16px; }
}

@media (max-width: 620px) {
    .wrap { padding: 0 14px; }
    .topbar-right .contact { display: none; }
    .role-grid, .form-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product { padding: 14px 12px 12px; }
    .product-credit { font-size: 22px; }
    .paybar { bottom: 10px; padding: 12px 14px; }
    .paybar-price { font-size: 20px; }
    .btn-lg { padding: 12px 20px; font-size: 14.5px; }
    .order-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .countdown { text-align: left; }
    .detail > div { flex-direction: column; gap: 2px; }
    .detail dt { flex-basis: auto; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .card { padding: 17px; border-radius: 14px; }
    .steps { margin: 20px 0 14px; }
}

/* =========================================================
   扫码支付面板
   ========================================================= */
.qr-box {
    position: relative;
    width: 248px;
    height: 248px;
    margin: 6px auto 14px;
    padding: 8px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-box canvas, .qr-box img { display: block; border-radius: 6px; }
.qr-mask {
    position: absolute;
    inset: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    color: #6b7280;
    font-size: 13px;
    border-radius: 8px;
}
.qr-amount { margin: 4px 0 2px; font-size: 26px; color: var(--gold); letter-spacing: .5px; }
.qr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.qr-actions .mini-btn { text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }

/* 游戏跳转进来时的角色摘要（不用再选角色） */
.role-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.role-summary > div { display: flex; flex-direction: column; gap: 3px; }
.role-summary b { color: var(--text); font-size: 15px; }
.role-summary .mini-btn { margin-left: auto; text-decoration: none; }
@media (max-width: 620px) {
    .role-summary { gap: 12px; }
    .role-summary .mini-btn { margin-left: 0; }
}
#qr-canvas svg { display: block; width: 232px; height: 232px; }
/* 微信里渲染的是位图 <img>（长按识别只认位图），按原始像素显示，禁止浏览器二次缩放 */
#qr-canvas img { display: block; width: auto; max-width: 232px; height: auto; image-rendering: pixelated; }

/* ---------- 自定义金额 ---------- */
.product-custom .product-credit { font-size: 22px; }
.product-custom.is-active::after { content: "✓"; }
.custom-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed rgba(242, 196, 105, .38);
    border-radius: var(--radius-sm);
    background: rgba(242, 196, 105, .05);
}
.custom-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.custom-input { position: relative; display: flex; align-items: center; }
.custom-input .custom-cur {
    position: absolute;
    left: 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--gold);
    pointer-events: none;
}
.custom-input .input {
    padding-left: 34px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .3px;
}
.custom-input .input::-webkit-outer-spin-button,
.custom-input .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-amount {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .04);
    color: #cfd7e6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.quick-amount:hover {
    border-color: rgba(242, 196, 105, .55);
    color: var(--gold);
    background: rgba(242, 196, 105, .1);
}
#custom-tip { margin-top: 10px; }
#custom-tip b { color: var(--gold); font-size: 15px; }
.err-text { color: var(--red); }
.demo-note {
    margin: 12px auto 0;
    max-width: 340px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(240, 180, 90, .45);
    background: rgba(240, 180, 90, .12);
    color: var(--amber);
    font-size: 12px;
    line-height: 1.6;
}
.demo-card {
    border: 1px solid rgba(240, 180, 90, .5);
    background: linear-gradient(180deg, rgba(240, 180, 90, .12), rgba(240, 180, 90, .03));
}
.demo-card h2 { font-size: 17px; margin-bottom: 8px; color: var(--amber); }
.demo-card p { margin: 6px 0; line-height: 1.7; }
.demo-card code {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
}
