/* ============================================================
   数字资产发卡商城 · Stripe 蓝设计系统
   风格：Stripe 质感（蓝色主色）· 渐变网格背景 · 精致多层阴影
        适中圆角 · ease-out 流畅动画 · 按钮高光上浮 · 卡片悬浮
   ============================================================ */

:root {
    /* 品牌色板（蓝色替代 Stripe 紫） */
    --brand: #2e6bff;
    --brand-strong: #1e5ae0;
    --brand-soft: #eef3ff;
    --brand-grad: linear-gradient(135deg, #2e6bff 0%, #00d4ff 100%);
    --accent: #00d4ff;
    --accent-soft: #e0faff;
    --navy: #0a2540;

    /* 中性色（Stripe 背景 #f6f9fc / 深蓝文字 #0a2540） */
    --bg: #f6f9fc;
    --bg-deep: #eef2f8;
    --surface: #ffffff;
    --surface-soft: #f8fafd;
    --ink: #0a2540;
    --ink-soft: #435466;
    --muted: #7a8699;
    --line: #e8edf3;
    --line-strong: #d0d7e1;

    /* 语义色 */
    --success: #17b26a;
    --success-soft: #e9f9f0;
    --warning: #e8862d;
    --warning-soft: #fff3e6;
    --danger: #e5484d;
    --danger-soft: #fdeeee;

    /* Stripe 精致多层阴影 */
    --shadow-sm: 0 1px 2px rgba(10, 37, 64, .05);
    --shadow-md: 0 2px 4px rgba(10, 37, 64, .04), 0 8px 16px rgba(10, 37, 64, .08);
    --shadow-lg: 0 4px 8px rgba(10, 37, 64, .06), 0 16px 32px rgba(10, 37, 64, .10);
    --shadow-hover: 0 12px 30px rgba(10, 37, 64, .08);
    --shadow-brand: 0 2px 4px rgba(46, 107, 255, .20), 0 4px 8px rgba(46, 107, 255, .20);
    /* 按钮 Liquid Gradient Focus：外层辉光 + inset 高光（凸面质感） */
    --shadow-btn: 0 2px 5px rgba(46, 107, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
    /* 按钮按压：inset 凹面阴影替代外辉光（Hairline Crispness） */
    --shadow-press: inset 0 2px 4px rgba(10, 37, 64, .2);

    /* 适中圆角：rounded-lg / rounded-xl */
    --radius-sm: 8px;
    --radius: 12px;

    /* 字体：专业系统栈（避免过度使用的 Inter/Roboto/Geist） */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

    /* Stripe 动画：ease-out，出发快、落地轻 */
    --ease: ease-out;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* 渐变网格背景（技术感） */
    background-color: var(--bg);
    background-image:
        linear-gradient(to right, rgba(46, 107, 255, .055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(46, 107, 255, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4 {
    margin: 0;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--ink);
}

p {
    margin: 0;
}

img {
    max-width: 100%;
}

/* ---------- 顶栏（Stripe 导航：纯白 + 细边框 + 细阴影） ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(10, 37, 64, .04);
}

.topbar-inner,
.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.topbar-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.2px;
}

/* 早期文字站名的蓝色渐变装饰块：现品牌区已使用图片 logo，不再显示 */
.brand::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand);
    display: none;
}

.brand img {
    height: 26px;
    border-radius: 6px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* 导航内紧凑搜索框 */
.nav .nav-search {
    margin: 0 2px 0 6px;
    position: relative;
}
.nav .nav-search input {
    width: 150px;
    min-height: 38px;
    padding: 0 12px 0 32px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), width 200ms var(--ease);
}
.nav .nav-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .18);
}
.nav .nav-search::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -7px;
    border: 1.6px solid var(--muted);
    border-radius: 50%;
    box-sizing: border-box;
}
.nav .nav-search::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 50%;
    width: 5px;
    height: 1.6px;
    margin-top: 3px;
    background: var(--muted);
    transform: rotate(45deg);
}
@media (max-width: 760px) {
    .nav .nav-search {
        order: 10;
        width: 100%;
    }
    .nav .nav-search input {
        width: 100%;
    }
}

.nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 600;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}

.nav a:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.nav a.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

/* ---------- 容器 / 区域 ---------- */

.container {
    padding: 28px 0 64px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 30px 0 18px;
}

.toolbar h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.toolbar p {
    margin-top: 4px;
}

.section-recommended,
.section-hot {
    margin: 8px 0;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 320px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 26px;
    /* 局部网格增强技术感 */
    background-image:
        linear-gradient(to right, rgba(46, 107, 255, .08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(46, 107, 255, .08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: left top;
}

.hero-copy {
    padding: 42px 0 30px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(46, 107, 255, .22);
    border-radius: 999px;
    color: var(--brand-strong);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 16px 0 14px;
    font-size: clamp(38px, 6vw, 60px);
    line-height: 1.06;
    letter-spacing: -1.2px;
    color: var(--navy);
}

.hero p {
    max-width: 620px;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-panel {
    position: relative;
    display: grid;
    gap: 16px;
    align-content: end;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--surface);
    /* 渐变网格背景（技术感） */
    background-image:
        linear-gradient(to right, rgba(46, 107, 255, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(46, 107, 255, .06) 1px, transparent 1px);
    background-size: 26px 26px;
    color: var(--ink);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 400ms var(--ease), box-shadow 400ms var(--ease), border-color 400ms var(--ease);
}

.hero-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(46, 107, 255, .30);
    box-shadow: var(--shadow-hover);
}

/* —— Hero 右侧：支付渠道展示（内容融入 hero-panel 容器） —— */
.hp-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    width: 100%;
}

/* 顶部流光描边（挂在外层容器上，作为唯一卡面动效） */
.hero-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: -45%;
    width: 190%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2e6bff, #00d4ff, transparent);
    animation: hpFlow 3s ease-out infinite;
}

@keyframes hpFlow {
    0% { transform: translateX(-38%); opacity: .7; }
    100% { transform: translateX(38%); opacity: .7; }
}

/* 卡头：PAYMENT STACK + 三脉冲点 */
.hp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hp-card-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--muted);
}

.hp-card-dots {
    display: flex;
    gap: 4px;
}

.hp-card-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
    opacity: .45;
    animation: hpCardDot 2.4s var(--ease) infinite;
}

.hp-card-dots i:nth-child(2) { animation-delay: .3s; }
.hp-card-dots i:nth-child(3) { animation-delay: .6s; }

@keyframes hpCardDot {
    0%, 100% { opacity: .45; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.35); }
}

/* 统计格：成交订单 / 合作伙伴 / 成交金额（三列并排） */
.hp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.hp-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 13px 4px 11px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease), background 300ms var(--ease);
}

.hp-stat-item:hover {
    transform: translateY(-3px);
    border-color: rgba(46, 107, 255, .4);
    background: #fff;
    box-shadow: 0 6px 14px rgba(46, 107, 255, .14);
}

.hp-stat-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-stat-label {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

.hp-card-foot {
    margin: 11px 0 0;
    font-size: 11.5px;
    color: var(--ink-soft);
    text-align: center;
    border-top: 1px dashed var(--line);
    padding-top: 9px;
}

.hp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-panel h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.12;
    color: var(--ink);
    letter-spacing: -.4px;
}

.hero-panel p {
    color: var(--ink-soft);
    font-size: 13.5px;
}

/* 支付徽章：白色小卡 + 青色点缀 + 错峰浮动动画 */
.hp-badges {
    display: flex;
    gap: 9px;
    flex-shrink: 0;
}

.hp-badge {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--brand);
    box-shadow: var(--shadow-sm);
    animation: floatY 3.2s var(--ease) infinite;
}

.hp-badge svg {
    width: 20px;
    height: 20px;
}

.hp-badge.b2 {
    color: var(--accent);
    animation-delay: .45s;
}

.hp-badge.b3 {
    color: var(--brand-strong);
    animation-delay: .9s;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.signal {
    min-height: 82px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(4px);
}

.signal strong {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.signal span {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

/* 浅色变体（首页 hero 右侧白卡内 / 商品详情页）：白底 + 蓝色图标 + hover 上浮 */
.signal-grid.light .signal {
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    transition: transform 400ms var(--ease), box-shadow 400ms var(--ease), border-color 400ms var(--ease);
}

.signal-grid.light .signal:hover {
    transform: translateY(-3px);
    border-color: rgba(46, 107, 255, .35);
    box-shadow: var(--shadow-md);
}

.signal-grid.light .signal strong {
    color: var(--ink);
    font-size: 15px;
}

.signal-grid.light .signal span {
    color: var(--muted);
    font-size: 12px;
}

.signal-grid.light .signal svg {
    width: 20px;
    height: 20px;
    color: var(--brand);
    margin-bottom: 5px;
}

.signal-grid.light .signal:nth-child(2) svg { color: var(--accent); }
.signal-grid.light .signal:nth-child(3) svg { color: var(--brand-strong); }
.signal-grid.light .signal:nth-child(4) svg { color: #7a73ff; }

/* ---------- 搜索 ---------- */

.search-bar {
    margin: 0 0 22px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 220px;
    min-height: 46px;
    font-size: 15px;
}

/* ---------- 网格 / 卡片（Floating Matrix 悬浮） ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
    gap: 14px;
}

.card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-md);
}

.card {
    position: relative;
    min-height: 252px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 400ms var(--ease), box-shadow 400ms var(--ease), border-color 400ms var(--ease);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(46, 107, 255, .30);
    box-shadow: var(--shadow-hover);
}

/* 限时促销角标（右上角） */
.promo-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: linear-gradient(135deg, #ff7a59, #ff4d6d);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 6px;
    letter-spacing: .5px;
    box-shadow: 0 3px 8px rgba(255, 77, 109, .35);
}

/* 分类小徽章 */
.cat-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 5px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .2px;
}

.card h3 {
    margin: 10px 0 4px;
    font-size: 16.5px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

.card > div > p.muted {
    font-size: 13px;
    line-height: 1.5;
}

/* 描述单行省略，统一卡片高度 */
.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 20px;
}

.product-stats {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-deep);
    color: var(--ink-soft);
    font-weight: 600;
}

.stat-item.in-stock {
    background: var(--success-soft);
    color: var(--success);
}

.stat-item.out-of-stock {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* 售罄：整卡降饱和 + 禁用态 */
.card.sold-out .product-visual img,
.card.sold-out .product-visual {
    filter: grayscale(.85) opacity(.75);
}

.card.sold-out .card-foot .price,
.card.sold-out h3 {
    color: var(--ink-faint);
}

.btn.disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--line-strong);
    color: var(--ink-faint);
    box-shadow: none;
}

.product-visual {
    height: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--navy) 0%, #2e6bff 90%);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.product-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-visual span {
    max-width: 150px;
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.product-chip {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 12px -12px 0 rgba(255, 255, 255, .14);
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card h3 {
    margin: 10px 0 6px;
    font-size: 17px;
    font-weight: 700;
}

.card > div > p.muted {
    font-size: 13.5px;
    line-height: 1.55;
}

.product-stats {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    font-size: 12.5px;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-deep);
    color: var(--ink-soft);
    font-weight: 600;
}

.stat-item.in-stock {
    background: var(--success-soft);
    color: var(--success);
}

.stat-item.out-of-stock {
    background: var(--danger-soft);
    color: var(--danger);
}

.card-foot,
.pay-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.price {
    color: var(--ink);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.5px;
}

/* ---------- 限时促销 ---------- */
.promo-tag {
    display: inline-block;
    vertical-align: 3px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 5px;
    margin-right: 6px;
    letter-spacing: .5px;
}
.promo-price { color: var(--brand); font-weight: 800; }
.promo-original { color: var(--ink-faint); font-size: .78em; font-weight: 600; margin-left: 4px; }

/* ---------- 多币种折算标注 ---------- */
.alt-price {
    display: block;
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}
.card-foot .alt-price,
.product-row-foot .alt-price {
    font-size: 11px;
}
.detail-price .alt-price {
    display: inline;
    margin-left: 8px;
    white-space: nowrap;
}

/* ---------- 徽章 / 状态 ---------- */

.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12.5px;
    font-weight: 700;
}

.status.warn {
    background: var(--warning-soft);
    color: var(--warning);
}

.status.bad {
    background: var(--danger-soft);
    color: var(--danger);
}

.hot-badge,
.recommended-badge {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-deep);
    color: var(--ink-soft);
}

/* ---------- 按钮（Liquid Gradient Focus + Hairline Crispness） ---------- */

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}

.btn:hover,
button:hover {
    background: var(--brand-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

.btn:active,
button:active {
    transform: scale(.98) translateY(0);
    box-shadow: var(--shadow-press);
}

.btn.secondary,
button.secondary {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
}

.btn.secondary:hover,
button.secondary:hover {
    border-color: rgba(46, 107, 255, .45);
    background: var(--brand-soft);
    color: var(--brand-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn.pay,
button.pay {
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-btn);
    min-height: 46px;
}

.btn.pay:hover,
button.pay:hover {
    background: var(--brand-strong);
    transform: translateY(-2px);
}

.btn.danger {
    background: var(--surface);
    border-color: rgba(229, 72, 77, .35);
    color: var(--danger);
    box-shadow: none;
}

.btn.danger:hover {
    background: var(--danger-soft);
    border-color: rgba(229, 72, 77, .5);
    color: var(--danger);
    box-shadow: none;
}

.btn.ghost,
.btn-ghost {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
}

.btn.ghost:hover,
.btn-ghost:hover {
    border-color: rgba(46, 107, 255, .45);
    background: var(--brand-soft);
    color: var(--brand-strong);
    transform: translateY(-1px);
}

/* ---------- 表单 ---------- */

form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

input::placeholder,
textarea::placeholder {
    color: #a8b3c4;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(46, 107, 255, .22);
}

textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.5;
}

.full {
    grid-column: 1 / -1;
}

/* ---------- 下单 / 支付 ---------- */

.checkout {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(300px, 1.05fr);
    gap: 18px;
}

/* 双栏内容区（订单查询 / 结算 / 政策页）在窄屏降为单栏，避免横向挤压 */
@media (max-width: 900px) {
    .checkout { grid-template-columns: 1fr; }
}

/* ---------- 订单查询页组件 ---------- */
.order-search-card {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 15px 16px 17px;
    margin-bottom: 16px;
}

.order-search-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.order-search-head strong {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.4;
}

.order-search-tag {
    font-size: 12px;
    padding: 2px 10px;
    flex-shrink: 0;
}

.order-search-field {
    margin-bottom: 12px;
}

.order-search-field small {
    display: block;
    margin-top: 4px;
}

.order-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 4px;
}

.order-search-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.order-search-actions .btn,
.order-search-actions .pay {
    flex: 1;
    min-width: 140px;
}

.order-search-method2 {
    border-top: 1px dashed var(--line);
    padding-top: 14px;
}

@media (max-width: 640px) {
    .order-search-card { padding: 13px 13px 15px; }
    .order-search-grid { grid-template-columns: 1fr; }
    .order-search-actions { flex-direction: column; }
    .order-search-actions .btn,
    .order-search-actions .pay { width: 100%; min-width: 0; }
    .order-search-head strong { font-size: 13px; }
}

/* ---------- 订单摘要卡片（全端：移动/平板单列，桌面单列横向列表） ---------- */
.order-list-wrap {
    display: block;
}

.order-list-wrap .panel {
    max-width: 1200px;
    margin: 0 auto;
}

.order-filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.order-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.order-search-input {
    flex-shrink: 0;
    width: 230px;
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.order-search-input::placeholder {
    color: var(--muted);
}

.order-search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.15);
}

@media (max-width: 640px) {
    .order-search-input {
        width: 100%;
    }
}

.order-filter-tab {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 12.5px;
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}

.order-filter-tab:hover {
    border-color: rgba(46, 107, 255, 0.45);
    color: var(--brand);
}

.order-filter-tab.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 5px rgba(46, 107, 255, 0.3);
}

.order-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.order-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease-out;
}

.order-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    border-color: rgba(46, 107, 255, 0.35);
}

.order-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.order-card-no {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--brand);
    word-break: break-all;
}

.order-card-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.order-card-badges .status {
    font-size: 11.5px;
    padding: 2px 9px;
}

.order-card-body {
    padding: 8px 14px;
}

.order-card-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

.order-card-row:last-child {
    border-bottom: none;
}

.order-card-label {
    flex-shrink: 0;
    width: 64px;
    font-size: 12px;
    color: var(--muted);
}

.order-card-value {
    color: var(--ink);
    word-break: break-all;
    min-width: 0;
}

.order-card-price {
    font-weight: 700;
    color: var(--ink);
}

.order-card-foot {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--line);
}

.order-card-foot .btn {
    width: 100%;
    text-align: center;
}

/* 桌面端：单列横向列表样式（一行一笔订单，固定列宽不乱断行） */
@media (min-width: 901px) {
    .order-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .order-card {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr) 70px 90px 165px 112px;
        align-items: center;
        gap: 0;
        padding: 0;
    }
    .order-card-head {
        border: none;
        border-right: 1px solid var(--line);
        background: transparent;
        padding: 12px 14px;
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .order-card-no {
        font-size: 14px;
        word-break: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .order-card-badges {
        flex-wrap: wrap;
    }
    .order-card-body {
        display: contents;
    }
    .order-card-row {
        display: block;
        padding: 12px 14px;
        border: none;
        border-right: 1px dashed var(--line);
        min-width: 0;
    }
    .order-card-row:last-child {
        border-right: none;
    }
    .order-card-label {
        width: auto;
        font-size: 11.5px;
        margin-bottom: 3px;
        display: block;
    }
    .order-card-value {
        font-size: 13px;
    }
    .order-card-value.nowrap {
        white-space: nowrap;
    }
    .order-card-foot {
        border: none;
        background: transparent;
        padding: 12px 14px;
    }
    .order-card-foot .btn {
        width: 100%;
        min-width: 0;
    }
}

.checkout-summary {
    background: linear-gradient(150deg, var(--navy) 0%, #2e6bff 140%);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.checkout-summary .price {
    color: #fff;
}

.checkout-summary .muted {
    color: rgba(255, 255, 255, .72);
}

.payment-choice {
    position: relative;
    flex: 1 1 150px;
}

.payment-choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.payment-choice > span {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    background: var(--surface);
    font-weight: 600;
    transition: border-color 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}

.payment-choice input:checked + span {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(46, 107, 255, .12);
}

/* —— 支付渠道图标（品牌 SVG / 自定义图片）—— */
.pay-icon {
    display: inline-block;
    flex-shrink: 0;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
}
.pay-icon svg { display: block; }
.pay-icon-img {
    background: #f2f5f9;
    border: 1px solid var(--line);
}
.pay-icon-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.payment-choice > span { justify-content: flex-start; }
.payment-choice .payment-meta { display: contents; }
.payment-choice .payment-name { font-weight: 600; color: var(--ink); }
.payment-choice .payment-amount { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.payment-choice .payment-fee {
    flex-shrink: 0;
    font-size: 11px; font-weight: 500; color: #6e6e73;
    background: var(--surface-2, #f5f5f7);
    border: 1px solid var(--line, #e5e5ea);
    padding: 2px 9px; border-radius: 999px;
    white-space: nowrap;
}
/* 支付方式区块（信息填写之后、提交之前）视觉分隔 */
.pay-choose {
    border-top: 1px dashed var(--line-strong);
    padding-top: 18px;
    margin-top: 4px;
}
.pay-choose > label { font-weight: 700; }

.payment-tips {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}

/* ---------- 表格 ---------- */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    background: var(--surface-soft);
}

tbody tr:hover {
    background: #f6f9ff;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- 统计卡 / 仪表盘 ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-md);
}

.stat strong {
    display: block;
    margin-top: 4px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--ink);
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-col {
    display: grid;
    gap: 16px;
    align-content: start;
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.chart-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-soft);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
}

.bar-track {
    height: 10px;
    border-radius: 999px;
    background: var(--bg-deep);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand-grad);
}

.bar-row {
    margin-bottom: 14px;
}

.bar-key {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
    color: var(--ink-soft);
}

/* ---------- 订单页 ---------- */

.order-status-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.delivery-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.delivery-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.delivery-content-wrapper {
    position: relative;
}

.delivery-content-wrapper pre {
    margin: 0;
    padding: 14px 16px;
    padding-right: 90px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13.5px;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: var(--radius-sm);
}

/* ---------- 发货凭证卡（自动发货内容展示） ---------- */
.delivery-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.delivery-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.delivery-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    color: var(--ink);
    min-width: 0;
}

.delivery-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.18);
    flex-shrink: 0;
}

