/* =========================================================
   云卡发卡 · 商城前台样式 v1.1
   普通官网 / 商城风格：白底、蓝色主色、简洁卡片
   ========================================================= */

:root {
    --brand: #1677ff;
    --brand-dark: #0958d9;
    --brand-light: #e8f1ff;
    --brand-soft: #f3f8ff;
    --ink: #1f2329;
    --ink-2: #4e5969;
    --muted: #86909c;
    --line: #e5e6eb;
    --line-strong: #d0d3d9;
    --bg: #f5f6f8;
    --card: #ffffff;
    --success: #00a870;
    --warning: #d97706;
    --danger: #e5484d;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow: 0 4px 16px rgba(16, 24, 40, .08);
    --shadow-hover: 0 12px 28px rgba(16, 24, 40, .12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.hide-sm { display: inline-flex; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.strong { font-weight: 600; color: var(--ink); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- 顶部导航 ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff; font-size: 17px; font-weight: 700;
    letter-spacing: 0;
}
.brand-mark.sm { width: 32px; height: 32px; font-size: 14px; border-radius: 7px; }
.brand-logo { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.brand-text small { color: var(--muted); font-size: 11px; }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--ink-2); flex-shrink: 0; }
.nav-links a { padding: 6px 0; position: relative; }
.nav-links a:hover { color: var(--brand); }
.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: 300px;
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.nav-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, .1); }
.nav-search-icon {
    width: 16px; height: 16px;
    margin-left: 12px;
    position: relative;
    flex-shrink: 0;
}
.nav-search-icon::before {
    content: ""; position: absolute; left: 0; top: 0;
    width: 10px; height: 10px; border: 1.5px solid #a9b0bb; border-radius: 50%;
}
.nav-search-icon::after {
    content: ""; position: absolute; right: 0; bottom: 1px;
    width: 6px; height: 1.5px; background: #a9b0bb; transform: rotate(45deg);
}
.nav-search input {
    flex: 1; min-width: 0;
    border: 0; outline: 0; background: transparent;
    padding: 0 8px; font-size: 13px;
}
.nav-search button {
    align-self: stretch;
    border: 0;
    padding: 0 16px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.nav-search button:hover { background: var(--brand-dark); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-burger { display: none; width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 0; cursor: pointer; }
.nav-burger span { display: block; width: 16px; height: 1.5px; background: var(--ink-2); margin: 3px auto; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-primary { background: var(--brand); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { background: #f7f8fa; color: var(--brand); border-color: #bcd7ff; }
.btn-muted { background: #f2f3f5; color: var(--ink-2); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #cf3a3f; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link { color: var(--brand); font-size: 13px; }
.link:hover { color: var(--brand-dark); text-decoration: underline; }
.inline-form { display: inline-flex; align-items: center; }
.inline-form .link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------- 页面与卡片 ---------- */
.page { padding: 24px 0 64px; min-height: 60vh; }
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title h3 { font-size: 16px; }
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-head h1 { font-size: 24px; line-height: 1.35; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.eyebrow { font-size: 12px; color: var(--brand); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.section-gap { margin-top: 40px; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin: 30px 0 16px; flex-wrap: wrap;
}
.section-head h2 { font-size: 20px; }
.section-head p { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- 首页 ---------- */
.hero-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    gap: 24px;
    align-items: stretch;
    padding: 40px;
    border-radius: 12px;
    background:
        linear-gradient(120deg, #eaf3ff 0%, #f6faff 55%, #ffffff 100%);
    border: 1px solid #dbeafe;
}
.hero-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #c9ddff;
    color: var(--brand);
    font-size: 12px;
    margin-bottom: 14px;
}
.hero-copy h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.3; letter-spacing: -.02em; }
.hero-copy p { color: var(--ink-2); font-size: 14px; max-width: 520px; margin-top: 12px; }
.hero-search {
    display: flex;
    max-width: 540px;
    height: 46px;
    margin-top: 22px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
}
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 16px; font-size: 14px; }
.hero-search button { border: 0; background: var(--brand); color: #fff; padding: 0 24px; cursor: pointer; font-size: 14px; }
.hero-search button:hover { background: var(--brand-dark); }
.hero-keywords { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.hero-keywords span { color: var(--muted); }
.hero-keywords a { color: var(--ink-2); padding: 2px 0; border-bottom: 1px solid transparent; }
.hero-keywords a:hover { color: var(--brand); border-color: var(--brand); }
.hero-side { display: grid; grid-template-rows: repeat(3, 1fr); gap: 10px; }
.hero-point {
    background: #fff;
    border: 1px solid #e3edff;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.hero-point strong { font-size: 24px; color: var(--brand); font-weight: 700; letter-spacing: -.02em; }
.hero-point span { color: var(--muted); font-size: 13px; }

.perk-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 16px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.perk { background: #fff; padding: 14px 18px; }
.perk strong { display: block; font-size: 13px; font-weight: 600; }
.perk span { color: var(--muted); font-size: 12px; }

.notice-strip {
    display: flex; align-items: center; gap: 12px;
    margin-top: 16px; padding: 11px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 13px;
}
.notice-label { flex-shrink: 0; font-size: 12px; color: var(--brand); font-weight: 600; padding-right: 12px; border-right: 1px solid var(--line); }
.notice-strip .body { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-card span { display: inline-block; color: var(--brand); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.step-card h3 { font-size: 15px; margin-bottom: 4px; }
.step-card p { color: var(--muted); font-size: 13px; }

.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.help-card { padding: 18px; }
.help-card h3 { font-size: 15px; margin-bottom: 6px; }
.help-card p { color: var(--muted); font-size: 13px; }
.help-date { margin-top: 10px !important; font-size: 12px !important; color: #a9b0bb !important; }

/* ---------- 分类与商品 ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    display: inline-flex; align-items: center;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-2);
    font-size: 13px;
    transition: .15s;
}
.pill:hover { border-color: #bcd7ff; color: var(--brand); }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.product {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.product:hover { border-color: #c9ddff; box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.product-cover { position: relative; aspect-ratio: 1 / 1; background: #f2f4f7; overflow: hidden; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product:hover .product-cover img { transform: scale(1.03); }
.cover-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #f0f6ff;
    color: #b7d3ff;
    font-size: 44px; font-weight: 700;
}
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-title {
    font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 42px;
}
.product-merchant { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.merchant-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.price { color: #fa3534; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.price small { font-size: 12px; font-weight: 600; margin-right: 1px; }
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 12px; font-weight: 500;
    white-space: nowrap;
}
.badge.success { background: #e8fff4; color: #00875a; }
.badge.muted { background: #f2f3f5; color: #86909c; }
.badge.warning { background: #fff7e8; color: #b45309; }
.badge.danger { background: #fff1f0; color: #cf1322; }
.badge.info { background: #eaf3ff; color: #0958d9; }

/* ---------- 商品详情 ---------- */
.crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.crumb a:hover { color: var(--brand); }
.crumb em { font-style: normal; color: var(--ink-2); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "gallery buy" "desc buy"; gap: 24px; align-items: start; }
.detail-gallery { grid-area: gallery; min-width: 0; }
.detail-cover {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.detail-cover .cover-fallback { aspect-ratio: 4 / 3; font-size: 72px; }
.detail-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-panel { grid-area: desc; margin-top: 0; }
.detail-desc { color: var(--ink-2); font-size: 14px; white-space: pre-wrap; line-height: 1.8; }
.detail-note {
    margin-top: 16px; padding: 12px 14px;
    background: var(--brand-soft); border: 1px dashed #bcd7ff;
    border-radius: var(--radius-sm); color: var(--ink-2); font-size: 13px;
}
.buy-panel {
    grid-area: buy;
    position: sticky; top: 80px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow-sm);
}
.detail-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-title { font-size: 22px; line-height: 1.4; }
.detail-sub { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 6px; }
.detail-price-box {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    margin: 16px 0; padding: 14px;
    background: #fff7f7; border: 1px solid #ffe0e0; border-radius: var(--radius-sm);
}
.detail-price-label { color: var(--muted); font-size: 12px; }
.detail-stock { margin-left: auto; color: var(--muted); font-size: 12px; }
.buy-form { margin-top: 6px; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-row span { color: var(--muted); font-size: 12px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea, .search-row input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    outline: 0;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .search-row input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .1);
}
.field textarea { resize: vertical; line-height: 1.7; }
.field .hint { margin-top: 5px; color: var(--muted); font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.search-row { display: flex; gap: 8px; align-items: center; }
.search-row input { flex: 1; }
.search-row .btn { flex-shrink: 0; }
.cover-preview { margin: 4px 0 14px; }
.cover-preview img { width: 132px; height: 132px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qr-thumb { width: 54px; height: 54px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: #fff; }

/* ---------- 提示 / 空状态 ---------- */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: #f0fff7; border-color: #b7ebd2; color: #00875a; }
.alert-danger { background: #fff1f0; border-color: #ffccc7; color: #cf1322; }
.alert-warning { background: #fffbe6; border-color: #ffe58f; color: #ad6800; }
.alert-info { background: #eaf3ff; border-color: #bcd7ff; color: #0958d9; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.pay-tip { color: var(--muted); font-size: 12px; text-align: center; margin-top: 10px; }
.total-row {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 14px 0; border-top: 1px solid var(--line); margin-top: 6px;
    color: var(--muted); font-size: 13px;
}
.total-row strong { font-size: 24px; color: #fa3534; font-weight: 700; }

/* ---------- 登录注册 ---------- */
.auth-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 0; }
.auth-card { width: min(440px, 100%); padding: 30px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-alt { margin-top: 16px; color: var(--muted); font-size: 13px; }
.auth-alt a { color: var(--brand); }
.auth-side { width: min(440px, 100%); color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- 支付页 ---------- */
.pay-wrap { max-width: 720px; margin: 0 auto; }
.pay-amount { text-align: center; padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.pay-amount small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.pay-amount .price { font-size: 34px; }
.pay-order { display: grid; gap: 6px; padding: 14px 0; color: var(--muted); font-size: 13px; }
.pay-order b { color: var(--ink-2); font-weight: 500; }
.pay-channels { display: grid; gap: 10px; margin: 8px 0 18px; }
.pay-channel {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.pay-channel:hover { border-color: #bcd7ff; background: var(--brand-soft); }
.pay-channel.active { border-color: var(--brand); background: var(--brand-soft); }
.pay-channel input { margin: 0; accent-color: var(--brand); }
.pay-channel strong { font-size: 14px; font-weight: 500; }
.pay-channel span { color: var(--muted); font-size: 12px; }

/* ---------- 用户 / 商家中心 ---------- */
.user-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.side-menu { padding: 0; overflow: hidden; position: sticky; top: 80px; }
.side-menu .profile { display: flex; align-items: center; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--brand-light); color: var(--brand-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.side-menu .profile strong { display: block; font-size: 14px; }
.side-menu .profile small { color: var(--muted); font-size: 11px; }
.side-menu > a { display: block; padding: 12px 18px; color: var(--ink-2); font-size: 13px; border-bottom: 1px solid #f2f3f5; }
.side-menu > a:hover { background: #f7f9fc; color: var(--brand); }
.side-menu > a.active { color: var(--brand); background: var(--brand-soft); border-left: 3px solid var(--brand); padding-left: 15px; font-weight: 500; }
.side-menu > a:last-child { border-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat span { display: block; color: var(--muted); font-size: 12px; }
.stat strong { display: block; font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat.accent strong { color: var(--brand); }

.merchant-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #0f62e6, #2f8cff);
    color: #fff;
}
.merchant-banner h1 { color: #fff; font-size: 24px; margin-top: 2px; }
.merchant-banner p { color: rgba(255, 255, 255, .82); font-size: 13px; margin-top: 4px; }
.wallet { text-align: right; }
.wallet small { display: block; font-size: 12px; color: rgba(255,255,255,.8); }
.wallet strong { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.status-blocker { max-width: 640px; margin: 20px auto; text-align: center; }
.status-blocker h2 { font-size: 22px; }
.status-blocker p { color: var(--muted); margin-top: 8px; }

/* ---------- 订单 ---------- */
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.order-head h3 { font-size: 18px; }
.order-no { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.kv > div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kv > div:nth-child(3n) { border-right: 0; }
.kv > div:nth-last-child(-n+3) { border-bottom: 0; }
.kv span { display: block; color: var(--muted); font-size: 11px; }
.kv strong { display: block; color: var(--ink-2); font-size: 13px; font-weight: 500; margin-top: 2px; word-break: break-all; }
.card-secret { margin-top: 16px; padding: 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.card-secret .label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.card-text {
    width: 100%; min-height: 130px; padding: 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px; line-height: 1.7; resize: vertical;
}
.order-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #f7f8fa; color: var(--ink-2); font-weight: 500; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid #f2f3f5; color: var(--ink-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table .link { white-space: nowrap; }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager-item { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink-2); font-size: 13px; }
.pager-item:hover { border-color: #bcd7ff; color: var(--brand); }
.pager-item.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-gap { padding: 0 4px; color: var(--muted); align-self: center; }

/* ---------- 富文本 ---------- */
.prose { color: var(--ink-2); font-size: 14px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 30px 0; margin-top: 20px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: flex-start; gap: 10px; }
.footer-brand strong { font-size: 14px; }
.footer-brand p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; }
.footer-links a:hover { color: var(--brand); }
.footer-meta { color: var(--muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 客服与提示 ---------- */
.service-dock { position: fixed; right: 18px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.service-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow); color: var(--ink-2); font-size: 13px; }
.service-btn:hover { border-color: #bcd7ff; color: var(--brand); }
.service-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.service-qq { color: var(--muted); font-size: 11px; }
.toast {
    position: fixed; left: 50%; top: 80px; transform: translateX(-50%);
    z-index: 120; display: flex; align-items: center; gap: 8px;
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
    box-shadow: var(--shadow);
    font-size: 13px; color: var(--ink-2);
}
.toast-icon { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.toast-success .toast-icon { background: var(--success); }
.toast-danger .toast-icon { background: var(--danger); }
.toast-warning .toast-icon { background: var(--warning); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .nav-search { width: 230px; }
    .nav-links { gap: 14px; }
    .hero-banner { grid-template-columns: 1fr; padding: 28px; }
    .hero-side { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); }
    .perk-bar { grid-template-columns: repeat(2, 1fr); }
    .step-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
}

@media (max-width: 820px) {
    .nav-links { display: none; }
    .nav-search { display: none; }
    .nav-burger { display: block; margin-left: 8px; }
    .nav-actions { margin-left: auto; }
    .nav.open .nav-links {
        display: flex; flex-direction: column; align-items: flex-start;
        position: absolute; left: 0; right: 0; top: 64px;
        gap: 0; padding: 6px 16px 12px;
        background: #fff; border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .nav.open .nav-links a { width: 100%; padding: 11px 4px; border-bottom: 1px solid #f2f3f5; }
    .nav.open .nav-links a:last-child { border-bottom: 0; }
    .detail-grid { grid-template-columns: 1fr; grid-template-areas: "gallery" "buy" "desc"; gap: 16px; }
    .buy-panel { position: static; }
    .user-grid { grid-template-columns: 1fr; }
    .side-menu { position: static; display: flex; flex-wrap: wrap; }
    .side-menu .profile { width: 100%; border-bottom: 1px solid var(--line); }
    .side-menu > a { flex: 1 1 auto; border-bottom: 0; border-left: 0 !important; padding: 10px 12px !important; text-align: center; }
    .side-menu > a.active { border-bottom: 2px solid var(--brand); background: transparent; }
    .kv { grid-template-columns: 1fr 1fr; }
    .kv > div:nth-child(3n) { border-right: 1px solid var(--line); }
    .kv > div:nth-child(2n) { border-right: 0; }
    .kv > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
    .kv > div:last-child { border-bottom: 0; }
}

@media (max-width: 640px) {
    .container { width: calc(100% - 24px); }
    .nav-inner { height: 58px; gap: 10px; }
    .brand-mark, .brand-logo { width: 34px; height: 34px; }
    .brand-text strong { font-size: 15px; }
    .brand-text small { display: none; }
    .hide-sm { display: none !important; }
    .nav.open .nav-links { top: 58px; }
    .page { padding: 16px 0 48px; }
    .panel { padding: 16px; }
    .hero-banner { padding: 22px 18px; border-radius: 10px; }
    .hero-copy h1 { font-size: 26px; }
    .hero-copy p { font-size: 13px; }
    .hero-search { height: 42px; margin-top: 16px; }
    .hero-search button { padding: 0 16px; font-size: 13px; }
    .hero-side { grid-template-columns: 1fr; }
    .hero-point { padding: 12px 14px; }
    .hero-point strong { font-size: 20px; }
    .perk-bar { grid-template-columns: 1fr 1fr; }
    .perk { padding: 12px 14px; }
    .step-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .step-card { padding: 14px; }
    .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-body { padding: 10px; gap: 6px; }
    .product-title { font-size: 13px; min-height: 39px; }
    .price { font-size: 19px; }
    .product-merchant { font-size: 11px; }
    .section-head { margin: 22px 0 12px; }
    .section-head h2 { font-size: 18px; }
    .pills { gap: 6px; }
    .pill { padding: 5px 11px; font-size: 12px; }
    .detail-title { font-size: 19px; }
    .detail-price-box { padding: 12px; }
    .kv { grid-template-columns: 1fr; }
    .kv > div, .kv > div:nth-child(2n), .kv > div:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
    .kv > div:last-child { border-bottom: 0; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .auth-card { padding: 22px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .merchant-banner { padding: 18px; flex-direction: column; align-items: flex-start; }
    .wallet { text-align: left; }
    .footer-inner { flex-direction: column; gap: 14px; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .table tr:last-child { border-bottom: 0; }
    .table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
    .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex-shrink: 0; }
    .table td.empty { display: block; text-align: center; padding: 30px 0; }
    .table td.empty::before { content: none; }
    .table td.actions { justify-content: flex-end; }
    .table td.actions::before { margin-right: auto; }
    .service-dock { right: 12px; bottom: 14px; }
    .toast { top: 68px; }
    .pay-amount .price { font-size: 30px; }
}

/* ---------- 补充组件 ---------- */
.merchant-apply-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-cell > div { min-width: 0; }
.thumb-sm { width: 42px; height: 42px; border-radius: 5px; object-fit: cover; border: 1px solid var(--line); background: #f2f4f7; flex-shrink: 0; }
.thumb-fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--brand); font-weight: 700; font-size: 14px; }
@media (max-width: 820px) {
    .merchant-apply-grid { grid-template-columns: 1fr; }
}

/* ---------- 订单批量清理 ---------- */
.scope-select { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.scope-select select { padding: 6px 8px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #1d2939; }
.batch-tip { margin: 0 0 12px; font-size: 12px; color: #667085; line-height: 1.6; }
.batch-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.batch-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.batch-count { color: var(--muted); font-size: 13px; }
.col-check { width: 48px; }
.table input[type="checkbox"] { accent-color: var(--brand); width: 15px; height: 15px; }
.btn-link-danger { color: var(--danger); }
@media (max-width: 720px) {
    .batch-bar { gap: 10px; }
    .col-check { width: 36px; }
}
.query-form { flex-wrap: wrap; }
.captcha-row { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 220px; }
.captcha-row input { flex: 1; min-width: 90px; }
.captcha-img { width: 120px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #f8f9fc; cursor: pointer; }
@media (max-width: 640px) {
    .captcha-row { min-width: 100%; }
    .captcha-img { width: 110px; height: 42px; }
}