.delivery-badge {
    display: inline-block;
    padding: 2px 9px;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    background: var(--success);
    border-radius: 999px;
    line-height: 1.5;
}

.delivery-copy {
    flex-shrink: 0;
    min-height: 34px;
    padding: 0 15px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(46, 107, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, background 0.25s ease-out;
}

.delivery-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(46, 107, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.delivery-copy:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

.delivery-card-body {
    padding: 16px;
}

.delivery-lines {
    background: var(--navy);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: grid;
    gap: 3px;
}

.delivery-line {
    display: block;
    padding: 9px 12px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.55;
    color: #80e9ff;
    border-radius: 6px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    word-break: break-all;
    transition: background 0.18s ease-out, color 0.18s ease-out;
}

.delivery-line:last-child {
    border-bottom: none;
}

.delivery-line:hover {
    background: rgba(255, 255, 255, 0.07);
}

.delivery-line.copied {
    background: rgba(23, 178, 106, 0.3);
    color: #fff;
}

.delivery-card-foot {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
}


.query-tips {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13.5px;
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
}

.query-tips ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.query-tips li {
    margin: 4px 0;
}

/* ---------- 商品须知 ---------- */

/* 商品自定义详情 HTML 区块（方案三） */
.product-detail-html {
    margin-top: 18px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.product-detail-html img { max-width: 100%; height: auto; border-radius: 10px; }
.product-detail-html table { max-width: 100%; border-collapse: collapse; }
.product-detail-html td, .product-detail-html th { border: 1px solid #e5e5ea; padding: 6px 10px; }
.product-detail-html a { color: var(--primary); }
.product-detail-html pre, .product-detail-html code {
    background: #f5f5f7; border-radius: 8px;
    padding: 2px 6px; font-size: .92em;
}
.product-detail-html pre { padding: 12px 14px; overflow-x: auto; }

.product-notice {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}

.product-notice:hover {
    border-color: rgba(46, 107, 255, .30);
    box-shadow: var(--shadow-md);
}

.product-notice .notice-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.product-notice .notice-title svg {
    width: 17px;
    height: 17px;
    color: var(--brand);
    flex-shrink: 0;
}

.product-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-soft);
}

/* ---------- 后台布局 ---------- */

.layout-admin {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        linear-gradient(to right, rgba(46, 107, 255, .055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(46, 107, 255, .055) 1px, transparent 1px);
    background-size: 44px 44px;
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    color: var(--ink);
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    margin: 0 8px 18px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar h2::before {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand);
}

.sidebar a {
    display: block;
    margin: 2px 0;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 550;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}

.sidebar a:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.sidebar a.active {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: var(--shadow-brand);
}

.sidebar a.active:hover {
    color: #fff;
}

/* 侧边栏分组标题 */
.sidebar .side-group {
    margin: 16px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--muted);
}
.sidebar .side-group:first-of-type {
    margin-top: 4px;
}
.sidebar .side-foot {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.admin-main {
    padding: 26px 30px;
    min-width: 0;
}

/* 后台抽屉遮罩：桌面端必须隐藏，否则空 div 占用 grid 第二列第一行，把 admin-main 挤到侧边栏(100vh)下方 */
.admin-mask {
    display: none;
}

/* ---------- 弹窗（插件配置等） ---------- */

.plugin-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.plugin-modal.open {
    display: block;
}

.plugin-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 64, .45);
    
}

.plugin-modal-box {
    position: relative;
    margin: 8vh auto 0;
    width: min(640px, 92vw);
    max-height: 82vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 20px 22px 18px;
}

.plugin-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.plugin-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
    box-shadow: none;
}

.plugin-modal-close:hover {
    color: var(--danger);
    background: none;
    transform: none;
}

/* ---------- 通用工具 ---------- */

.muted {
    color: var(--muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.success {
    color: var(--success);
}

.warn {
    color: var(--warning);
}

.sub {
    color: var(--muted);
    font-size: 13px;
}

.alert {
    border: 1px solid rgba(229, 72, 77, .35);
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    border: 1px solid rgba(23, 178, 106, .35);
    background: rgba(23, 178, 106, .08);
    color: var(--success);
}

.alert-danger {
    border: 1px solid rgba(229, 72, 77, .35);
    background: var(--danger-soft);
    color: var(--danger);
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.inline-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

pre.secret {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--navy);
    color: #80e9ff;
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    box-shadow: var(--shadow-md);
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}
/* 统一空态组件：图标 + 标题 + 引导文案 */
.empty-state .es-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: var(--brand-soft, #eef2ff);
    color: var(--brand, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state strong {
    display: block;
    font-size: 14px;
    color: var(--ink, #1e293b);
    margin-bottom: 4px;
    font-weight: 600;
}
.empty-state p {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted, #64748b);
    line-height: 1.6;
}

.delete {
    color: var(--danger);
}

/* 页脚组件样式见文件末尾「公共页脚组件」区块 */

/* ---------- 动效无障碍：偏好减少动效时禁用动画 ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .card:hover,
    .btn:hover,
    button:hover {
        transform: none;
    }
}

/* ---------- 响应式 ---------- */

@media (max-width: 820px) {
    .topbar-inner,
    .toolbar,
    .card-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .checkout,
    .form-grid,
    .layout-admin,
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 18px 0 0;
    }

    .sidebar {
        position: static;
        height: auto;
    }
}

@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }

    .product-stats {
        flex-wrap: wrap;
    }

    .order-status-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-actions {
        flex-direction: column;
    }

    .order-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============ 系统设置 Tab 布局 ============ */
.settings-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin: -6px -6px 18px;
    padding: 0 6px;
}
.tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 300ms ease-out, background 300ms ease-out, box-shadow 300ms ease-out;
    -webkit-tap-highlight-color: transparent;
}
.tab-btn:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.tab-btn.active {
    color: var(--brand-strong);
    background: var(--surface);
    border-color: var(--line);
    border-bottom-color: var(--surface);
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(46, 107, 255, .10);
}
.tab-pane { display: none; animation: tabFade 300ms ease-out; }
.tab-pane.active { display: block; }
@keyframes tabFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.tab-pane h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.tab-pane h3::before {
    content: '';
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--brand-grad);
}
.settings-savebar {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}
.settings-savebar .muted { font-size: 12.5px; }
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}
.tpl-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--surface-soft, #f8fafc);
}
.tpl-card .tpl-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tpl-card .tpl-title code {
    background: var(--brand-soft);
    color: var(--brand-strong);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}
/* 设置页两列表单行 */
.tab-pane .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.tab-pane .row > div:last-child { margin-bottom: 0; }
.tab-pane > div {
    margin-bottom: 14px;
}
/* ============ 公共页脚组件 ============ */
.footer {
    border-top: 1px solid var(--line);
    margin-top: 48px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 13.5px;
}
.footer-grid {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 18px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 10px;
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.footer-col a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 300ms ease-out;
}
.footer-col a:hover { color: var(--brand); }
.footer-brand .brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}
.footer-brand p { margin: 8px 0 0; line-height: 1.7; }
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
}
.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-soft);
    text-decoration: none;
}
a.contact-item:hover { color: var(--brand); }
.contact-item svg { flex-shrink: 0; opacity: 0.85; }
.footer-bottom {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--muted);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; }
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}

/* ============================================================
   全站响应式适配（移动端 / 平板端）
   断点：1100px（平板横屏）→ 900px（平板竖屏/大手机）→ 640px（手机）
   ============================================================ */

/* 触控与内容安全 */
html { -webkit-tap-highlight-color: transparent; }
img { height: auto; }

/* 前台汉堡菜单按钮：默认隐藏（仅 ≤900px 显示），避免桌面端出现多余按钮 */
.nav-toggle {
    display: none;
}

/* 后台移动端顶部条：默认隐藏 */
.admin-topbar {
    display: none;
}

/* ---------- 平板横屏 / 小笔记本 ≤1100px ---------- */
@media (max-width: 1100px) {
    .layout-admin { grid-template-columns: 204px minmax(0, 1fr); }
    .admin-main { padding: 22px 20px 48px; }
    .sidebar { padding: 18px 10px; }
    .sidebar a { font-size: 13.5px; padding: 8px 10px; }
    .topbar-inner, .container { width: min(1180px, calc(100% - 28px)); }
    .footer-grid, .footer-bottom { max-width: 100%; }
}

/* ---------- 平板竖屏 / 大手机 ≤900px ---------- */
@media (max-width: 900px) {
    /* —— 前台：汉堡折叠导航 —— */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        background: var(--surface);
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
        color: var(--ink);
    }
    .nav-toggle:hover { background: var(--brand-soft); color: var(--brand-strong); transform: none; }
    .nav-toggle svg { width: 20px; height: 20px; }

    .topbar-inner { flex-direction: row; flex-wrap: nowrap; align-items: center; }
    .nav-toggle { margin-left: auto; }
    .nav {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        z-index: 99;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px 14px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav.open { display: flex; }
    .nav a { min-height: 44px; padding: 10px 12px; font-size: 14.5px; border-radius: var(--radius-sm); }
    .nav .nav-search { order: 0; width: 100%; margin: 2px 0 8px; }
    .nav .nav-search input { width: 100%; min-height: 44px; }

    /* —— 后台：顶部条 + 抽屉侧边栏 —— */
    .admin-topbar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 1px 2px rgba(10, 37, 64, .04);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    .admin-topbar .admin-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        background: var(--surface);
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
        color: var(--ink);
    }
    .admin-topbar .admin-menu-btn:hover { background: var(--brand-soft); color: var(--brand-strong); transform: none; }
    .admin-topbar .admin-menu-btn svg { width: 17px; height: 17px; }
    .admin-topbar .admin-title { font-weight: 700; color: var(--ink); font-size: 14.5px; flex: 1; }
    .admin-topbar a { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }

    .layout-admin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 268px;
        height: 100vh;
        z-index: 130;
        padding: 20px 14px 24px;
        transform: translateX(-105%);
        transition: transform 320ms ease-out;
        box-shadow: var(--shadow-lg);
        border-right: 1px solid var(--line);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar h2 { display: flex; align-items: center; gap: 8px; }
    .sidebar h2 .sidebar-close {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--ink-soft);
        box-shadow: none;
        font-size: 15px;
    }
    .sidebar h2 .sidebar-close:hover { background: var(--danger-soft); color: var(--danger); transform: none; }
    .admin-mask {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 120;
        background: rgba(10, 37, 64, .42);
        backdrop-filter: blur(1px);
    }
    .admin-mask.open { display: block; }
    .admin-main { padding: 18px 16px 48px; }

    /* —— 布局单列化 —— */
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-copy { padding: 20px 0 0; }
    .hero-panel { margin-top: 6px; }
    .checkout, .form-grid, .dash-grid { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: flex-start; gap: 10px; margin: 22px 0 14px; }
    .toolbar h2 { font-size: 21px; }
    .card-foot { flex-direction: column; align-items: stretch; }
    .card-foot .price { text-align: left; }
    .tab-pane .row { grid-template-columns: 1fr; }
}

/* ---------- 手机 ≤640px ---------- */
@media (max-width: 640px) {
    .topbar-inner, .container { width: calc(100% - 20px); }
    .container { padding: 20px 0 40px; }
    .topbar-inner { min-height: 56px; }
    .nav { top: 56px; max-height: calc(100vh - 56px); }
    .brand { font-size: 15.5px; }
    .brand::before { width: 24px; height: 24px; }

    .hero h1 { font-size: 32px; letter-spacing: -.8px; }
    .hero p { font-size: 15px; }
    .hero-panel { padding: 18px; }
    .hero-panel h2 { font-size: 24px; }
    .signal-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .signal { min-height: 72px; padding: 12px; }
    .signal strong { font-size: 15px; }

    .card, .panel { padding: 14px; }
    .card { min-height: 0; }
    .grid { gap: 12px; }
    .price { font-size: 22px; }
    .search-bar { padding: 14px; }

    /* 商品卡移动端：左图 + 右上信息 / 右下价格按钮 */
    .card { display: grid; grid-template-columns: 118px 1fr; grid-template-areas: "visual body" "visual foot"; align-items: start; gap: 0 12px; }
    .product-visual { grid-area: visual; width: 100%; height: 118px; margin: 0; }
    .product-visual span { display: none; }
    .product-chip { width: 46px; height: 46px; border-radius: 10px; box-shadow: 10px -10px 0 rgba(255, 255, 255, .14); }
    .card-body { grid-area: body; }
    .card-desc { display: none; }
    .card h3 { margin: 4px 0 2px; font-size: 15px; min-height: 0; -webkit-line-clamp: 2; }
    .meta-row { margin-bottom: 2px; }
    .product-stats { margin-top: 4px; font-size: 11.5px; }
    .card-foot { grid-area: foot; width: auto; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 6px; }
    .card-foot .btn { min-height: 38px; padding: 0 14px; font-size: 13px; }


    .search-input { min-width: 0; }
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 12px 14px; }
    .stat strong { font-size: 21px; }
    .chart-card { padding: 14px; }
    .dash-col { gap: 12px; }

    /* 表单触控友好：≥16px 防 iOS 聚焦缩放 */
    input, select, textarea { font-size: 16px; min-height: 46px; }
    .btn, button { min-height: 44px; }
    .order-actions .btn { width: 100%; text-align: center; }
    .order-actions { flex-direction: column; }
    .payment-choice { flex: 1 1 100%; }
    .payment-choice > span { min-height: 52px; font-size: 14px; }
    .checkout-summary { padding: 16px; }

    /* 表格：保持可读列宽，容器横向滑动 */
    .table-wrap { border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
    .table-wrap table { min-width: 600px; }
    th, td { padding: 10px 12px; }
    th { font-size: 11.5px; }

    /* 弹窗全屏化（插件配置等） */
    .plugin-modal-box { margin: 0; width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; padding: 14px 16px 20px; }

    /* 页脚与提示 */
    .footer-grid { padding: 22px 14px 16px; gap: 16px; }
    .footer-bottom { padding: 12px 14px 16px; }
    .query-tips, .product-notice, .payment-tips { padding: 12px 14px; }
    pre.secret { padding: 12px 14px; font-size: 12.5px; }

    /* 发货凭证卡移动端 */
    .delivery-card-head { padding: 11px 13px; gap: 8px; }
    .delivery-card-body { padding: 13px; }
    .delivery-line { font-size: 12.5px; padding: 8px 10px; }
    .delivery-copy { min-height: 32px; padding: 0 12px; font-size: 12px; }

    /* 操作区按钮组不挤压（仅工具栏直接子按钮，避免误伤筛选标签） */
    .toolbar > .btn { width: 100%; text-align: center; }
    .settings-savebar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .settings-savebar .btn { width: 100%; text-align: center; }
    .order-status-badges { flex-direction: column; align-items: flex-start; }
}

/* ============ 商品列表风格（横排行） ============ */
.product-list { display: flex; flex-direction: column; gap: 12px; }
.product-row { display: flex; align-items: center; gap: 16px; padding: 14px; }
.product-row .product-row-visual {
    flex: 0 0 120px;
    width: 120px;
    height: 84px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    position: relative;
}
.product-row .product-row-visual img { width: 100%; height: 100%; object-fit: cover; }
.product-row .product-row-visual .product-chip { position: absolute; right: 8px; bottom: 8px; }
.product-row .product-row-body { flex: 1; min-width: 0; }
.product-row .product-row-body h3 { margin: 2px 0 4px; font-size: 16px; line-height: 1.35; }
.product-row .product-row-body > .muted { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-row .product-stats { margin-top: 6px; }
.product-row .product-row-foot { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 640px) {
    .product-row { flex-wrap: wrap; gap: 12px; }
    .product-row .product-row-visual { flex-basis: 84px; width: 84px; height: 64px; }
    .product-row .product-row-body { flex-basis: calc(100% - 100px); }
    .product-row .product-row-foot { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
    .product-row .product-row-foot .btn { margin: 0; }
}

/* ============ 商品详情页（现代电商布局） ============ */
.page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 14px;
    font-size: 13px;
    color: var(--muted);
}
.page-breadcrumb a { color: var(--brand); font-weight: 500; }
.page-breadcrumb a:hover { text-decoration: underline; }
.page-breadcrumb .bc-sep { color: var(--line-strong); }
.page-breadcrumb .bc-current { color: var(--ink-soft); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, .95fr);
    gap: 20px;
    align-items: start;
}
.detail-main { display: flex; flex-direction: column; gap: 13px; min-width: 0; }

.detail-cover {
    height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--brand-soft);
    color: var(--brand-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    position: relative;
    border: 1px solid var(--line);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-cover .product-chip { position: absolute; right: 14px; bottom: 14px; }

.detail-info { padding: 22px 24px; }
.detail-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}
.detail-info h1 { margin: 10px 0 6px; font-size: 24px; line-height: 1.35; color: var(--ink); letter-spacing: -.3px; }
.detail-desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.75; margin: 0 0 16px; white-space: normal; word-break: break-word; }

.detail-buy {
    position: sticky;
    top: 20px;
    padding: 22px 24px;
    box-shadow: var(--shadow-lg);
}
.buy-head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.buy-head h2 { margin: 2px 0 8px; font-size: 20px; color: var(--ink); }
.detail-price { font-size: 28px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; margin: 0 0 4px; }
.detail-buy .form-grid { margin-top: 0; }

/* ========== 商品详情页优化 v20261013b ========== */
/* 无封面占位：渐变 + 网格纹理 + 图标 */
.detail-cover {
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 22%, rgba(99,91,255,.16), transparent 46%),
        radial-gradient(circle at 82% 74%, rgba(0,212,255,.13), transparent 46%),
        linear-gradient(to right, rgba(99,91,255,.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99,91,255,.07) 1px, transparent 1px),
        var(--brand-soft);
    background-size: auto, auto, 36px 36px, 36px 36px, auto;
}
.detail-cover .cover-icon { width: 62px; height: 62px; opacity: .92; }
.detail-cover .cover-label { margin-top: 14px; font-size: 14px; font-weight: 600; letter-spacing: .3px; opacity: .82; }

/* 标题下主价格区（首屏可见） */
.detail-price-block {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 14px;
    padding: 12px 0;
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
}
.detail-price-block .main-price,
.detail-price-block .promo-price { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.detail-price-block .main-price { color: var(--brand); }
.detail-price-block .promo-price { color: var(--danger, #e11d48); }
.detail-price-block .promo-original { font-size: 16px; color: var(--muted); font-weight: 500; }
.detail-price-block .alt-price { font-size: 13px; color: var(--muted); font-weight: 500; }
.detail-price-block .promo-countdown { font-size: 12.5px; color: var(--muted); }
.detail-price-block .promo-countdown .promo-remain { color: var(--danger, #e11d48); font-variant-numeric: tabular-nums; }
.detail-info .detail-desc { margin-bottom: 10px; }

/* 交付 / 库存 / 上限 紧凑徽标行 */
.detail-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
}
.meta-chip svg { width: 13px; height: 13px; color: var(--brand); }
.meta-chip i { font-style: normal; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.meta-chip.danger { color: var(--danger, #e11d48); border-color: rgba(225,29,72,.3); }
.meta-chip.danger svg { color: var(--danger, #e11d48); }

/* 桌面端购买卡吸顶（避开顶栏） */
@media (min-width: 1080px) {
    .detail-buy { top: 84px; }
}

/* 单列（<1080px）：重排为 封面 → 信息 → 购买卡 → 说明，首屏即见价格与购买入口 */
@media (max-width: 1079.98px) {
    .product-detail { display: flex; flex-direction: column; gap: 13px; }
    .detail-main { display: contents; }
    .detail-cover { order: 1; }
    .detail-info { order: 2; }
    .detail-buy { order: 3; }
    .detail-main .product-notice { order: 4; }
    .detail-main .product-detail-html { order: 5; }
    /* 购买卡内头部信息（名称/价格）在单列下由主区承担，压缩为纯操作卡 */
    .detail-buy .buy-head { display: none; }
}

/* ============================================================
   卡密库存管理页布局
   ============================================================ */
.cards-toolbar-panel {
    margin-bottom: 16px;
}

.cards-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cards-toolbar-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.cards-toolbar-filters select {
    width: auto;
    min-width: 150px;
}

.cards-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cards-list-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.cards-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== 弹窗（Modal） ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 24px rgba(10, 37, 64, 0.12), 0 4px 12px rgba(10, 37, 64, 0.08);
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    overflow: auto;
}

.modal.modal-danger {
    border-color: rgba(220, 53, 69, 0.35);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 {
    margin: 0;
    font-size: 15px;
    color: var(--ink);
}

.modal.modal-danger .modal-head h3 {
    color: var(--danger, #dc3545);
}

.modal-close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 200ms var(--ease), background 200ms var(--ease);
}

.modal-close:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.modal-body {
    padding: 16px 18px;
}

.ann-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.ann-item:first-child {
    padding-top: 0;
}

.ann-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.ann-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-weight: 650;
    font-size: 14px;
    color: var(--ink);
}

.ann-date {
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
}

.ann-content {
    margin-top: 5px;
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.7;
}

@media (max-width: 640px) {
    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    .modal {
        max-width: 100%;
        border-radius: var(--radius) var(--radius) 0 0;
    }
}

.count-badge {
    background: rgba(46, 107, 255, 0.12);
    color: var(--brand-strong, #2e6bff);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0;
}

.cards-batch-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cards-batch-bar .btn {
    padding: 6px 12px;
    font-size: 13px;
}

.stock-add {
    margin-bottom: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    padding: 12px;
}

.stock-add-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.stock-add-tabs .tab-btn {
    padding: 6px 12px;
    font-size: 12.5px;
}

.stock-add-pane .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 0;
}

.stock-add-pane .form-grid textarea {
    min-height: 120px;
}

.panel-danger {
    border-color: rgba(220, 53, 69, 0.35);
}

.panel-danger h3 {
    color: var(--danger, #dc3545);
}
.detail-buy .pay { width: 100%; }
.detail-buy .full:last-child { display: flex; flex-direction: column; gap: 10px; }
.detail-buy .full:last-child .btn { width: 100%; text-align: center; }

@media (max-width: 1080px) {
    .product-detail { grid-template-columns: 1fr; }
    .detail-buy { position: static; }
    .detail-cover { height: 240px; }
    /* 覆盖商品卡 grid(118px+1fr) 规则：详情页信息卡与购买卡恢复纵向堆叠 */
    .detail-info,
    .detail-buy {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        min-height: 0;
    }
    /* 详情页购买卡：左价格 + 右购买数量，按钮纵排 */
    .detail-buy .buy-head {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        column-gap: 12px;
        row-gap: 6px;
    }
    .detail-buy .buy-head .eyebrow,
    .detail-buy .buy-head h2 { flex-basis: 100%; }
    .detail-buy .buy-head .detail-price { margin: 0; }
    .detail-buy .buy-head .promo-countdown,
    .detail-buy .buy-head .muted { flex-basis: 100%; }
    .detail-buy .qty-row { margin: 0; }
}
@media (max-width: 640px) {
    .detail-cover { height: 200px; }
    .detail-info { padding: 18px; }
    .detail-info h1 { font-size: 21px; }
    .detail-price { font-size: 24px; }
    .detail-buy { padding: 18px; }
    /* 购买数量容器移动端紧凑化：横向一行 */
    .detail-buy .qty-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }
    .detail-buy .qty-row label { margin: 0; font-size: 11px; color: var(--ink-soft); }
    .detail-buy .qty-row small { margin: 0; font-size: 10px; white-space: nowrap; }
    .detail-buy .qty-ctl .qty-btn { width: 30px; height: 32px; font-size: 15px; }
    .detail-buy .qty-ctl input.qty-input { width: 38px; height: 32px; font-size: 13px; }
}

/* ============ 购买流程重构：详情页操作 / 购物车 / 结算页 ============ */
/* —— 商品详情页操作区 —— */
.detail-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.qty-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.qty-row label { font-size: 13.5px; color: var(--ink-soft); }
.qty-ctl { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; width: fit-content; }
.qty-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; color: var(--ink); background: var(--surface); border: 0; cursor: pointer; transition: background 180ms ease-out, color 180ms ease-out; }
.qty-btn:hover { background: var(--brand-soft); color: var(--brand); }
.qty-btn:active { background: var(--brand); color: #fff; }
.qty-ctl input.qty-input { width: 56px; height: 40px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); background: #fff; outline: none; -moz-appearance: textfield; appearance: textfield; }
.qty-ctl input.qty-input::-webkit-inner-spin-button, .qty-ctl input.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* —— 导航购物车角标 —— */
.nav-cart { position: relative; }
.cart-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; margin-left: 5px; font-size: 11px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; vertical-align: middle; }

/* —— 购物车页 —— */
.cart-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px; }
.cart-visual { position: relative; display: block; width: 96px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
.cart-visual img { width: 100%; height: 100%; object-fit: cover; }
.cart-visual.small { width: 72px; height: 56px; }
.cart-visual .product-chip { position: absolute; right: 6px; bottom: 6px; width: 14px; height: 14px; border-radius: 4px; background: var(--brand); opacity: .85; }
.cart-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-name { color: var(--ink); font-weight: 600; font-size: 14.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cart-name:hover { color: var(--brand); }
.cart-subtotal { font-weight: 700; color: var(--brand); font-size: 15px; white-space: nowrap; }
.qty-form { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qty-form .qty-btn { width: 34px; height: 34px; }
.qty-form .qty-input { width: 48px; height: 34px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff; outline: none; -moz-appearance: textfield; appearance: textfield; }
.qty-form .qty-input::-webkit-inner-spin-button, .qty-form .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.link-danger { background: none; border: 0; color: var(--danger, #e5484d); font-size: 13px; cursor: pointer; padding: 6px 2px; transition: color 180ms ease-out; }
.link-danger:hover { color: var(--danger-strong, #c9383d); text-decoration: underline; }
.cart-summary { position: sticky; top: 84px; padding: 18px; }
.cart-summary h3 { margin: 0 0 12px; font-size: 17px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 14px; color: var(--ink-soft); }
.summary-row b { color: var(--ink); font-weight: 600; }
.summary-total { margin: 10px 0 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-size: 14px; color: var(--ink-soft); }
.summary-total .detail-price { font-size: 26px; }
.cart-remove-form { margin: 0; }

/* —— 结算页 —— */
.checkout-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 12px; }
.order-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-line:last-child { border-bottom: 0; }
.order-line.line-invalid { background: rgba(229,72,77,.05); border-radius: var(--radius-sm); padding-left: 10px; padding-right: 10px; }
.line-error { font-size: 12.5px; color: var(--danger); margin-top: 2px; }
.order-line-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.order-line-sub { font-weight: 700; color: var(--ink); font-size: 14.5px; white-space: nowrap; }
.order-total-row { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding-top: 10px; font-size: 14px; color: var(--ink-soft); }
.order-total-row b { color: var(--ink); font-size: 17px; }
.checkout-box { padding: 16px; }
.checkout-box h3 { margin: 0 0 8px; font-size: 16px; }
.checkout-tips { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.checkout-tips li { font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* 结算页填写信息区：紧凑表单 */
.checkout-main .form-grid { gap: 11px; }
.checkout-main .form-grid h3 { font-size: 16px; }
.checkout-main .form-grid label { margin-bottom: 4px; font-size: 13px; }
.checkout-main .form-grid input,
.checkout-main .form-grid textarea { padding-top: 8px; padding-bottom: 8px; font-size: 13.5px; }

/* 结算页右栏：订单信息 + 支付方式 堆叠 */
.checkout-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 84px;
}

.checkout-side .pay-card h3 { margin: 0 0 8px; font-size: 16px; }

/* 支付方式（桌面右栏）：紧凑双列小格，图标+名称+金额竖排，费率/汇率徽标在底部 */
.checkout-side .pay-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 0;
}

.checkout-side .payment-choice { flex: none; }

.checkout-side .payment-choice > span {
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 6px;
    text-align: center;
    background: var(--surface);
}

.checkout-side .payment-meta { display: contents; }

.checkout-side .payment-choice .payment-name {
    font-size: 13px;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-side .payment-choice .payment-amount {
    margin-top: 0;
    font-size: 11.5px;
}

.checkout-side .payment-choice .payment-fee {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 10.5px;
}

.checkout-side .pay-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.checkout-side .pay-actions .pay,
.checkout-side .pay-actions .btn {
    flex: 1;
    text-align: center;
}

/* —— 购物车/结算响应式 —— */
@media (max-width: 900px) {
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .cart-summary, .checkout-side { position: static; }
    /* 移动端支付方式：单列横排卡片，图标+名称+金额同行，费率/汇率徽标靠右 */
    .checkout-side .pay-options { grid-template-columns: 1fr; gap: 8px; }
    .checkout-side .payment-choice > span {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 11px 14px;
        text-align: left;
    }
    .checkout-side .payment-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        min-width: 0;
        flex: 1;
    }
    .checkout-side .payment-choice .payment-name { font-size: 14px; }
    .checkout-side .payment-choice .payment-amount { font-size: 12px; }
    .checkout-side .payment-choice .payment-fee { margin-top: 0; margin-left: 4px; font-size: 11px; }
}
@media (max-width: 640px) {
    .cart-item { grid-template-columns: 72px 1fr auto; grid-template-areas: "visual body sub" "visual qty remove"; gap: 10px 12px; padding: 12px; }
    .cart-visual { width: 72px; height: 60px; grid-area: visual; }
    .cart-visual.small { width: 60px; height: 48px; }
    .cart-body { grid-area: body; }
    .cart-subtotal { grid-area: sub; }
    .qty-form { grid-area: qty; justify-self: start; }
    .cart-remove-form { grid-area: remove; justify-self: end; }
    .order-line { grid-template-columns: 56px 1fr auto; gap: 10px; }
    .order-line .cart-visual.small { width: 56px; height: 44px; }
    .order-total-row { justify-content: space-between; }
}
/* 极窄屏：商品清单改为两行网格（封面占左，名称/数量与价格分行），避免名称截断、信息换行错乱 */
@media (max-width: 480px) {
    .order-line {
        grid-template-columns: 60px 1fr;
        grid-template-areas: "visual body" "visual sub";
        gap: 4px 12px;
        align-items: start;
    }
    .order-line .cart-visual.small { grid-area: visual; width: 60px; height: 64px; }
    .order-line-body { grid-area: body; }
    .order-line-sub { grid-area: sub; justify-self: end; align-self: center; }
    .order-line-body .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .cart-name { -webkit-line-clamp: 3; }
}

/* —— 结算页移动端强化：间距、触控高度、支付方式单列化 —— */
@media (max-width: 900px) {
    .checkout-layout { gap: 12px; }
    .checkout-main .card,
    .checkout-side .card { padding: 14px; }
}

@media (max-width: 640px) {
    .page-head h2 { font-size: 22px; }
    .checkout-main .card h3,
    .checkout-side .card h3 { font-size: 15px; }
    .checkout-main .form-grid input,
    .checkout-main .form-grid textarea { padding: 10px 11px; font-size: 14px; }
    .checkout-main .form-grid label { font-size: 13px; }
    .order-total-row { padding-top: 8px; }
    .order-total-row b { font-size: 16px; }
    .checkout-box .summary-total .detail-price { font-size: 24px; }
    .checkout-tips li { font-size: 12px; }
    /* 触控目标高度：提交/返回按钮 */
    .checkout-side .pay-actions .pay,
    .checkout-side .pay-actions .btn { min-height: 44px; align-items: center; justify-content: center; display: inline-flex; }
}

@media (max-width: 480px) {
    /* 支付方式改单列横向卡片：图标 + 名称 + 应付金额 一行排开，选中态更清晰 */
    .checkout-side .pay-options { grid-template-columns: 1fr; gap: 8px; }
    .checkout-side .payment-choice > span {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 11px 12px;
        text-align: left;
        min-height: 52px;
    }
    .checkout-side .payment-choice .payment-name { font-size: 13.5px; }
    .checkout-side .payment-choice .payment-amount { margin-top: 0; font-size: 12px; }
    /* 操作按钮全宽纵向堆叠：提交订单优先，返回次之 */
    .checkout-side .pay-actions { flex-direction: column; gap: 8px; }
    .checkout-side .pay-actions .pay,
    .checkout-side .pay-actions .btn { width: 100%; }
    .checkout-side .summary-row { font-size: 13px; padding: 6px 0; }
    .checkout-side .checkout-box,
    .checkout-side .pay-card { padding: 14px; }
}

/* —— 结算页移动端精细优化：订单信息紧凑化 + 支付选项现代化 —— */
@media (max-width: 640px) {
    /* 覆盖商品卡 grid(118px+1fr) 规则：结算卡片恢复纵向堆叠，避免内容被 grid 打乱 */
    .checkout-side .card,
    .checkout-main .card {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        min-height: 0;
    }
    .checkout-side .checkout-box h3,
    .checkout-side .pay-card h3 { margin-bottom: 6px; }
    .checkout-side .summary-total .detail-price { font-size: 21px; }
}

@media (max-width: 480px) {
    /* 订单信息：紧凑双行 + 应付合计左标签右价格 */
    .checkout-side .checkout-box { padding: 13px 14px; }
    .checkout-side .summary-row { padding: 5px 0; font-size: 13px; }
    .checkout-side .summary-row b { font-weight: 600; }
    .checkout-side .summary-total {
        margin: 8px 0 4px;
        padding-top: 9px;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        font-size: 13px;
    }
    .checkout-side .summary-total .detail-price { font-size: 21px; margin: 0; }
    /* 提示区：统一浅蓝信息卡，圆点引导，视觉不碎 */
    .checkout-side .checkout-tips {
        margin: 8px 0 0;
        padding: 9px 12px;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: var(--brand-soft, #f0f4ff);
        border: 1px solid rgba(46, 107, 255, .12);
        border-radius: 10px;
    }
    .checkout-side .checkout-tips li {
        position: relative;
        padding-left: 13px;
        font-size: 11.5px;
        line-height: 1.55;
        color: var(--ink-soft);
    }
    .checkout-side .checkout-tips li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 6px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--brand);
        opacity: .8;
    }
    /* 订单备注输入框高度适中 */
    .checkout-main .form-grid textarea { min-height: 58px; resize: vertical; }

    /* 支付选项：选中圆点 + 图标 + 名称(弹性) + 金额右对齐 */
    .checkout-side .payment-choice > span {
        min-height: 50px;
        padding: 10px 12px;
        gap: 10px;
    }
    .checkout-side .payment-choice > span::before {
        content: '';
        width: 17px;
        height: 17px;
        border-radius: 50%;
        border: 1.5px solid #cbd5e1;
        background: #fff;
        flex-shrink: 0;
        transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
    }
    .checkout-side .payment-choice input:checked + span::before {
        border-color: var(--brand);
        box-shadow: inset 0 0 0 4px #fff, 0 0 0 1px var(--brand);
    }
    .checkout-side .payment-choice .payment-name {
        flex: 1;
        min-width: 0;
        font-size: 13.5px;
    }
    .checkout-side .payment-choice .payment-amount {
        margin-left: auto;
        font-size: 11.5px;
        text-align: right;
    }
    /* 操作按钮触控高度 */
    .checkout-side .pay-actions { margin-top: 10px; gap: 8px; }
    .checkout-side .pay-actions .pay,
    .checkout-side .pay-actions .btn { min-height: 46px; }
}



/* 博客中心：列表卡片、详情排版、分页 */
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.blog-card { overflow: hidden; display: flex; flex-direction: column; }
.blog-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-deep); }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease-out; }
.blog-card:hover .blog-cover img { transform: scale(1.03); }
.blog-body { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-title { font-size: 18px; line-height: 1.5; margin: 0; color: var(--ink); }
.blog-title a { color: inherit; }
.blog-title a:hover { color: var(--brand); }
.blog-excerpt { margin: 0; font-size: 13.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 14px; margin-top: 22px; align-items: center; }
.blog-article { padding: 26px 28px; }
.blog-head { margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.blog-head .blog-title { font-size: 26px; line-height: 1.4; margin-bottom: 10px; }
.blog-head-cover { margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.blog-head-cover img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.blog-foot { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.rich-content { font-size: 15.5px; line-height: 1.9; color: var(--ink); overflow-wrap: break-word; }
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 { margin: 22px 0 10px; line-height: 1.4; color: var(--ink); }
.rich-content h2 { font-size: 22px; } .rich-content h3 { font-size: 18px; } .rich-content h4 { font-size: 16px; }
.rich-content p { margin: 10px 0; }
.rich-content blockquote { border-left: 3px solid var(--brand); margin: 14px 0; padding: 8px 16px; background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft); }
.rich-content ul, .rich-content ol { margin: 10px 0; padding-left: 24px; }
.rich-content li { margin: 4px 0; }
.rich-content pre { background: #0a2540; color: #dce6f1; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.rich-content code { background: var(--bg-deep); padding: 2px 6px; border-radius: 4px; font-family: Consolas, Menlo, monospace; font-size: 13px; }
.rich-content pre code { background: none; padding: 0; }
.rich-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.rich-content a { color: var(--brand-strong); text-decoration: underline; }
.rich-content table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.rich-content th, .rich-content td { border: 1px solid var(--line-strong); padding: 8px 12px; text-align: left; }
.rich-content th { background: var(--bg-soft, #f7fafc); font-weight: 600; }
.rich-content hr { border: none; border-top: 1px solid var(--line-strong); margin: 18px 0; }
@media (max-width: 640px) {
    .blog-list { grid-template-columns: 1fr; }
    .blog-article { padding: 18px 16px; }
    .blog-head .blog-title { font-size: 21px; }
}

/* ---------- 导航栏：图标化快捷按钮 ---------- */
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.nav-icon-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    color: var(--ink-soft);
    background: transparent;
    border: none; cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}
.nav-icon-btn:hover { background: var(--brand-soft); color: var(--brand-strong); }
.nav-icon-btn svg { width: 19px; height: 19px; display: block; }
/* 购物车角标：图标右上角 */
.nav-cart .cart-badge {
    position: absolute; top: -3px; right: -5px;
    min-width: 16px; height: 16px; padding: 0 4px;
    font-size: 10px; font-weight: 700;
    color: #fff; background: var(--brand);
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px var(--surface);
}
/* 搜索展开：图标 + 渐显输入框 */
.nav-search-wrap { position: relative; display: flex; align-items: center; gap: 0; }
.nav-search-wrap .nav-search-input {
    width: 0; min-height: 38px; padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--surface); color: var(--ink);
    font-size: 13px; outline: none; opacity: 0;
    transition: width 260ms var(--ease), opacity 180ms var(--ease), border-color 200ms var(--ease), padding 260ms var(--ease), box-shadow 200ms var(--ease);
}
.nav-search-wrap.open .nav-search-input {
    width: 180px; padding: 0 12px 0 10px; opacity: 1;
    border-color: var(--line-strong);
}
.nav-search-wrap.open .nav-search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .18);
}
/* 桌面端：订单查询文字链接由图标替代 */
.nav .nav-order-text { display: none; }
/* 登录按钮（导航内） */
.nav .btn.nav-login { margin-left: 6px; padding: 9px 16px; }
@media (max-width: 900px) {
    .nav .nav-order-text { display: inline-flex; }
    .nav-actions { margin-left: auto; gap: 2px; }
    .nav-search-wrap.open .nav-search-input { width: min(200px, 42vw); }
    .nav-icon-btn { width: 40px; height: 40px; }
}
/* 登录按钮放导航最右侧（图标区末尾）；移动端折叠面板内登录仅移动端显示 */
.nav .nav-login-mobile { display: none; }
.nav-actions .nav-login { margin-left: 6px; padding: 9px 16px; white-space: nowrap; }
/* 登录按钮放导航最右侧（图标区末尾）；移动端折叠面板内登录仅移动端显示 */
.nav .nav-login-mobile { display: none; }
.nav-actions .nav-login { margin-left: 6px; padding: 9px 16px; white-space: nowrap; }

@media (max-width: 900px) {
    .nav .nav-login-mobile { display: inline-flex; }
    .nav-actions .nav-login { display: none; }
}
/* ---------- 搜索弹窗（点击导航搜索图标弹出） ---------- */
.search-modal {
    position: fixed; inset: 0; z-index: 200;
    display: none;
    align-items: flex-start; justify-content: center;
    padding-top: 18vh;
}
.search-modal.open { display: flex; }
.search-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 37, 64, .45);
    
    animation: searchFade 200ms var(--ease);
}
.search-modal-box {
    position: relative;
    width: min(620px, calc(100% - 36px));
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(10, 37, 64, .18);
    padding: 16px 18px;
    animation: searchPop 240ms var(--ease);
}
.search-modal-form { display: flex; align-items: center; gap: 10px; }
.search-modal-form .search-modal-icon { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; }
.search-modal-form input {
    flex: 1; min-width: 0; min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface); color: var(--ink);
    font-size: 15px; outline: none;
    transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.search-modal-form input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .18);
}
.search-modal-close {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    border: none; background: transparent;
    color: var(--ink-soft); cursor: pointer;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}
.search-modal-close:hover { background: var(--bg-deep); color: var(--ink); }
.search-modal-close svg { width: 18px; height: 18px; }
.search-modal-hint { margin: 12px 4px 0; font-size: 12px; }
@keyframes searchFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes searchPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
/* 移动端：顶部滑入全宽弹窗 */
@media (max-width: 900px) {
    .search-modal { padding-top: 0; align-items: flex-start; }
    .search-modal-box { width: 100%; border-radius: 0 0 16px 16px; padding: 14px; box-shadow: 0 16px 48px rgba(10, 37, 64, .22); }
    .search-modal-form .btn { padding: 0 16px; }
}
/* 搜索图标按钮加大、更醒目 */
.nav-icon-btn svg { width: 21px; height: 21px; }
.nav-icon-btn { width: 40px; height: 40px; }

/* 搜索入口：导航栏显眼按钮（图标+文字），点击弹出搜索弹窗 */
.nav-search-btn {
    height: 40px;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0 15px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}
.nav-search-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-search-btn:hover {
    border-color: var(--brand);
    color: var(--brand-strong);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .14);
}
/* 搜索弹窗内容加大 */
.search-modal-box { width: min(680px, calc(100% - 36px)); padding: 18px 20px; }
.search-modal-form .search-modal-icon { width: 24px; height: 24px; }
.search-modal-form input { min-height: 54px; padding: 0 18px; font-size: 16px; border-radius: 12px; }
.search-modal-form .btn { min-height: 54px; padding: 0 30px; font-size: 16px; font-weight: 650; flex-shrink: 0; border-radius: 12px; box-shadow: var(--shadow-btn); }
.search-modal-hint { font-size: 12.5px; }
/* 移动端：搜索按钮退化为纯图标，避免挤压 */
@media (max-width: 900px) {
    .nav-search-btn { padding: 0; width: 40px; justify-content: center; border: none; background: transparent; }
    .nav-search-btn:hover { background: var(--brand-soft); box-shadow: none; }
    .nav-search-label { display: none; }
    .nav-search-btn svg { width: 21px; height: 21px; }
}

/* ============================================================
   深色主题（data-theme="dark" 变量覆盖 + 关键硬编码修正）
   由导航栏主题切换按钮触发，localStorage 记忆偏好
   ============================================================ */
:root[data-theme="dark"] {
    --brand: #4d82ff;
    --brand-strong: #6b96ff;
    --brand-soft: rgba(46, 107, 255, .16);
    --brand-grad: linear-gradient(135deg, #4d82ff 0%, #00b8e6 100%);
    --accent: #00d4ff;
    --accent-soft: rgba(0, 212, 255, .12);
    --navy: #0a2540;

    --bg: #0b1524;
    --bg-deep: #101d2e;
    --surface: #142333;
    --surface-soft: #182a3d;
    --ink: #e8eef6;
    --ink-soft: #a7b8ca;
    --muted: #687e97;
    --line: #1c3042;
    --line-strong: #2a4058;

    --success: #3ecf8e;
    --success-soft: rgba(23, 178, 106, .14);
    --warning: #f0a35a;
    --warning-soft: rgba(232, 134, 45, .14);
    --danger: #f06068;
    --danger-soft: rgba(229, 72, 77, .14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .35), 0 16px 32px rgba(0, 0, 0, .4);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, .4);
    --shadow-brand: 0 2px 4px rgba(77, 130, 255, .3), 0 4px 8px rgba(77, 130, 255, .25);
    --shadow-btn: 0 2px 5px rgba(77, 130, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .1);
    --shadow-press: inset 0 2px 4px rgba(0, 0, 0, .5);
}
/* 深色模式下关键硬编码修正 */
:root[data-theme="dark"] body {
    background-image:
        linear-gradient(to right, rgba(77, 130, 255, .09) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(77, 130, 255, .09) 1px, transparent 1px);
}
:root[data-theme="dark"] .search-modal-backdrop { background: rgba(0, 0, 0, .62); }
:root[data-theme="dark"] .nav-cart .cart-badge { box-shadow: 0 0 0 2px var(--surface); }
:root[data-theme="dark"] .rich-content pre, :root[data-theme="dark"] .rich-area pre { background: #060d18; }
:root[data-theme="dark"] .rich-content code { background: var(--bg-deep); }
/* 主题切换按钮：浅色显示月亮（点击变深色），深色显示太阳 */
.theme-toggle .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }

/* 人工发货排队提示 */
.queue-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--warning);
    background: var(--warning-soft);
    border: 1px solid rgba(232, 134, 45, .3);
    border-radius: 7px;
    padding: 3px 8px;
    white-space: nowrap;
    max-width: 220px;
}
.queue-hint b { color: var(--warning); }

/* 动态购买字段可视化构建器 */
.cf-list { display: flex; flex-direction: column; gap: 8px; }
.cf-row {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.cf-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46, 107, 255, .12); }
.cf-row .cf-label { flex: 1 1 200px; min-width: 160px; }
.cf-row .cf-name { flex: 1 1 140px; min-width: 120px; font-family: ui-monospace, Consolas, monospace; }
.cf-req { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; cursor: pointer; }
.cf-req input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.cf-del {
    border: 1px solid rgba(229, 72, 77, .35);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 12.5px; font-weight: 600;
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}
.cf-del:hover { background: var(--danger); color: #fff; }

/* ===== 人工发货 · 处理中/排队状态卡片 ===== */
/* 呼吸脉冲点：主点 + 扩散光圈 */
@keyframes queue-dot-ring {
    0%   { transform: scale(.6); opacity: .65; }
    100% { transform: scale(2.2); opacity: 0; }
}
.queue-dot {
    position: relative;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--warning);
    flex: none;
}
.queue-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--warning);
    animation: queue-dot-ring 1.4s ease-out infinite;
}
/* 三格波浪处理动画条 */
@keyframes queue-bar-bounce {
    0%, 100% { transform: scaleY(.35); opacity: .45; }
    50%      { transform: scaleY(1); opacity: 1; }
}
.queue-bars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    flex: none;
}
.queue-bars i {
    width: 4px;
    height: 100%;
    border-radius: 4px;
    background: var(--warning);
    transform-origin: center;
    animation: queue-bar-bounce 1s ease-out infinite;
}
.queue-bars i:nth-child(2) { animation-delay: .18s; }
.queue-bars i:nth-child(3) { animation-delay: .36s; }

/* 状态卡片：人工处理中 */
.queue-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(232, 134, 45, .35);
    background: var(--warning-soft);
    border-radius: 14px;
    padding: 16px 18px;
}
.queue-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.queue-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--warning);
}
.queue-pos {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid rgba(232, 134, 45, .35);
    border-radius: 999px;
    padding: 4px 11px;
    white-space: nowrap;
}
.queue-pos b {
    color: var(--warning);
    font-size: 14px;
}
.queue-card .queue-bars { margin-left: auto; }
.queue-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.6;
}
.queue-card-foot::before {
    content: '';
    width: 4px;
    align-self: stretch;
    border-radius: 4px;
    background: rgba(232, 134, 45, .35);
    flex: none;
}

/* 列表内排队提示：升级为带动画点的胶囊 */
.queue-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--warning);
    background: var(--warning-soft);
    border: 1px solid rgba(232, 134, 45, .3);
    border-radius: 999px;
    padding: 3px 10px;
    max-width: 100%;
    white-space: normal;
}
.queue-hint::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--warning);
    flex: none;
    animation: queue-dot-ring 1.4s ease-out infinite;
}
.queue-hint b { color: var(--warning); font-size: 13px; }

/* 处理中状态徽章（买家列表）：徽章内嵌呼吸点 */
.status.processing {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(232, 134, 45, .35);
}
.status.processing::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--warning);
    flex: none;
    animation: queue-dot-ring 1.4s ease-out infinite;
}

/* 动效偏好：系统要求减弱动画时，停止全部排队动画 */
@media (prefers-reduced-motion: reduce) {
    .queue-dot::after,
    .queue-bars i,
    .queue-hint::before,
    .status.processing::before,
    .hp-badge,
    .hero-panel,
    .signal-grid.light .signal {
        animation: none;
        transform: none;
    }
    .queue-dot::after { opacity: 0; }
    .queue-bars i { transform: none; opacity: .6; }
}

/* 移动端：卡片与提示保持可读，不横向溢出 */
@media (max-width: 560px) {
    .queue-card { padding: 14px; }
    .queue-pos { margin-left: 0; }
    .queue-card .queue-bars { margin-left: 0; }
    .queue-card-head { gap: 8px; }
}

/* ============================================================
   后台「数据密集」风格（admin-dense 作用域，不影响前台 Stripe 蓝白）
   效率优先：紧凑间距 · 小字号 · 小按钮 · 颜色编码状态
   细边框 · 斑马纹表格 · 无装饰性渐变/大阴影
   ============================================================ */
body.admin-dense {
    /* 数据密集：去掉装饰性渐变网格背景，纯底色 */
    background-image: none;
    font-size: 13px;
}

.admin-dense .layout-admin {
    grid-template-columns: 208px minmax(0, 1fr);
    background-image: none;
}

.admin-dense .sidebar {
    padding: 12px 8px;
}

.admin-dense .sidebar h2 {
    margin: 0 8px 12px;
    font-size: 14px;
    font-weight: 700;
}

.admin-dense .sidebar h2::before {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.admin-dense .sidebar a {
    margin: 1px 0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.admin-dense .sidebar a.active {
    box-shadow: none;
}

.admin-dense .sidebar .side-group {
    margin: 10px 8px 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .6px;
}

.admin-dense .sidebar .side-group:first-of-type {
    margin-top: 2px;
}

.admin-dense .sidebar .side-foot {
    margin-top: 10px;
    padding-top: 8px;
}

.admin-dense .admin-main {
    padding: 14px 16px 32px;
}

.admin-dense .admin-main > h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.2px;
    margin: 2px 0 12px;
}

.admin-dense .admin-topbar {
    min-height: 44px;
    font-size: 13px;
    padding: 0 12px;
}

.admin-dense .admin-topbar .admin-title {
    font-size: 14px;
    font-weight: 700;
}

/* —— 表格：紧凑行 + uppercase 表头 + 斑马纹 + 细边框 —— */
.admin-dense .table-wrap {
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid var(--line);
}

.admin-dense table {
    border-collapse: collapse;
}

.admin-dense th,
.admin-dense td {
    padding: 5px 9px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    font-size: 12.5px;
}

.admin-dense th {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-soft);
    white-space: nowrap;
}

.admin-dense tbody tr:nth-child(even) td {
    background: var(--surface-soft);
}

.admin-dense tbody tr:hover td {
    background: var(--brand-soft);
}

.admin-dense td:first-child,
.admin-dense .mono,
.admin-dense code,
.admin-dense .order-no {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    font-size: 12px;
}

/* 数字类数据等宽对齐（ID / 金额 / 数量 / 时间） */
.admin-dense table td,
.admin-dense table th {
    font-variant-numeric: tabular-nums;
}

/* —— 状态标签：颜色编码小标签（蓝=信息 绿=正常 黄=待处理 红=异常） —— */
.admin-dense .status,
.admin-dense .badge {
    min-height: 19px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.admin-dense .status.warn,
.admin-dense .badge.warn {
    background: var(--warning-soft);
    color: var(--warning);
}

.admin-dense .status.bad,
.admin-dense .badge.bad {
    background: var(--danger-soft);
    color: var(--danger);
}

.admin-dense .status.ok,
.admin-dense .badge.ok,
.admin-dense .status.success {
    background: var(--success-soft);
    color: var(--success);
}

.admin-dense .status.processing::before {
    width: 6px;
    height: 6px;
}

/* —— 按钮：小尺寸、无上浮位移、无装饰辉光 —— */
.admin-dense .btn,
.admin-dense button {
    min-height: 27px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
    transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}

.admin-dense .btn:hover,
.admin-dense button:hover {
    transform: none;
    box-shadow: none;
}

.admin-dense .btn.pay,
.admin-dense button.pay {
    min-height: 27px;
}

.admin-dense .btn.danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: transparent;
}

.admin-dense .btn.danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: none;
}

.admin-dense .btn.secondary,
.admin-dense button.secondary {
    background: var(--surface);
    color: var(--ink-soft);
}

.admin-dense .btn.secondary:hover,
.admin-dense button.secondary:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
    transform: none;
}

.admin-dense .btn.ghost,
.admin-dense .btn-ghost {
    background: var(--surface);
    color: var(--ink-soft);
    box-shadow: none;
}

.admin-dense .btn.ghost:hover,
.admin-dense .btn-ghost:hover {
    transform: none;
    box-shadow: none;
}

/* 表格行内操作链接：紧凑文字按钮 */
.admin-dense .table-wrap a:not(.btn) {
    font-size: 12.5px;
}

/* —— 卡片 / 面板：紧凑 padding、细边框、小圆角、无大阴影 —— */
.admin-dense .panel,
.admin-dense .chart-card {
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: none;
    border-color: var(--line);
}

.admin-dense .chart-card h3 {
    font-size: 13px;
    margin-bottom: 8px;
}

.admin-dense .panel-danger {
    border-radius: 6px;
    box-shadow: none;
}

/* —— 统计卡：紧凑 —— */
.admin-dense .stats {
    gap: 8px;
    margin-bottom: 12px;
}

.admin-dense .stat {
    padding: 8px 10px;
    border-radius: 6px;
    box-shadow: none;
    border-color: var(--line);
}

.admin-dense .stat strong {
    margin-top: 2px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.admin-dense .dash-grid {
    gap: 10px;
    margin-top: 10px;
}

.admin-dense .dash-col {
    gap: 10px;
}

/* —— 表单：紧凑输入 —— */
.admin-dense label {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 600;
}

.admin-dense input,
.admin-dense select,
.admin-dense textarea {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 12.5px;
    box-shadow: none;
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.admin-dense input:focus,
.admin-dense select:focus,
.admin-dense textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(46, 107, 255, .22);
}

.admin-dense .form-grid {
    gap: 10px;
}

.admin-dense input[type="checkbox"],
.admin-dense input[type="radio"] {
    min-height: auto;
    width: auto;
    padding: 0;
    box-shadow: none;
}

/* —— 工具栏 / 提示条：紧凑 —— */
.admin-dense .toolbar {
    margin: 10px 0 8px;
}

.admin-dense .toolbar h2 {
    font-size: 17px;
    font-weight: 700;
}

.admin-dense .alert {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12.5px;
}

.admin-dense .cards-toolbar {
    gap: 8px;
    padding: 10px 12px;
}

.admin-dense .cards-toolbar-panel {
    padding: 0;
    border-radius: 6px;
    box-shadow: none;
}

/* —— 弹窗：紧凑 —— */
.admin-dense .modal {
    border-radius: 6px;
}

.admin-dense .modal-head {
    padding: 10px 14px;
}

.admin-dense .modal-head h3 {
    font-size: 14px;
}

.admin-dense .modal-body {
    padding: 12px 14px;
    font-size: 13px;
}

/* —— 深色模式下的斑马纹 / 表头 —— */
:root[data-theme="dark"] .admin-dense tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, .035);
}

:root[data-theme="dark"] .admin-dense tbody tr:hover td {
    background: rgba(46, 107, 255, .16);
}

:root[data-theme="dark"] .admin-dense th {
    background: rgba(255, 255, 255, .045);
}

/* —— 移动端：表格横向滚动、统计卡横排 —— */
@media (max-width: 900px) {
    .admin-dense .layout-admin {
        grid-template-columns: 1fr;
    }
    .admin-dense .admin-main {
        padding: 12px 12px 32px;
    }
    .admin-dense .stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    /* 移动端侧边栏抽屉：固定定位（消除 820px 通用规则歧义）+ 菜单过长时可滚动，
       避免底部菜单（系统设置/安全设置等）被裁出屏幕而“点击无反应” */
    .admin-dense .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 268px;
        height: 100vh;
        z-index: 130;
        transform: translateX(-105%);
        transition: transform 320ms ease-out;
        box-shadow: var(--shadow-lg);
        border-right: 1px solid var(--line);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-dense .sidebar.open { transform: translateX(0); }
    .admin-dense .sidebar .side-foot { padding-bottom: 28px; }
}

/* —— 移动端：后台列表保持列表样式（≤760px）——
   表格不转卡片，设最小宽度 + 横向滚动查看完整列；
   工具条 / 统计 / 批量栏 / 弹窗做移动端优化 */
@media (max-width: 760px) {
    .admin-dense .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-dense .table-wrap table {
        min-width: 820px;
    }
    .admin-dense .table-wrap td {
        white-space: nowrap;
    }
    .admin-dense .table-wrap td .muted,
    .admin-dense .table-wrap td .status {
        white-space: normal;
    }

    /* 工具条 / 统计 / 批量栏 */
    .admin-dense .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .admin-dense .toolbar > div,
    .admin-dense .toolbar form {
        width: 100%;
    }
    .admin-dense .toolbar input[type="text"],
    .admin-dense .toolbar select {
        max-width: none;
        width: 100%;
    }
    .admin-dense .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .admin-dense #batchBar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 120;
        box-shadow: 0 6px 24px rgba(15, 23, 42, .18);
    }

    /* 弹窗：底部抽屉式全屏 */
    .admin-dense .modal-overlay,
    .admin-dense .coupon-modal,
    .admin-dense #agentDetailModal,
    .admin-dense #deliverModal {
        align-items: flex-end !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    .admin-dense .modal-overlay .modal,
    .admin-dense .coupon-modal-box,
    .admin-dense #agentDetailModal > div,
    .admin-dense #deliverModal form {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 14px 14px 0 0 !important;
        max-height: 88vh;
        overflow-y: auto;
    }
    .admin-dense .modal-overlay {
        align-items: flex-end !important;
    }
}

/* —— 移动端体验增强（后台）：表格关键列固定 / 触控区加大 / tab 横滑 / 工具条全宽 —— */
@media (max-width: 900px) {
    /* 表格首列 + 末列固定：横向滚动时主标识与操作始终可见 */
    .admin-dense .table-wrap table th:first-child,
    .admin-dense .table-wrap table td:first-child {
        position: sticky;
        left: 0;
        z-index: 3;
    }
    .admin-dense .table-wrap table th:last-child,
    .admin-dense .table-wrap table td:last-child {
        position: sticky;
        right: 0;
        z-index: 4;
    }
    /* sticky 单元格背景不透明（覆盖白底 / 斑马纹 / hover / 深色模式） */
    .admin-dense .table-wrap table td:first-child,
    .admin-dense .table-wrap table td:last-child,
    .admin-dense .table-wrap table th:first-child,
    .admin-dense .table-wrap table th:last-child {
        background: #fff;
    }
    .admin-dense .table-wrap table tbody tr:nth-child(even) td:first-child,
    .admin-dense .table-wrap table tbody tr:nth-child(even) td:last-child {
        background: var(--surface-soft);
    }
    .admin-dense .table-wrap table tbody tr:hover td:first-child,
    .admin-dense .table-wrap table tbody tr:hover td:last-child {
        background: var(--brand-soft);
    }
    :root[data-theme="dark"] .admin-dense .table-wrap table td:first-child,
    :root[data-theme="dark"] .admin-dense .table-wrap table td:last-child,
    :root[data-theme="dark"] .admin-dense .table-wrap table th:first-child,
    :root[data-theme="dark"] .admin-dense .table-wrap table th:last-child {
        background: #0f172a;
    }
    :root[data-theme="dark"] .admin-dense .table-wrap table tbody tr:nth-child(even) td:first-child,
    :root[data-theme="dark"] .admin-dense .table-wrap table tbody tr:nth-child(even) td:last-child {
        background: rgba(255, 255, 255, .035);
    }
    :root[data-theme="dark"] .admin-dense .table-wrap table tbody tr:hover td:first-child,
    :root[data-theme="dark"] .admin-dense .table-wrap table tbody tr:hover td:last-child {
        background: rgba(46, 107, 255, .16);
    }
    /* 固定列分隔线，提示可滚动区域 */
    .admin-dense .table-wrap table th:first-child,
    .admin-dense .table-wrap table td:first-child {
        box-shadow: 2px 0 0 rgba(15, 23, 42, .06);
    }
    .admin-dense .table-wrap table th:last-child,
    .admin-dense .table-wrap table td:last-child {
        box-shadow: -2px 0 0 rgba(15, 23, 42, .06);
    }
    /* 固定列不折行，保持紧凑 */
    .admin-dense .table-wrap table th:first-child,
    .admin-dense .table-wrap table th:last-child,
    .admin-dense .table-wrap table td:first-child,
    .admin-dense .table-wrap table td:last-child {
        white-space: nowrap;
    }
}

@media (max-width: 760px) {
    /* 顶栏：菜单按钮触控区加大 */
    .admin-dense .admin-topbar {
        min-height: 48px;
        padding: 0 10px;
        gap: 10px;
    }
    .admin-dense .admin-topbar .admin-menu-btn {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .admin-dense .admin-topbar .admin-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    /* 分类 tab：一行横向滑动，不再换行占多行 */
    .admin-dense .tab-row {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
        padding: 2px 4px;
    }
    .admin-dense .tab-row a,
    .admin-dense .tab-row button {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 行内操作按钮：触控友好高度 */
    .admin-dense .table-wrap td:last-child .btn,
    .admin-dense .table-wrap td:last-child button,
    .admin-dense .table-wrap td:last-child a.btn {
        min-height: 34px;
        padding: 0 10px;
    }
    /* 操作列最大宽度，避免 sticky 列过宽遮挡内容 */
    .admin-dense .table-wrap table td:last-child,
    .admin-dense .table-wrap table th:last-child {
        max-width: 190px;
    }
    .admin-dense .table-wrap table td:last-child > div {
        max-height: 132px;
        overflow-y: auto;
    }

    /* 分页：按钮加大间距 */
    .admin-dense .page-btns a,
    .admin-dense .page-btns button,
    .admin-dense [style*="display:flex"] a.btn + a.btn {
        min-height: 32px;
    }

    /* 补齐其余弹窗：底部抽屉式 */
    .admin-dense #priceModal,
    .admin-dense #upstreamModal,
    .admin-dense #rechargeModal,
    .admin-dense #mappingModal {
        align-items: flex-end !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    .admin-dense #priceModal > div,
    .admin-dense #upstreamModal > div,
    .admin-dense #rechargeModal > div,
    .admin-dense #mappingModal > div {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 14px 14px 0 0 !important;
        max-height: 88vh;
        overflow-y: auto;
        box-sizing: border-box;
    }
}

@media (max-width: 560px) {
    /* 搜索 / 筛选输入与按钮全宽 */
    .admin-dense .toolbar form {
        flex-wrap: wrap;
    }
    .admin-dense .toolbar input[type="text"],
    .admin-dense .toolbar input[type="search"] {
        width: 100%;
        max-width: none !important;
        min-height: 38px;
    }
    .admin-dense .toolbar form button {
        flex: 1;
        min-height: 38px;
    }
    /* 统计卡：数值字号适配 */
    .admin-dense .stat strong {
        font-size: 17px;
    }
}

/* —— 前台滚动进场动画（reveal）：淡入 + 上浮，ease-out —— */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

.reveal.reveal-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* —— 推广中心：链接卡 / 提现表单 / 统计高亮 —— */
.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 6px;
}

.link-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 16px 16px 14px;
    transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}

.link-card:hover {
    border-color: rgba(46, 107, 255, .30);
    box-shadow: var(--shadow-md);
}

.link-card-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 10px;
}

.link-card-head h4 { margin: 0 0 3px; font-size: 15px; color: var(--ink); }
.link-card-head p { margin: 0; font-size: 12.5px; line-height: 1.55; }

.link-card-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
}

.link-card-icon.accent {
    background: rgba(0, 212, 255, .12);
    color: #0a7fae;
}

.link-card-icon svg { width: 20px; height: 20px; }

.link-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.link-row .secret {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 12.5px;
    margin: 0;
}

.link-row .copy-btn {
    flex-shrink: 0;
    min-width: 68px;
    align-self: center;
}

.payout-form { gap: 10px; margin-top: 12px; }
.payout-form label { margin-bottom: 4px; font-size: 13px; }

.stat.highlight {
    border-color: rgba(46, 107, 255, .35);
    background: linear-gradient(180deg, var(--brand-soft), var(--surface));
    color: var(--brand-strong);
}

@media (max-width: 560px) {
    .link-row { flex-direction: column; align-items: stretch; }
    .link-row .copy-btn { min-width: 0; }
}

/* —— 推广中心：多 Tab —— */
.aff-tabs {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    flex-wrap: wrap;
}

.aff-tab {
    flex: 1 1 auto;
    min-width: 84px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.aff-tab:hover { color: var(--ink); background: var(--surface); }

.aff-tab.active {
    background: var(--surface);
    color: var(--brand-strong);
    box-shadow: var(--shadow-sm);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* —— 推广中心：图表 —— */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.chart-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px 12px;
}

.chart-card h4 { margin: 0 0 10px; font-size: 14px; color: var(--ink); }

.chart-box { min-height: 200px; display: flex; align-items: center; justify-content: center; }

.chart-box svg { display: block; max-width: 100%; }

.chart-empty { font-size: 13px; text-align: center; padding: 40px 0; }






/* ============================================================


/* ============================================================
   Questly 风格后台主题（浅色版）
   保留 Questly 结构语言：浏览器交通灯 / 圆角 12px / 胶囊按钮 /
   侧边栏激活蓝条 / 分组小字 —— 配色回归 Stripe 蓝白浅色
   ============================================================ */
body.admin-dense {
    background-image: none;
}

.admin-dense .layout-admin { background-image: none; }

/* 侧边栏：白底 + 细线 + 激活蓝条 */
.admin-dense .sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
}
.admin-dense .sidebar h2 { color: var(--ink); }
.admin-dense .sidebar h2::before {
    background: linear-gradient(135deg, #2e6bff, #00d4ff);
    box-shadow: 0 2px 8px rgba(46, 107, 255, .35);
}
.admin-dense .sidebar a { color: var(--ink-soft); }
.admin-dense .sidebar a:hover { background: var(--brand-soft); color: var(--brand-strong); }
.admin-dense .sidebar a.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    box-shadow: inset 2px 0 0 #2e6bff;
}
.admin-dense .sidebar .side-group { color: var(--muted); }
.admin-dense .sidebar .side-foot { border-top: 1px solid var(--line); }
.admin-dense .sidebar .side-foot a { color: var(--muted); }

/* 顶栏：白底 + 浏览器交通灯 */
.admin-dense .admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.admin-dense .admin-topbar .admin-title { color: var(--ink); }
.admin-dense .admin-topbar a { color: var(--ink-soft); }
.admin-dense .admin-topbar a:hover { color: var(--brand-strong); }
.admin-dense .tl-dots { display: inline-flex; gap: 6px; margin-right: 10px; align-items: center; }
.admin-dense .tl-dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.admin-dense .tl-dots .tl-r { background: #ff5f57; }
.admin-dense .tl-dots .tl-y { background: #febc2e; }
.admin-dense .tl-dots .tl-g { background: #28c840; }

/* 面板 / 统计卡：白底 + 圆角 12px */
.admin-dense .panel,
.admin-dense .chart-card,
.admin-dense .cards-toolbar-panel,
.admin-dense .panel-danger,
.admin-dense .stat,
.admin-dense .table-wrap {
    border-radius: 12px;
    border-color: var(--line);
    background: var(--surface);
}
.admin-dense .stat strong { color: var(--ink); }

/* 表格浅色 */
.admin-dense th { background: var(--surface-soft); color: var(--muted); }
.admin-dense tbody tr:nth-child(even) td { background: var(--surface-soft); }
.admin-dense tbody tr:hover td { background: var(--brand-soft); }

/* 表单浅色 */
.admin-dense input,
.admin-dense select,
.admin-dense textarea {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
}
.admin-dense input::placeholder { color: var(--muted); }
.admin-dense select option { background: #fff; color: var(--ink); }

/* 按钮：胶囊（Questly rounded-full） */
.admin-dense .btn,
.admin-dense button {
    border-radius: 999px;
}
.admin-dense .btn.secondary,
.admin-dense button.secondary,
.admin-dense .btn.ghost,
.admin-dense .btn-ghost {
    background: var(--surface);
    color: var(--ink-soft);
    border-color: var(--line-strong);
}
.admin-dense .btn.secondary:hover,
.admin-dense button.secondary:hover,
.admin-dense .btn.ghost:hover,
.admin-dense .btn-ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }

/* 状态徽章：胶囊 */
.admin-dense .status,
.admin-dense .badge { border-radius: 999px; }

/* 弹窗浅色 */
.admin-dense .modal {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.admin-dense .modal-head { border-bottom: 1px solid var(--line); }
.admin-dense .modal-head h3 { color: var(--ink); }
.admin-dense .modal-body { color: var(--ink-soft); }

/* 标题与提示 */
.admin-dense .toolbar h2,
.admin-dense .admin-main > h2,
.admin-dense .chart-card h3 { color: var(--ink); }
.admin-dense .chart-card .sub { color: var(--muted); }
.admin-dense .bar-key { color: var(--ink); }
.admin-dense .empty-state { color: var(--muted); }
.admin-dense .chart-legend { color: var(--ink-soft); }
.admin-dense .alert { border-color: rgba(229, 72, 77, .35); }
.admin-dense .toolbar { color: var(--ink-soft); }

/* 行内操作链接 */
.admin-dense .table-wrap a:not(.btn) { color: var(--brand-strong); }
.admin-dense .table-wrap a:not(.btn):hover { color: #2e6bff; }

/* ============ 买家个人中心 · 控制台风格（Data Dense） ============ */
.panel.console { padding: 14px; }
.console .toolbar { margin-bottom: 10px; gap: 10px; }
.console .toolbar h2 { font-size: 18px; }
.console .toolbar p { font-size: 12.5px; }
.console .btn { min-height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 6px; }
.console .btn.secondary { font-weight: 500; }

/* 统计条：紧凑 KPI */
.console .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.console .stat { padding: 10px 12px; border-radius: 8px; box-shadow: none; font-size: 12px; color: var(--ink-soft); }
.console .stat strong { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 17px; color: var(--ink); margin-top: 2px; }

/* Tab 导航：紧凑 */
.console .aff-tabs { margin-bottom: 10px; gap: 4px; }
.console .aff-tab { padding: 6px 12px; font-size: 13px; border-radius: 6px; }

/* 表格：高密度 */
.console .table-wrap { border-radius: 8px; }
.console table th { padding: 7px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.console table td { padding: 7px 10px; font-size: 13px; vertical-align: middle; }
.console table td b[style*="monospace"],
.console table td b[style*="Monaco"] { font-size: 12px; }
.console .status { font-size: 12px; padding: 2px 8px; }
.console .table-wrap .btn { min-height: 26px; padding: 0 10px; font-size: 12px; }

/* 卡密库：紧凑卡片 */
.console .signal-grid { gap: 8px; }
.console .signal { padding: 10px 12px; border-radius: 8px; box-shadow: none; }
.console .signal strong { font-size: 12.5px; }
.console .signal .muted { font-size: 11.5px; }
.console .secret { font-size: 12px; margin: 6px 0; }
.console .signal .btn { min-height: 26px; padding: 0 10px; font-size: 12px; }

/* 表单与提示：紧凑 */
.console .form-grid label { font-size: 12.5px; }
.console .form-grid input { font-size: 13px; padding: 7px 10px; border-radius: 6px; }
.console .empty-state { padding: 22px 14px; font-size: 13px; }
.console .alert { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.console .muted { font-size: 12.5px; }

/* ============ 买家个人中心 · 左侧菜单 + 右侧内容（桌面端） ============ */
.console-shell { display: block; }

/* 桌面端（≥992px）：左右布局 */
@media (min-width: 992px) {
    .console .console-shell {
        display: grid;
        grid-template-columns: 212px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }
    .console .console-side {
        position: sticky;
        top: 84px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        padding: 8px;
    }
    .console .console-user {
        padding: 10px 10px 12px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 8px;
    }
    .console .console-user-name {
        font-size: 14px;
        font-weight: 600;
        color: var(--ink);
        word-break: break-all;
        line-height: 1.4;
    }
    .console .console-user-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
    .console .console-menu { display: flex; flex-direction: column; gap: 2px; }
    .console .console-menu-item {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 8px 10px;
        font-size: 13px;
        color: var(--ink-soft);
        background: none;
        border: 0;
        border-radius: 6px;
        cursor: pointer;
        text-align: left;
        font-family: inherit;
        text-decoration: none;
        transition: background 150ms ease-out, color 150ms ease-out;
    }
    .console .console-menu-item:hover { background: var(--brand-soft); color: var(--brand-strong); }
    .console .console-menu-item.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
    .console .console-menu-item.danger { color: #d14343; }
    .console .console-menu-item.danger:hover { background: rgba(209, 67, 67, .08); color: #d14343; }
    .console .console-menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
    .console .console-badge {
        margin-left: auto;
        min-width: 18px;
        height: 18px;
        padding: 0 6px;
        border-radius: 999px;
        background: rgba(46, 107, 255, .1);
        color: var(--brand-strong);
        font-size: 11px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    .console .console-badge.ok { background: rgba(22, 163, 74, .1); color: #16a34a; }
    .console .console-badge.warn { background: rgba(245, 158, 11, .12); color: #b45309; }
    .console .console-badge.bad { background: rgba(209, 67, 67, .1); color: #d14343; }
    /* 桌面端：顶部 tab 隐藏，由左侧菜单承担切换 */
    .console .aff-tabs { display: none; }
    .console .console-main { min-width: 0; }
}

/* 平板/移动（<992px）：恢复上下布局，侧栏隐藏，顶部 tab 显示 */
@media (max-width: 991.98px) {
    .console .console-side { display: none; }
    .console .console-main { min-width: 0; }
}

/* ============ 买家个人中心 · 移动端横向导航条（<992px 显示，≥992px 隐藏） ============ */
.console-mobile-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.console-mobile-nav::-webkit-scrollbar { display: none; }
.console-mobile-link {
    flex: 0 0 auto;
    padding: 7px 13px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s ease;
}
.console-mobile-link.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-strong);
    font-weight: 600;
}
@media (min-width: 992px) {
    .console-mobile-nav { display: none; }
}

/* 商品详情页单列时隐藏购买卡头部（主区已承担名称/价格）——置于文件末尾保证覆盖旧规则 */
@media (max-width: 1079.98px) {
    .detail-buy .buy-head { display: none; }
}
/* 首页「按分类逛」大卡片（Stripe 风格） */
.cat-section { margin-top: 1.5rem; }
.cat-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.cat-section-head h3 { margin: 0; font-size: 18px; font-weight: 600; color: #0a2540; }
.cat-section-head .all-link { font-size: 13px; color: #635bff; font-weight: 500; text-decoration: none; transition: color .2s ease-out; }
.cat-section-head .all-link:hover { text-decoration: underline; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 22px 12px; background: #fff;
    border: 1px solid #e3e8ef; border-radius: 12px;
    text-decoration: none; color: #0a2540;
    box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 8px 16px rgba(0,0,0,.08);
    transition: transform .3s ease-out, box-shadow .3s ease-out, border-color .2s ease-out;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(0,0,0,.06), 0 16px 32px rgba(0,0,0,.1); }
.cat-card.active { border-color: #635bff; box-shadow: 0 2px 4px rgba(99,91,255,.18), 0 8px 16px rgba(99,91,255,.12); }
.cat-card .cat-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: #635bff; background: #eef1ff; }
.cat-card .cat-ico img { width: 32px; height: 32px; object-fit: contain; }
.cat-card .cat-ico.emoji { width: auto; height: auto; background: transparent; font-size: 30px; line-height: 1; }
.cat-card .cat-name { font-size: 14px; font-weight: 500; color: #0a2540; }
@media (max-width: 640px) {
    .cat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
    .cat-card { padding: 16px 10px; }
}

/* ═══════════ 首页 Apple 极简风（复刻 gptibo.com） ═══════════ */
.hero-center { text-align: center; padding: 56px 0 28px; }
.hero-center .hero-copy { max-width: 720px; margin: 0 auto; }
.hero-center h1 { font-size: 42px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; color: #1d1d1f; margin: 10px 0 0; }
.hero-center p { font-size: 16px; color: #6e6e73; margin: 14px auto 26px; max-width: 560px; }
.hero-center .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0 36px; }
.stats-strip .stat-card { background: #fff; border: 1px solid #e9e9ec; border-radius: 18px; padding: 18px 16px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.stat-card strong { display: block; font-size: 24px; font-weight: 600; color: #1d1d1f; letter-spacing: -.01em; }
.stat-card span { font-size: 13px; color: #6e6e73; }
.cat-pills { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 4px 0 32px; }
.cat-pills .pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid #e5e5e8; color: #1d1d1f; font-size: 14px; text-decoration: none; transition: background .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
.cat-pills .pill:hover { background: #f5f5f7; }
.cat-pills .pill.on { background: #0071e3; border-color: #0071e3; color: #fff; }
.cat-pills .pill img { width: 16px; height: 16px; object-fit: contain; }
.apple-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.apple-card { background: #fff; border-radius: 20px; border: 1px solid #e9e9ec; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: transform .3s ease-out, box-shadow .3s ease-out; }
.apple-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.apple-visual { height: 150px; display: flex; align-items: center; justify-content: center; background: #f5f5f7; font-size: 40px; font-weight: 600; color: #c7c7cc; }
.apple-visual img { width: 100%; height: 100%; object-fit: cover; }
.apple-body { padding: 16px 18px 18px; }
.apple-meta { font-size: 12px; color: #86868b; margin-bottom: 6px; }
.apple-body h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: #1d1d1f; }
.apple-body .card-desc { font-size: 13px; color: #86868b; margin: 0 0 14px; }
.apple-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.apple-price { font-size: 20px; font-weight: 600; color: #1d1d1f; line-height: 1; }
.apple-price .promo-tag { font-size: 11px; font-weight: 500; color: #0071e3; background: #e8f1fd; padding: 2px 7px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.apple-price s { font-size: 13px; color: #b0b0b8; font-weight: 400; margin-left: 4px; }
.apple-price .alt-price { display: block; font-size: 11px; color: #86868b; font-weight: 400; margin-top: 3px; }
.pill-btn { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 999px; background: #0071e3; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .2s ease-out, transform .2s ease-out; }
.pill-btn:hover { background: #06c; }
.pill-btn.ghost { background: #fff; color: #1d1d1f; border: 1px solid #e5e5e8; }
.pill-btn.ghost:hover { background: #f5f5f7; }
.pill-btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.order-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: #fff; border: 1px solid #e9e9ec; border-radius: 20px; padding: 24px 28px; margin-top: 36px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.order-banner strong { font-size: 16px; color: #1d1d1f; font-weight: 600; }
.order-banner p { margin: 5px 0 0; font-size: 13px; color: #86868b; }
@media (max-width: 640px) {
    .hero-center h1 { font-size: 30px; }
    .stats-strip { grid-template-columns: 1fr; gap: 10px; }
    .apple-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .apple-visual { height: 110px; font-size: 30px; }
    .order-banner { padding: 18px 20px; }
}

/* ═══════════ gptibo.com 1:1 复刻（Apple 极简风） ═══════════ */
body {
    background: #fafafa;
    background-image: none;
    font-family: 'Geist Variable', 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #1d1d1f;
}

/* ---- 导航 ---- */
.topbar {
    position: sticky; top: 0; z-index: 60;
    background: rgba(250,250,250,.88);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: .8px solid #e5e5e8;
    height: 66px;
}
.topbar-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar .shop-brand-name { font-size: 17px; font-weight: 600; color: #1d1d1f; letter-spacing: -.01em; }
.topbar .nav { display: flex; align-items: center; gap: 2px; }
.topbar .nav a {
    font-size: 14px; color: #1d1d1f; padding: 8px 12px; border-radius: 8px; text-decoration: none;
    transition: background .2s ease-out, color .2s ease-out;
}
.topbar .nav a:hover { background: #f5f5f7; }
.topbar .nav a.active { color: #0071e3; font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-actions .nav-search-btn,
.nav-actions .nav-icon-btn {
    width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: #1d1d1f; text-decoration: none; cursor: pointer;
    transition: background .2s ease-out;
}
.nav-actions .nav-search-btn:hover,
.nav-actions .nav-icon-btn:hover { background: #f5f5f7; }
.nav-actions .nav-search-btn svg,
.nav-actions .nav-icon-btn svg { width: 18px; height: 18px; }
.nav-actions .nav-search-label { display: none; }
.nav-actions .nav-login {
    padding: 7px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 500;
    text-decoration: none; transition: background .2s ease-out, box-shadow .2s ease-out;
}
.nav-actions .nav-login:hover { background: var(--brand-strong); box-shadow: 0 2px 6px rgba(0,113,227,.35); }
.nav-actions .nav-toggle { width: 36px; height: 36px; border-radius: 10px; border: none; background: transparent; color: #1d1d1f; display: none; align-items: center; justify-content: center; cursor: pointer; }
.nav-actions .nav-toggle svg { width: 20px; height: 20px; }
.cart-badge {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: #0071e3; color: #fff; font-size: 10px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.nav-cart { position: relative; }

/* ---- 页脚 ---- */
.site-footer { background: #fafafa; margin-top: 56px; padding: 56px 0 20px; }
.footer-top {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand-wrap { display: flex; flex-direction: column; gap: 8px; }
.footer-brand-wrap .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-brand-wrap .shop-brand-name { font-size: 16px; font-weight: 600; color: #1d1d1f; }
.footer-tagline { font-size: 13px; color: #86868b; }
.footer-contact { display: flex; gap: 14px; align-items: center; }
.footer-contact .contact-item { font-size: 13px; color: #6e6e73; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.footer-contact .contact-item:hover { color: #0071e3; }
.footer-links {
    max-width: 1100px; margin: 28px auto 0; padding: 0 24px;
    display: flex; flex-wrap: wrap; gap: 10px 24px;
}
.footer-links a { font-size: 13px; color: #6e6e73; text-decoration: none; transition: color .2s ease-out; }
.footer-links a:hover { color: #1d1d1f; }
.footer-bottom {
    max-width: 1100px; margin: 28px auto 0; padding: 16px 24px 0;
    border-top: .8px solid #e5e5e8;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    font-size: 12px; color: #86868b;
}
.footer-bottom a { color: #86868b; text-decoration: none; }
.footer-bottom a:hover { color: #1d1d1f; }

/* ---- 首页 hero ---- */
.store-intro {
    max-width: 1100px; margin: 0 auto; padding: 56px 24px 0;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.store-intro h1 { margin: 0; font-size: 40px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; color: #1d1d1f; }
.store-intro h1 span { color: #6e6e73; }
.store-intro p { margin: 14px 0 0; font-size: 16px; color: #6e6e73; max-width: 560px; }
.store-intro-support { display: flex; align-items: center; gap: 12px; padding-bottom: 6px; }
.store-intro-support span { font-size: 13px; color: #86868b; }
.text-button { font-size: 13px; color: #0071e3; background: none; border: none; cursor: pointer; text-decoration: none; }
.text-button:hover { text-decoration: underline; }

/* ---- 经营统计 ---- */
.store-stats {
    max-width: 1100px; margin: 30px auto 0; padding: 0 24px 30px;
    border-bottom: .8px solid #e5e5e8;
    display: flex; gap: 36px; flex-wrap: wrap;
}
.store-stats strong { font-size: 22px; font-weight: 600; color: #1d1d1f; letter-spacing: -.01em; }
.store-stats span { font-size: 12px; color: #86868b; margin-left: 8px; }

/* ---- 分类筛选 ---- */
.store-categories {
    max-width: 1100px; margin: 26px auto 0; padding: 0 24px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.store-cat {
    display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
    border-radius: 12px; font-size: 12px; color: #1d1d1f; text-decoration: none;
    border: .8px solid transparent; background: transparent;
    transition: background .2s ease-out, border-color .2s ease-out;
}
.store-cat:hover { background: #f5f5f7; }
.store-cat.on { background: #f0f0f2; font-weight: 500; }
.store-cat img { width: 16px; height: 16px; object-fit: contain; }

/* ---- 商品网格与卡片 ---- */
.store-product-group {
    max-width: 1100px; margin: 30px auto 0; padding: 0 24px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(293px, 1fr)); gap: 18px;
}
.store-product {
    background: #fff; border-radius: 23px; padding: 23px;
    box-shadow: 0 8px 25px rgba(0,0,0,.016);
    display: flex; flex-direction: column;
    transition: transform .3s ease-out, box-shadow .3s ease-out;
}
.store-product:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.store-product-heading h3 { margin: 0; font-size: 24px; font-weight: 600; color: #1d1d1f; letter-spacing: -.01em; }
.store-spec { margin: 8px 0 0; font-size: 11px; color: #6e6e73; }
.store-visual {
    margin-top: 18px; height: 130px; border-radius: 14px; background: #f5f5f7;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    font-size: 40px; font-weight: 600; color: #c7c7cc;
}
.store-visual img { width: 100%; height: 100%; object-fit: cover; }
.store-desc { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: #86868b; }
.store-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.store-price { font-size: 22px; font-weight: 600; color: #1d1d1f; line-height: 1; }
.store-price small { font-size: 11px; font-weight: 400; color: #86868b; margin-left: 2px; }
.store-price .promo-tag { font-size: 11px; font-weight: 500; color: #0071e3; background: #e8f1fd; padding: 2px 7px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.store-price s { font-size: 13px; color: #b0b0b8; font-weight: 400; margin-left: 4px; }
.store-price .alt-price { display: block; font-style: normal; font-size: 11px; color: #86868b; font-weight: 400; margin-top: 4px; }
.store-btn {
    display: inline-flex; align-items: center; height: 30px; padding: 0 15px;
    border-radius: 999px; background: #0071e3; color: #fff;
    font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap;
    transition: background .2s ease-out;
}
.store-btn:hover { background: #06c; }
.store-btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ---- 订单横幅（gptibo 视觉） ---- */
.order-banner {
    max-width: 1100px; margin: 36px auto 0; padding: 26px 30px;
    background: #fff; border: none; border-radius: 23px;
    box-shadow: 0 8px 25px rgba(0,0,0,.016);
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.order-banner strong { font-size: 16px; font-weight: 600; color: #1d1d1f; }
.order-banner p { margin: 5px 0 0; font-size: 13px; color: #86868b; }
.order-banner .pill-btn.ghost { border-radius: 999px; height: 30px; padding: 0 15px; font-size: 12px; background: #fff; color: #1d1d1f; border: .8px solid #e5e5e8; display: inline-flex; align-items: center; text-decoration: none; }
.order-banner .pill-btn.ghost:hover { background: #f5f5f7; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .topbar-inner { padding: 0 16px; }
    .topbar .nav {
        position: absolute; top: 66px; left: 0; right: 0;
        background: #fff; border-bottom: .8px solid #e5e5e8; box-shadow: 0 8px 20px rgba(0,0,0,.06);
        flex-direction: column; align-items: stretch; padding: 10px 16px 14px; gap: 2px;
        display: none;
    }
    .topbar .nav.open { display: flex; }
    .topbar .nav a { padding: 11px 12px; font-size: 15px; }
    .nav-actions .nav-toggle { display: inline-flex; }
    .store-intro { padding-top: 40px; }
    .store-intro h1 { font-size: 32px; }
}
@media (max-width: 640px) {
    .store-intro { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 32px; }
    .store-intro h1 { font-size: 28px; }
    .store-intro p { font-size: 15px; }
    .store-stats { gap: 20px; }
    .store-stats strong { font-size: 19px; }
    .store-product-group { grid-template-columns: 1fr; gap: 14px; }
    .store-visual { height: 110px; font-size: 32px; }
    .store-product { padding: 20px; }
    .store-product-heading h3 { font-size: 21px; }
    .order-banner { padding: 20px; }
    .footer-top { flex-direction: column; gap: 18px; }
    .footer-links { gap: 8px 18px; }
    .topbar .shop-brand-name { font-size: 15px; }
}

/* ═══════════ 桌面两栏布局（左分类侧栏 + 右主内容，参考 gptibo 商店页） ═══════════ */
.store-layout {
    max-width: 1100px; margin: 0 auto; padding: 44px 24px 0;
    display: flex; align-items: flex-start; gap: 40px;
}
.store-sidebar { width: 200px; flex-shrink: 0; position: sticky; top: 88px; }
.sidebar-label {
    display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    color: #86868b; margin-bottom: 10px;
}
.sidebar-cats { display: flex; flex-direction: column; gap: 2px; }
.store-sidebar .store-cat {
    width: 100%; justify-content: flex-start; height: 34px; padding: 0 10px;
    border-radius: 8px; font-size: 13px; gap: 7px;
}
.sidebar-aux {
    margin-top: 18px; padding-top: 16px; border-top: .8px solid #e5e5e8;
    display: flex; flex-direction: column; gap: 8px;
}
.sidebar-aux a { font-size: 13px; color: #6e6e73; text-decoration: none; transition: color .2s ease-out; }
.sidebar-aux a:hover { color: #1d1d1f; }

.store-main { flex: 1; min-width: 0; }
.store-intro { padding-top: 0; }
.store-intro h1 { font-size: 38px; }
.store-stats { margin-top: 22px; padding-bottom: 22px; }

.toolbar { margin-top: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; font-size: 22px; font-weight: 600; color: #1d1d1f; letter-spacing: -.01em; }
.toolbar .muted { margin: 6px 0 0; font-size: 13px; }

.search-bar { margin: 0; width: auto; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form .search-input {
    height: 32px; border-radius: 999px; border: .8px solid #e5e5e8; background: #fff;
    padding: 0 14px; font-size: 12px; color: #1d1d1f; width: 220px; outline: none;
    transition: box-shadow .2s ease-out, border-color .2s ease-out;
}
.search-form .search-input:focus { border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.search-form .search-submit {
    height: 32px; padding: 0 14px; border-radius: 999px; background: #0071e3; color: #fff;
    border: none; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .2s ease-out;
}
.search-form .search-submit:hover { background: #06c; }
.search-form .btn.secondary { height: 32px; border-radius: 999px; font-size: 12px; padding: 0 12px; display: inline-flex; align-items: center; }

/* 两栏内商品 2 列大卡（同 gptibo 商店页） */
.store-layout .store-product-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1023px) {
    .store-layout { display: block; padding: 32px 24px 0; }
    .store-sidebar { position: static; width: auto; margin-bottom: 24px; }
    .sidebar-label, .sidebar-aux { display: none; }
    .sidebar-cats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .store-sidebar .store-cat { width: auto; justify-content: center; height: 32px; padding: 0 12px; border-radius: 12px; font-size: 12px; }
    .search-form .search-input { width: 170px; }
}
@media (max-width: 640px) {
    .store-layout { padding: 24px 16px 0; }
    .store-layout .store-product-group { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: flex-start; gap: 14px; }
    .search-bar { width: 100%; }
    .search-form { width: 100%; }
    .search-form .search-input { flex: 1; width: auto; }
}

/* ═══════════ 移动端重构（参考 gptibo 手机商店页） ═══════════ */
@media (max-width: 640px) {
    .store-intro { padding-top: 6px; }
    .store-intro h1 { font-size: 24px; }
    .store-intro p { font-size: 13px; margin-top: 8px; }
    .store-intro-support { display: none; }

    /* 统计更紧凑 */
    .store-stats { margin-top: 14px; padding-bottom: 14px; gap: 14px; }
    .store-stats strong { font-size: 16px; }
    .store-stats span { font-size: 11px; margin-left: 5px; }

    /* 分类横向滚动一行 */
    .store-sidebar { margin-bottom: 16px; }
    .sidebar-cats { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
    .sidebar-cats::-webkit-scrollbar { display: none; }
    .store-sidebar .store-cat { white-space: nowrap; flex-shrink: 0; }

    /* 标题与搜索框同行 */
    .toolbar { flex-direction: row; align-items: center; gap: 12px; }
    .toolbar h2 { font-size: 18px; white-space: nowrap; }
    .toolbar .muted { display: none; }
    .search-bar { width: auto; flex: 1; display: flex; justify-content: flex-end; }
    .search-form { width: 100%; justify-content: flex-end; }
    .search-form .search-input { flex: 0 1 150px; width: 150px; height: 30px; font-size: 12px; padding: 0 12px; }
    .search-form .search-submit { display: none; }

    /* 商品卡：左文右叠卡横向布局 */
    .store-layout .store-product-group { grid-template-columns: 1fr; gap: 12px; }
    .store-product {
        display: grid;
        grid-template-columns: 1fr 92px;
        grid-template-areas: "head visual" "desc visual" "foot visual";
        gap: 10px 14px; padding: 16px; border-radius: 18px;
    }
    .store-product-heading { grid-area: head; min-width: 0; }
    .store-product-heading h3 { font-size: 18px; }
    .store-spec { margin-top: 4px; }
    .store-desc {
        grid-area: desc; margin: 0; font-size: 12px; line-height: 1.45;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .store-foot { grid-area: foot; margin: 0; padding: 0; align-items: flex-end; gap: 10px; }
    .store-price { font-size: 17px; }
    .store-price .alt-price { display: none; }
    .store-btn { height: 28px; padding: 0 12px; font-size: 11px; }
    .store-visual { grid-area: visual; position: relative; height: 92px; margin: 0; border-radius: 14px; font-size: 30px; }
    .store-visual::before {
        content: ""; position: absolute; inset: 0; border-radius: 14px;
        background: #f0f0f2; transform: translate(5px, 5px); z-index: 0;
    }
    .store-visual img, .store-visual span { position: relative; z-index: 1; }
}

/* ═══════════ 窄屏搜索框修正（小胶囊 + 与标题同行） ═══════════ */
@media (max-width: 1023px) {
    .toolbar { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 12px; }
    .toolbar .muted { display: none; }
    .search-bar { width: auto; flex: 0 1 auto; display: flex; justify-content: flex-end; }
    .search-form { width: auto; justify-content: flex-end; }
    .search-form .search-input { width: 120px; flex: 0 1 120px; height: 28px; min-width: 0; min-height: 28px; font-size: 12px; padding: 0 12px; }
    .search-form .search-submit { display: none; }
    .toolbar h2 { white-space: nowrap; }
}

/* ═══════════ 搜索框横向强制修复（旧 600px 段 column 干扰） ═══════════ */
.toolbar .search-form { flex-direction: row; align-items: center; }
@media (max-width: 640px) {
    .toolbar .search-form { flex-direction: row; align-items: center; height: auto; }
    .toolbar .search-form .search-input { height: 28px; min-height: 28px; max-height: 28px; width: 120px; flex: 0 1 120px; box-sizing: border-box; }
}

/* ═══════════ 移动端卡片紧凑化（省略描述，参考 gptibo 手机商店卡） ═══════════ */
@media (max-width: 640px) {
    .store-product {
        grid-template-areas: "head visual" "foot visual";
        grid-template-columns: 1fr 92px;
        gap: 14px;
        align-items: center;
    }
    .store-desc { display: none; }
    .store-spec { margin-top: 4px; font-size: 12px; }
    .store-visual { height: 92px; }
    .store-foot { margin: 0; padding: 0; }
}

/* ═══════════ 移动端卡片：左图右文（标题+库存角标 / 价格+按钮） ═══════════ */
.store-stock { display: none; }
@media (max-width: 640px) {
    .store-product {
        grid-template-columns: 88px 1fr;
        grid-template-areas: "visual head" "visual foot";
        gap: 12px 14px;
        align-items: center;
        padding: 14px 16px;
    }
    .store-product-heading { grid-area: head; }
    .store-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
    .store-head-row h3 { font-size: 17px; line-height: 1.3; }
    .store-spec { margin-top: 4px; font-size: 12px; }
    .store-visual { grid-area: visual; height: 88px; width: 88px; border-radius: 14px; font-size: 26px; }
    .store-visual::before { display: none; }
    .store-stock {
        display: inline-block; flex-shrink: 0;
        font-size: 10px; color: #86868b; background: #f5f5f7;
        padding: 2px 8px; border-radius: 999px; white-space: nowrap;
    }
    .store-stock.out { color: #e03400; background: #fff0ea; }
    .store-foot { grid-area: foot; margin: 0; padding: 0; align-items: center; }
    .store-price { font-size: 17px; }
    .store-btn { height: 28px; padding: 0 13px; font-size: 11px; }
}

/* ═══════════ 窄屏收窄左右边距（卡片更宽） ═══════════ */
@media (max-width: 1023px) {
    .store-layout { padding: 28px 12px 0; }
    .store-intro, .store-stats, .toolbar, .store-categories { padding-left: 12px; padding-right: 12px; }
    .order-banner { margin-left: 12px; margin-right: 12px; }
}
@media (max-width: 640px) {
    .store-layout { padding: 20px 12px 0; }
    .store-intro, .store-stats, .toolbar, .store-categories { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 1023px) {
    .store-product-group { padding-left: 0; padding-right: 0; }
}

/* ═══════════ 移动端卡片：右侧三色叠卡视觉（参考 gptibo 手机商店卡） ═══════════ */
@media (max-width: 640px) {
    .store-visual {
        position: relative;
        isolation: isolate;
        background: linear-gradient(135deg, #7c4dff, #b06bff);
    }
    .store-visual::before {
        content: "";
        position: absolute; inset: 0;
        display: block;
        background: linear-gradient(135deg, #ffb340, #ffd60a);
        border-radius: 14px;
        z-index: -2;
        transform: translate(7px, 6px) rotate(3deg);
    }
    .store-visual::after {
        content: "";
        position: absolute; inset: 0;
        display: block;
        background: linear-gradient(135deg, #0a84ff, #64d2ff);
        border-radius: 14px;
        z-index: -1;
        transform: translate(3px, 2px) rotate(1deg);
    }
    .store-visual img, .store-visual span { position: relative; z-index: 1; }
    .store-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
}

/* ═══════════ 移动端卡片：纵向排布（标题+库存 / 整宽图 / 价格+按钮） ═══════════ */
@media (max-width: 640px) {
    .store-product {
        grid-template-columns: 1fr;
        grid-template-areas: "head" "visual" "foot";
        gap: 10px 0;
        padding: 14px 16px;
    }
    .store-product-heading { grid-area: head; }
    .store-head-row h3 { font-size: 17px; line-height: 1.3; }
    .store-spec { margin-top: 2px; font-size: 12px; }
    .store-visual {
        grid-area: visual;
        width: 100%; height: 120px;
        border-radius: 14px;
        position: relative; isolation: isolate;
        background: #f2f2f4;
    }
    .store-visual::before, .store-visual::after { display: none; }
    .store-visual img {
        width: 100%; height: 100%; object-fit: cover;
        border-radius: 14px; position: relative; z-index: 1;
    }
    .store-visual span {
        position: relative; z-index: 1;
        display: flex; align-items: center; justify-content: center;
        width: 100%; height: 100%;
        font-size: 34px; font-weight: 600; color: #c7c7cc;
    }
    .store-foot { grid-area: foot; margin: 0; padding: 0; }
    .store-price { font-size: 17px; }
    .store-btn { height: 28px; padding: 0 13px; font-size: 11px; }
}

/* ═══════════ 产品详情页 gptibo 同风格（白卡23px圆角 / 蓝胶囊按钮 / pill标签） ═══════════ */
.page-breadcrumb {
    max-width: 1100px; margin: 0 auto; padding: 18px 24px 0;
    font-size: 12px; color: #86868b;
}
.page-breadcrumb a { color: #0071e3; text-decoration: none; }
.page-breadcrumb a:hover { text-decoration: underline; }
.bc-sep { margin: 0 6px; color: #c7c7cc; }
.bc-current { color: #1d1d1f; }

.product-detail {
    max-width: 1100px; margin: 0 auto; padding: 28px 24px 64px;
    display: grid; grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px; align-items: start;
}
.detail-main { display: grid; gap: 18px; }
.detail-cover {
    background: #f5f5f7; border-radius: 23px; overflow: hidden;
    aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-cover .cover-icon { width: 64px; height: 64px; color: #c7c7cc; }
.detail-cover .cover-label { font-size: 14px; color: #86868b; }

.product-detail .card {
    background: #fff; border-radius: 23px; padding: 23px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .016); border: 0;
}
.detail-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-status { background: #f0f0f2; color: #6e6e73; font-size: 12px; padding: 4px 12px; border-radius: 12px; }
.detail-info .muted, .detail-info .notice-title + p { color: #6e6e73; font-size: 13px; }
.detail-info h1 { font-size: 28px; font-weight: 600; margin: 12px 0 14px; color: #1d1d1f; letter-spacing: -.01em; }
.detail-price-block { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.main-price, .promo-price { font-size: 32px; font-weight: 600; color: #1d1d1f; }
.promo-tag { background: #fff0ea; color: #e03400; font-size: 12px; padding: 3px 10px; border-radius: 8px; font-weight: 500; }
.promo-original { color: #c7c7cc; font-size: 18px; }
.promo-countdown { font-size: 12px; color: #6e6e73; }
.alt-price { font-size: 12px; color: #86868b; }
.detail-desc { color: #424245; font-size: 14px; line-height: 1.7; }
.detail-meta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f5f5f7; color: #6e6e73; font-size: 12px;
    padding: 5px 12px; border-radius: 12px;
}
.meta-chip svg { width: 14px; height: 14px; }
.meta-chip i { font-style: normal; color: #a1a1a6; font-size: 11px; }
.meta-chip.danger { color: #e03400; background: #fff0ea; }
.product-notice {
    background: #fff; border-radius: 23px; padding: 20px 23px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .016);
}
.notice-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #1d1d1f; margin-bottom: 8px; }
.notice-title svg { width: 16px; height: 16px; color: #0071e3; }

.detail-buy { position: sticky; top: 80px; }
.buy-head .eyebrow { font-size: 11px; letter-spacing: .12em; color: #a1a1a6; font-weight: 500; }
.buy-head h2 { font-size: 18px; font-weight: 600; margin: 6px 0; }
.detail-price { font-size: 30px; font-weight: 600; }
.detail-price .promo-price { font-size: 34px; }
.qty-row { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.qty-row label { font-size: 12px; color: #6e6e73; }
.qty-ctl { display: flex; align-items: center; gap: 4px; border: 1px solid #e5e5e8; border-radius: 999px; padding: 4px; width: max-content; }
.qty-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f5f5f7; color: #1d1d1f; font-size: 16px; cursor: pointer; }
.qty-btn:hover { background: #e5e5e8; }
.qty-input { width: 48px; text-align: center; border: 0; background: transparent; font-size: 14px; font-weight: 500; color: #1d1d1f; outline: none; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.detail-buy-row { display: flex; gap: 10px; }
.detail-buy-row form { flex: 1; min-width: 0; }
.detail-buy-row .pay,
.detail-buy-row .btn { width: 100%; }
.detail-actions .pay {
    background: #0071e3; color: #fff; border: 0;
    border-radius: 999px; padding: 12px 20px;
    font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s;
}
.detail-actions .pay:hover { background: #0077ed; }
.detail-actions .btn { border-radius: 999px; padding: 11px 20px; font-size: 13px; text-align: center; text-decoration: none; display: block; box-sizing: border-box; }
.detail-actions .btn.secondary { background: #fff; border: 1px solid #e5e5e8; color: #1d1d1f; }
.detail-actions .btn.secondary:hover { background: #f5f5f7; }
.detail-back { margin: 2px 0 0; text-align: center; font-size: 12.5px; }
.detail-back a { color: #6e6e73; text-decoration: none; transition: color .15s; }
.detail-back a:hover { color: #0071e3; }
.alert { background: #fff0ea; color: #e03400; border-radius: 12px; padding: 10px 14px; font-size: 13px; }

@media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; padding: 20px 12px 116px; }
    /* 移动端购买卡 → 底部悬浮操作条：价格+数量一行、购买按钮一行 */
    .detail-buy {
        position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto; z-index: 90;
        margin: 0; border-radius: 18px; padding: 12px 14px;
        align-self: start;
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
        box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
        display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px;
    }
    .detail-buy .buy-head {
        flex: 1 1 auto; min-width: 110px;
        display: flex; align-items: center; gap: 7px;
        margin: 0; padding: 0; border: 0;
    }
    .detail-buy .buy-head .eyebrow,
    .detail-buy .buy-head h2,
    .detail-buy .buy-head .promo-countdown,
    .detail-buy .buy-head .alt-price { display: none; }
    .detail-buy .buy-head .detail-price { margin: 0; font-size: 20px; font-weight: 700; }
    .detail-buy .buy-head .promo-tag { font-size: 11px; }
    .detail-buy .buy-head .promo-original { font-size: 13px; }
    .detail-buy .qty-row {
        flex: 0 0 auto; margin: 0;
        display: flex; flex-direction: row; align-items: center; gap: 8px;
    }
    .detail-buy .qty-row label,
    .detail-buy .qty-row small,
    .detail-buy .buy-head > p.muted { display: none; }
    .detail-buy .detail-actions { flex: 1 1 100%; margin: 0; flex-direction: row; }
    .detail-buy .detail-actions .detail-buy-row { margin-left: auto; gap: 10px; }
    .detail-buy .detail-actions form { flex: 0 1 auto; }
    .detail-buy .detail-actions form button { min-width: 132px; }
    .detail-buy .detail-back { display: none; }
    /* 缺货状态：不悬浮，恢复普通卡片展示提示与返回链接 */
    .detail-buy.is-soldout {
        position: static; box-shadow: none;
        background: var(--surface, #fff);
        -webkit-backdrop-filter: none; backdrop-filter: none;
        border: 1px solid var(--line, #e5e5ea);
    }
    .detail-buy.is-soldout .detail-back { display: block; }
    .detail-info h1 { font-size: 22px; }
    .main-price, .promo-price { font-size: 26px; }
    .page-breadcrumb { padding: 14px 12px 0; }
    .detail-cover { aspect-ratio: 4 / 3; }
}
.sales-count { font-size: 12px; color: #86868b; font-weight: 400; margin-left: 2px; }

/* ═══════════ 下单流程步骤引导条（结算 → 支付 → 发货完成） ═══════════ */
.step-bar {
    display: flex; align-items: center;
    margin: 0 0 22px; padding: 13px 18px;
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e5e5ea);
    border-radius: 14px;
}
.step { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.step-dot {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: #eef0f3; color: #8a8f98;
    transition: background .2s, color .2s;
}
.step.active .step-dot, .step.done .step-dot { background: var(--brand, #0071e3); color: #fff; }
.step-label { font-size: 13px; color: #86868b; transition: color .2s; }
.step.active .step-label { color: var(--ink, #0a2540); font-weight: 600; }
.step.done .step-label { color: #6e6e73; }
.step-line {
    flex: 1; height: 2px; border-radius: 2px;
    background: #e5e5ea; margin: 0 12px; min-width: 20px;
}
.step-line.done { background: var(--brand, #0071e3); }
@media (max-width: 640px) {
    .step-bar { padding: 11px 12px; margin-bottom: 18px; }
    .step { gap: 5px; }
    .step-dot { width: 22px; height: 22px; font-size: 12px; }
    .step-label { font-size: 12px; }
    .step-line { margin: 0 6px; min-width: 12px; }
}

/* ═══════════ 窄屏：分类横滑栏移到统计区与搜索区之间 ═══════════ */
.store-cats-mobile { display: none; }
@media (max-width: 1023px) {
    .store-sidebar { display: none; }
    .store-cats-mobile {
        display: flex; align-items: center; gap: 8px;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        padding: 14px 12px 2px; margin: 0;
        scrollbar-width: none;
    }
    .store-cats-mobile::-webkit-scrollbar { display: none; }
    .store-cats-mobile .store-cat {
        flex-shrink: 0;
        display: inline-flex; align-items: center; gap: 5px;
        background: #f0f0f2; color: #1d1d1f;
        font-size: 13px; padding: 8px 16px; border-radius: 999px;
        text-decoration: none; white-space: nowrap; transition: background .15s;
    }
    .store-cats-mobile .store-cat img { width: 16px; height: 16px; object-fit: contain; border-radius: 4px; }
    .store-cats-mobile .store-cat.on { background: #0071e3; color: #fff; }
}

/* ═══════════ 去掉搜索框外部方形容器（旧 search-bar 残留） ═══════════ */
.search-bar {
    border: 0; background: transparent; border-radius: 0;
    padding: 0; box-shadow: none; width: auto;
}

/* ═══════════ Hero 宣传区背景特效（渐变光晕 + 点阵网格 + 漂浮光斑） ═══════════ */
.store-hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 23px;
    padding: 34px 34px 26px;
    background:
        radial-gradient(640px 320px at 10% -12%, rgba(0, 113, 227, .09), transparent 62%),
        radial-gradient(560px 300px at 96% 112%, rgba(124, 77, 255, .08), transparent 62%),
        #fff;
    border: 1px solid rgba(229, 229, 232, .65);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .016);
}
.store-hero-panel::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(15, 20, 34, .05) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .55;
    pointer-events: none;
}
.store-hero-panel::after {
    content: "";
    position: absolute;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 113, 227, .16), transparent 70%);
    top: -70px; right: 14%;
    filter: blur(18px);
    pointer-events: none;
    animation: heroFloat 9s ease-in-out infinite;
}
.store-hero-panel > * { position: relative; z-index: 1; }
.store-hero-panel .store-intro { padding: 0; }
.store-hero-panel .store-stats { margin: 26px 0 0; padding: 0; }

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(26px, 20px) scale(1.08); }
}

@media (max-width: 1023px) {
    .store-hero-panel { padding: 24px 20px 20px; border-radius: 20px; }
}
@media (max-width: 640px) {
    .store-hero-panel { padding: 20px 16px 16px; border-radius: 16px; }
}

/* ═══════════ 导航搜索按钮：纯图标化（去方框/阴影） ═══════════ */
.nav-actions .nav-search-btn {
    width: 40px; height: 40px; padding: 0;
    border: none; background: transparent;
    border-radius: 50%;
    box-shadow: none;
}
.nav-actions .nav-search-btn:hover,
.nav-actions .nav-search-btn:focus-visible {
    background: rgba(0, 0, 0, .045); box-shadow: none; border: none;
}
.nav-actions .nav-search-btn svg { width: 19px; height: 19px; }

/* ═══════════ Hero 背景恢复透明 + 标题彩色渐变 ═══════════ */
.store-hero-panel {
    background: transparent; border: 0; box-shadow: none;
    padding: 0; border-radius: 0; overflow: visible;
}
.store-hero-panel::before, .store-hero-panel::after { display: none; }
.store-hero-panel .store-intro { padding: 0 24px 0; }
.store-hero-panel .store-stats { margin: 22px auto 0; padding: 0 24px 22px; }
.store-intro h1 {
    background: linear-gradient(115deg, #0071e3 0%, #7c4dff 55%, #ff375f 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.store-intro h1 span { color: transparent; }
@media (max-width: 1023px) {
    .store-hero-panel .store-intro { padding: 0 12px 0; }
    .store-hero-panel .store-stats { padding: 0 12px 22px; }
}

/* ═══════════ 商品详情：购买须知弹窗 ═══════════ */
.notice-modal {
    position: fixed; inset: 0; z-index: 1200;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.notice-modal.open { display: flex; }
.notice-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); }
.notice-modal-box {
    position: relative; background: #fff;
    border-radius: 23px; padding: 28px;
    max-width: 520px; width: 100%;
    max-height: 76vh; display: flex; flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .14);
    animation: noticeIn .25s ease-out;
}
@keyframes noticeIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.notice-modal-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: #f5f5f7; color: #1d1d1f;
    font-size: 18px; line-height: 1; cursor: pointer;
}
.notice-modal-close:hover { background: #e8e8ed; }
.notice-modal-box h3 { margin: 0 0 12px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.notice-modal-body { overflow-y: auto; font-size: 14px; line-height: 1.7; color: #6e6e73; }
.notice-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.notice-modal-actions .pay { padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
@media (max-width: 640px) {
    .notice-modal-box { border-radius: 18px; padding: 22px 18px; max-height: 80vh; }
    .notice-modal-actions { flex-direction: column-reverse; }
    .notice-modal-actions .btn, .notice-modal-actions .pay { width: 100%; text-align: center; }
}

/* ═══════════ 下单须知弹窗：ChatGPT Plus 风格布局 ═══════════ */
.notice-modal-box { padding: 26px 26px 22px; }
.notice-modal-top { display: flex; align-items: center; justify-content: space-between; }
.notice-modal-close { position: static; }
.notice-modal-box h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.notice-product { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.notice-product-badge {
    width: 30px; height: 30px; border-radius: 9px;
    background: #eef5ff; color: #0071e3;
    display: inline-flex; align-items: center; justify-content: center;
}
.notice-product-badge svg { width: 17px; height: 17px; }
.notice-product-name { font-size: 14.5px; font-weight: 600; color: #1d1d1f; }
.notice-lead { margin-top: 16px; font-size: 16px; font-weight: 600; color: #1d1d1f; line-height: 1.45; }
.notice-list { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.notice-list li {
    position: relative; padding-left: 30px;
    font-size: 13.5px; line-height: 1.6; color: #6e6e73;
    counter-increment: noticeItem;
}
.notice-list { counter-reset: noticeItem; }
.notice-list li::before {
    content: counter(noticeItem);
    position: absolute; left: 0; top: 1px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #f0f2f7; color: #1d1d1f;
    font-size: 12px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
}
.notice-help {
    margin-top: 16px; padding: 11px 14px;
    background: #f5f5f7; border-radius: 12px;
    font-size: 13px; color: #6e6e73;
}
.notice-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.notice-modal-actions .pay { padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
@media (max-width: 640px) {
    .notice-modal-box { border-radius: 18px; padding: 22px 18px 18px; max-height: 80vh; }
    .notice-modal-actions { flex-direction: column-reverse; }
    .notice-modal-actions .btn, .notice-modal-actions .pay { width: 100%; text-align: center; }
}

/* ═══════════ 下单须知弹窗：入场动画不再控制透明度（防环境冻结） ═══════════ */
.notice-modal-box { opacity: 1; }
@keyframes noticeIn {
    from { transform: translateY(14px) scale(.97); }
    to { transform: none; }
}

/* ═══════════ 下单须知弹窗：移动端保持卡片+并排按钮布局 ═══════════ */
@media (max-width: 640px) {
    .notice-modal { padding: 16px; align-items: center; }
    .notice-modal-box {
        border-radius: 18px; padding: 22px 18px 18px;
        max-height: 82vh; max-width: 100%;
    }
    .notice-modal-actions { flex-direction: row; justify-content: flex-end; }
    .notice-modal-actions .btn, .notice-modal-actions .pay { width: auto; }
}

/* ═══════════ 商品详情页移动端：内容密集型（Data Dense） ═══════════ */
@media (max-width: 640px) {
    .product-detail { gap: 8px; padding: 12px 10px 40px; }
    .product-detail .card {
        border-radius: 10px; padding: 13px 14px;
        box-shadow: none; border: .8px solid #e5e5e8;
    }
    .detail-main { gap: 8px; }
    .detail-cover { border-radius: 10px; height: 150px; }
    .detail-cover .cover-icon { width: 44px; height: 44px; }
    .detail-cover .cover-label { margin-top: 8px; font-size: 12px; }
    .detail-title-row { gap: 6px; }
    .chip-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; }
    .detail-info .muted, .detail-info .notice-title + p { font-size: 12px; }
    .detail-info h1 { font-size: 19px; margin: 8px 0 10px; line-height: 1.35; }
    .detail-price-block { gap: 6px; }
    .main-price, .promo-price { font-size: 24px; }
    .promo-original { font-size: 14px; }
    .promo-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; }
    .promo-countdown { font-size: 11px; }
    .alt-price { font-size: 11px; }
    .sales-count { font-size: 11px; }
    .detail-desc { font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
    .detail-meta-row { gap: 6px; }
    .meta-chip { font-size: 11px; padding: 3px 9px; border-radius: 6px; gap: 4px; }
    .meta-chip svg { width: 12px; height: 12px; }
    .meta-chip i { font-size: 10px; }
    .product-notice { border-radius: 10px; padding: 12px 14px; box-shadow: none; border: .8px solid #e5e5e8; }
    .notice-title { font-size: 13px; margin-bottom: 5px; gap: 6px; }
    .notice-title svg { width: 14px; height: 14px; }
    .product-notice p { font-size: 12px; line-height: 1.6; }
    .buy-head { display: none; }
    .qty-row { gap: 6px; margin-top: 10px; }
    .qty-row label { font-size: 11px; }
    .qty-ctl { padding: 3px; }
    .qty-btn { width: 30px; height: 30px; font-size: 15px; }
    .qty-input { font-size: 13px; width: 42px; }
    .detail-buy .muted { font-size: 11px; line-height: 1.5; }
    .detail-actions { gap: 8px; margin-top: 12px; }
    .detail-buy-row { gap: 8px; }
    .detail-actions .pay { padding: 10px 14px; font-size: 12px; border-radius: 8px; }
    .detail-actions .btn { padding: 9px 14px; font-size: 12px; border-radius: 8px; }
    .detail-back { font-size: 12px; }
    .alert { padding: 8px 12px; font-size: 12px; border-radius: 8px; }
    .page-breadcrumb { padding: 10px 12px 0; font-size: 12px; }
}

/* ═══════════ 结算页优惠码：点击展开折叠交互 ═══════════ */
.coupon-wrap { display: flex; flex-direction: column; gap: 8px; }
.coupon-toggle {
    display: block; width: 100%; text-align: left;
    background: #fff; border: 1px dashed #d2d2d7; border-radius: 10px;
    padding: 11px 14px; font-size: 13px; color: #0071e3;
    cursor: pointer; transition: background .15s, border-color .15s;
}
.coupon-toggle:hover { background: #f5f5f7; border-color: #0071e3; }
.coupon-panel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.coupon-panel input { flex: 1; min-width: 160px; }
.coupon-panel .coupon-apply { white-space: nowrap; }
.coupon-done {
    display: flex; align-items: center; gap: 8px;
    background: #f0f7f1; border: 1px solid #d6e8d9; border-radius: 10px;
    padding: 10px 14px; font-size: 13px; color: #1d1d1f;
}
.coupon-ok { color: #34c759; font-weight: 700; font-size: 14px; }
.coupon-name { flex: 1; }
.coupon-code-name { color: #1d1d1f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.coupon-remove {
    border: 0; background: transparent; color: #6e6e73;
    font-size: 12px; text-decoration: underline; cursor: pointer; padding: 4px 6px;
}
.coupon-remove:hover { color: #e03400; }
.hidden { display: none !important; }

/* ═══════════ 结算页支付方式：移动端密集化 ═══════════ */
@media (max-width: 640px) {
    .checkout-side .pay-card { padding: 13px 14px; border-radius: 10px; box-shadow: none; border: .8px solid #e5e5e8; }
    .checkout-side .pay-card h3 { font-size: 14px; margin-bottom: 6px; }
    .checkout-side .pay-options { grid-template-columns: 1fr; gap: 6px; }
    .checkout-side .payment-choice > span {
        min-height: 46px; padding: 8px 10px; gap: 9px;
        border-radius: 8px; border-width: .8px;
    }
    .checkout-side .payment-choice .payment-name { font-size: 13px; }
    .checkout-side .payment-choice .payment-amount { font-size: 11px; }
    .checkout-side .pay-actions { gap: 8px; margin-top: 10px; flex-direction: column; }
    .checkout-side .pay-actions .pay,
    .checkout-side .pay-actions .btn { width: 100%; min-height: 44px; border-radius: 8px; font-size: 12.5px; }
}

/* ═══════════ 移动端折叠菜单：出场动画（下滑淡入 + 菜单项错峰上浮） ═══════════ */
@keyframes navDrop {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}
@keyframes navItemIn {
    from { opacity: 0; transform: translateY(-7px); }
    to { opacity: 1; transform: none; }
}
.topbar .nav.open { animation: navDrop .22s cubic-bezier(.33, .99, .4, 1); }
.topbar .nav.open a {
    animation: navItemIn .28s cubic-bezier(.33, .99, .4, 1) backwards;
}
.topbar .nav.open a:nth-child(1) { animation-delay: .015s; }
.topbar .nav.open a:nth-child(2) { animation-delay: .045s; }
.topbar .nav.open a:nth-child(3) { animation-delay: .075s; }
.topbar .nav.open a:nth-child(4) { animation-delay: .105s; }
.topbar .nav.open a:nth-child(5) { animation-delay: .135s; }
.topbar .nav.open a:nth-child(6) { animation-delay: .165s; }
.topbar .nav.open a:nth-child(7) { animation-delay: .195s; }
.topbar .nav.open a:nth-child(8) { animation-delay: .225s; }
@media (prefers-reduced-motion: reduce) {
    .topbar .nav.open,
    .topbar .nav.open a { animation: none !important; }
}

/* ════════════════════════════════════════════════════════════════
   前台全站统一 · Apple 极简风（与首页 gptibo 同风格）
   仅作用于 body.front（前台公共布局），后台 admin-dense 不受影响
   ════════════════════════════════════════════════════════════════ */

/* 1) 设计变量重映射：Stripe 蓝系统 → Apple 极简色板（#0071e3 / #1d1d1f / #fafafa） */
body.front {
    --brand: #0071e3;
    --brand-strong: #06c;
    --brand-soft: #e8f1fd;
    --brand-grad: linear-gradient(135deg, #0071e3 0%, #5ac8fa 100%);
    --accent: #0071e3;
    --accent-soft: #e8f1fd;
    --navy: #1d1d1f;
    --bg: #fafafa;
    --bg-deep: #f2f2f4;
    --surface: #ffffff;
    --surface-soft: #fafafa;
    --ink: #1d1d1f;
    --ink-soft: #515154;
    --muted: #86868b;
    --line: #e5e5e8;
    --line-strong: #d2d2d7;
    --success: #34c759;
    --success-soft: #e9f9ef;
    --warning: #ff9f0a;
    --warning-soft: #fff6e9;
    --danger: #ff3b30;
    --danger-soft: #fff0ef;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 10px rgba(0,0,0,.04);
    --shadow-lg: 0 8px 25px rgba(0,0,0,.06);
    --shadow-hover: 0 12px 30px rgba(0,0,0,.08);
    --shadow-brand: 0 2px 4px rgba(0,113,227,.2), 0 6px 14px rgba(0,113,227,.18);
    --shadow-btn: 0 2px 4px rgba(0,113,227,.25), inset 0 1px 0 rgba(255,255,255,.2);
    --shadow-press: inset 0 2px 4px rgba(0,0,0,.08);
}

/* 2) 卡片/面板/表格容器 → 白卡大圆角柔影（首页商品卡同款语言） */
body.front .panel,
body.front .card,
body.front .table-wrap,
body.front .stat,
body.front .chart-card,
body.front .search-bar,
body.front .checkout-card,
body.front .form-card,
body.front .auth-card,
body.front .cart-card,
body.front .empty-state {
    border: none;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,.02), 0 1px 2px rgba(0,0,0,.03);
}
body.front .card:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

/* 3) 表格：细边框 + 浅灰表头 + 柔和悬停 */
body.front .table-wrap { border: none; }
body.front th {
    background: #fafafa;
    color: #6e6e73;
    font-weight: 600;
    letter-spacing: .02em;
}
body.front tbody tr:hover { background: #f5f5f7; }

/* 4) 按钮：主按钮蓝胶囊；次按钮白底细边胶囊 */
body.front .btn {
    border-radius: 999px;
}
body.front .btn:hover { background: var(--brand-strong); }
body.front .btn.secondary,
body.front .btn.ghost,
body.front .btn-ghost {
    border-color: #e5e5e8;
    background: #fff;
    color: #1d1d1f;
    box-shadow: none;
}
body.front .btn.secondary:hover,
body.front .btn.ghost:hover,
body.front .btn-ghost:hover {
    border-color: #d2d2d7;
    background: #f5f5f7;
    color: #1d1d1f;
    transform: translateY(-1px);
}
body.front .btn.danger {
    background: #fff;
    border-color: rgba(255,59,48,.35);
    color: #ff3b30;
    box-shadow: none;
}
body.front .btn.danger:hover {
    background: #fff0ef;
    border-color: rgba(255,59,48,.5);
    color: #ff3b30;
}

/* 5) 表单控件：浅边框 + 10px 圆角 + 蓝色聚焦光环 */
body.front input,
body.front select,
body.front textarea {
    border-radius: 10px;
    border-color: #d2d2d7;
    background: #fff;
    color: #1d1d1f;
    box-shadow: none;
}
body.front input:focus,
body.front select:focus,
body.front textarea:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}
body.front input::placeholder,
body.front textarea::placeholder { color: #a6a6ad; }

/* 6) 状态徽章 / 提示条：Apple 柔和语义色 */
body.front .status,
body.front .badge { border-radius: 999px; font-weight: 500; }
body.front .alert {
    background: #fff;
    border: 1px solid #e5e5e8;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
body.front .alert-success { border-color: rgba(52,199,89,.4); background: #e9f9ef; color: #1d9e51; }
body.front .alert-danger { border-color: rgba(255,59,48,.4); background: #fff0ef; color: #d70015; }

/* 7) 页码：浅灰胶囊 */
body.front .pagination a,
body.front .pagination span {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e8;
    background: #fff;
    color: #1d1d1f;
    font-size: 13px;
}
body.front .pagination a:hover { background: #f5f5f7; }

/* 8) 标题排版：Apple 大标题字重与字距 */
body.front .page-title,
body.front h1.page-title,
body.front .section-title {
    letter-spacing: -.015em;
    color: #1d1d1f;
}

/* 9) 商品卡图片高度加大（桌面 130→178，移动 120→156） */
.store-visual { height: 178px; }
@media (max-width: 640px) {
    .store-visual { height: 156px; }
}

/* ═══════════ 修复：后台侧边栏收起按钮（×）仅移动端显示，桌面端隐藏 ═══════════ */
@media (min-width: 769px) {
    .sidebar h2 .sidebar-close { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   后台统一 · Apple 极简风（与前台同一设计语言）
   作用域：body.admin-dense（管理端）+ body.auth-page（后台登录/2FA）
   ════════════════════════════════════════════════════════════════ */

/* 1) 设计变量重映射：与前台同色板 */
body.admin-dense,
body.auth-page {
    --brand: #0071e3;
    --brand-strong: #06c;
    --brand-soft: #e8f1fd;
    --brand-grad: linear-gradient(135deg, #0071e3 0%, #5ac8fa 100%);
    --accent: #0071e3;
    --accent-soft: #e8f1fd;
    --navy: #1d1d1f;
    --bg: #fafafa;
    --bg-deep: #f2f2f4;
    --surface: #ffffff;
    --surface-soft: #fafafa;
    --ink: #1d1d1f;
    --ink-soft: #515154;
    --muted: #86868b;
    --line: #e5e5e8;
    --line-strong: #d2d2d7;
    --success: #34c759;
    --success-soft: #e9f9ef;
    --warning: #ff9f0a;
    --warning-soft: #fff6e9;
    --danger: #ff3b30;
    --danger-soft: #fff0ef;
    --radius: 16px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 10px rgba(0,0,0,.04);
    --shadow-lg: 0 8px 25px rgba(0,0,0,.06);
    --shadow-hover: 0 12px 30px rgba(0,0,0,.08);
    --shadow-brand: 0 2px 4px rgba(0,113,227,.2), 0 6px 14px rgba(0,113,227,.18);
    --shadow-btn: 0 2px 4px rgba(0,113,227,.25), inset 0 1px 0 rgba(255,255,255,.2);
    --shadow-press: inset 0 2px 4px rgba(0,0,0,.08);
}

/* 2) 侧边栏：Apple 语言（浅灰悬停 / 蓝胶囊激活） */
body.admin-dense .sidebar h2::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: url('/logo.png') center/contain no-repeat;
    box-shadow: none;
}
body.admin-dense .sidebar a {
    border-radius: 999px;
    color: #515154;
    transition: background .15s ease-out, color .15s ease-out;
}
body.admin-dense .sidebar a:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}
body.admin-dense .sidebar a.active {
    background: #0071e3;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,113,227,.25);
}
body.admin-dense .sidebar a.active:hover { background: #06c; color: #fff; }

/* 3) 顶栏 */
body.admin-dense .admin-topbar {
    border-bottom: .8px solid #e5e5e8;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* 4) 卡片 / 表格容器：白卡大圆角柔影（比前台略收敛，保数据密度） */
body.admin-dense .panel,
body.admin-dense .card,
body.admin-dense .table-wrap,
body.admin-dense .stat,
body.admin-dense .chart-card,
body.admin-dense .form-card,
body.admin-dense .search-bar,
body.admin-dense .empty-state {
    border: none;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.03), 0 1px 2px rgba(0,0,0,.02);
}
body.admin-dense tbody tr:hover { background: #f5f5f7; }

/* 5) 按钮：主按钮蓝胶囊；次级白底细边胶囊 */
body.admin-dense .btn {
    border-radius: 999px;
}
body.admin-dense .btn.secondary,
body.admin-dense .btn.ghost,
body.admin-dense .btn-ghost {
    border-color: #e5e5e8;
    background: #fff;
    color: #1d1d1f;
    box-shadow: none;
}
body.admin-dense .btn.secondary:hover,
body.admin-dense .btn.ghost:hover,
body.admin-dense .btn-ghost:hover {
    border-color: #d2d2d7;
    background: #f5f5f7;
    color: #1d1d1f;
}
body.admin-dense .btn.danger {
    background: #fff;
    border-color: rgba(255,59,48,.35);
    color: #ff3b30;
    box-shadow: none;
}
body.admin-dense .btn.danger:hover {
    background: #fff0ef;
    border-color: rgba(255,59,48,.5);
    color: #ff3b30;
}

/* 6) 表单控件 */
body.admin-dense input,
body.admin-dense select,
body.admin-dense textarea {
    border-radius: 9px;
    border-color: #d2d2d7;
    background: #fff;
    color: #1d1d1f;
    box-shadow: none;
}
body.admin-dense input:focus,
body.admin-dense select:focus,
body.admin-dense textarea:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}

/* 7) 后台登录/2FA 页：白卡大圆角柔影 */
body.auth-page .auth-card,
body.auth-page .panel,
body.auth-page .card {
    border: none;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
}
body.auth-page .btn { border-radius: 999px; }

/* ═══════════ 后台全局搜索：桌面端启用顶栏 + 胶囊搜索框 ═══════════ */
body.admin-dense .admin-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    min-height: 46px;
    position: sticky;
    top: 0;
    z-index: 100;
    grid-column: 1 / -1;
}
@media (min-width: 721px) {
    body.admin-dense .admin-topbar .admin-menu-btn { display: none; }
}
body.admin-dense .admin-topbar .admin-title { flex: 0 0 auto; white-space: nowrap; }
body.admin-dense .admin-search {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 460px;
    min-width: 0;
    margin: 0 auto;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 12px;
    transition: background .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out;
}
body.admin-dense .admin-search:focus-within {
    background: #fff;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}
body.admin-dense .admin-search svg { width: 15px; height: 15px; color: #86868b; flex-shrink: 0; }
body.admin-dense .admin-search input {
    border: none;
    background: transparent;
    padding: 0;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #1d1d1f;
    box-shadow: none;
    border-radius: 0;
}
body.admin-dense .admin-search input:focus { box-shadow: none; border: none; }
body.admin-dense .admin-search input::placeholder { color: #86868b; }

/* 移动端：顶栏保持可用，搜索框优先占位 */
@media (max-width: 900px) {
    body.admin-dense .admin-topbar { grid-column: 1 / -1; }
    body.admin-dense .admin-search { margin: 0; max-width: none; }
}
@media (max-width: 600px) {
    body.admin-dense .admin-topbar .tl-dots { display: none; }
    body.admin-dense .admin-topbar > a { display: none; }
    body.admin-dense .admin-topbar .admin-title { font-size: 12.5px; }
}

/* ---------- 前台语言切换器（中 / EN）：沿用现有 CSS 变量体系 ---------- */
.lang-switch {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 3px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface-soft);
}
.lang-switch .lang-switch-opt {
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1;
    color: var(--muted); text-decoration: none; white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.lang-switch .lang-switch-opt:hover { color: var(--brand-strong); background: var(--brand-soft); }
.lang-switch .lang-switch-opt.active { color: #fff; background: var(--brand); }
/* 显隐规则：桌面端顶栏完整切换器（登录左侧）默认显示；≤900px 隐藏，改由顶栏语言图标切换 */
.lang-switch-desktop { display: inline-flex; }
.nav-actions .nav-lang-icon { display: none; }
@media (max-width: 900px) {
    .lang-switch-desktop { display: none; }
    .nav-actions .nav-lang-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: 34px;
        padding: 0 14px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: var(--surface-soft);
        color: var(--ink-soft);
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
    }
    .nav-actions .nav-lang-icon:hover { color: var(--brand-strong); background: var(--brand-soft); border-color: var(--brand-soft); }
    .nav-actions .nav-lang-code { font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: .02em; }
}
