/* ============================================================
   锦鲤发卡 · 简白主题 · Google Blue 主色
   ============================================================ */

:root {
    --primary: #4285f4;
    --primary-dark: #1a73e8;
    --primary-light: #e8f0fe;
    --bg: #ffffff;
    --card-bg: #fff;
    --text: #202124;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    --border: #dadce0;
    --border-light: #e8eaed;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.08);
    --shadow: 0 2px 6px rgba(60, 64, 67, 0.1);
    --shadow-md: 0 6px 18px rgba(60, 64, 67, 0.12);
    --shadow-lg: 0 12px 36px rgba(60, 64, 67, 0.16);
    /* 简白主题 */
    --glass: #fff;
    --glass-strong: #fff;
    --glass-border: var(--border-light);
    --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --blur: none;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    color: var(--text);
    background: transparent;
    min-height: 100vh;
}

/* 页脚贴底：前台页面（header/main/footer 平铺于 body）内容不足一屏时页脚仍贴住视口底部；
   注意：不可用 body > div 强制布局（会破坏后台 .admin-layout 的左右结构），
   后台等根 div 无 margin:auto，在 flex 交叉轴自动撑满，内部布局不受影响 */
body {
    display: flex;
    flex-direction: column;
}

/* 谷歌冷灰蓝背景：干净克制 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #f8f9fa;
    pointer-events: none;
}

/* 漂浮光斑：极淡冷蓝 */
body::after {
    content: "";
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.06), transparent 70%);
    animation: float-orb 30s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}
@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-120px, 180px) scale(1.05); }
}

/* 第二个漂浮光斑：极淡冷灰蓝 */
html::after {
    content: "";
    position: fixed;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95, 99, 104, 0.05), transparent 70%);
    animation: float-orb-2 35s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}
@keyframes float-orb-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, -120px) scale(0.95); }
}


/* 卡片呼吸感：hover 时阴影柔和扩散 */
.product-card,
.quick-card,
.stat-card {
    transition: box-shadow 0.4s ease, transform 0.35s ease, border-color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
b { font-weight: 600; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航（iOS 玻璃） ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 62px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-icon { font-size: 18px; color: var(--primary); animation: logo-pulse 3s ease-in-out infinite; }
@keyframes logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.logo-text {
    color: var(--text);
}
.header-sep {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
}
.main-nav { display: flex; gap: 6px; flex: 1; }
.nav-item {
    padding: 8px 14px;
    border-radius: 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    animation: nav-slide-in 0.6s ease-out both;
}
.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
@keyframes nav-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-item:hover { color: var(--primary); background: transparent; }
.nav-item.active {
    color: var(--primary);
    font-weight: 600;
    background: none;
    box-shadow: none;
    border-bottom: 2px solid var(--primary);
}
.nav-admin {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--primary-dark);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.nav-admin:hover { background: transparent; border-color: var(--primary); }

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: 16px;
    padding: 8px 0 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px solid var(--border-light);
    background: #fff;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: footer-line 4s ease-in-out infinite;
}
@keyframes footer-line {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}
/* 站点设置-网页图标 */
.icon-field { display: flex; align-items: flex-start; gap: 12px; }
.icon-field-main { flex: 1; min-width: 0; }
.icon-field-main .text-input { width: 100%; }
.icon-preview {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    object-fit: contain;
    flex-shrink: 0;
    padding: 2px;
    box-shadow: var(--shadow-sm);
}
.icon-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.entry-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}
/* 页脚贴底：主内容区 flex 撑满剩余高度；width:100% 抵消 .container 的 margin:auto 在 flex 交叉轴上的宽度收缩 */
.site-main { padding-top: 24px; min-height: 70vh; flex: 1 0 auto; width: 100%; }

/* ---------- Hero · Editorial ---------- */
/* Hero 区域呼吸光晕 */
.hero {
    position: relative;
    overflow: hidden;
    padding: 32px 0 28px;
    margin: -24px -16px 0;
    background: transparent;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(66, 133, 244, 0.04), transparent);
    animation: hero-glow 10s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes hero-glow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}
.hero-deco {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1.5px solid rgba(66,133,244,.10);
    right: -50px;
    top: -70px;
    pointer-events: none;
    animation: deco-spin 40s linear infinite;
}
@keyframes deco-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.hero-deco::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 1.5px solid rgba(66,133,244,.06);
    left: -80px;
    bottom: -60px;
    animation: deco-spin 30s linear infinite reverse;
}
.hero-body {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}
.hero-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    color: var(--text);
    animation: title-fade-in 0.8s ease-out both;
}
@keyframes title-fade-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-rule {
    width: 32px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--primary);
    margin: 12px auto;
    animation: rule-expand 0.8s ease-out 0.3s both;
}
@keyframes rule-expand {
    from { width: 0; opacity: 0; }
    to { width: 32px; opacity: 1; }
}
.hero-sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    animation: title-fade-in 0.8s ease-out 0.2s both;
}

/* ---------- 公告栏 ---------- */
.notice-bar {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 32px 0 0;
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}
.notice-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.04), transparent);
    animation: notice-shimmer 6s ease-in-out infinite;
}
@keyframes notice-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}
.notice-label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}
.notice-text { font-size: 13.5px; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.7; }

/* ---------- 分类导航 ---------- */
.cat-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 28px 0 24px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border-light);
}
.cat-link {
    position: relative;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .2s;
    text-decoration: none;
    white-space: nowrap;
}
.cat-link:hover { color: var(--text); }
.cat-link.on {
    color: var(--text);
    font-weight: 600;
}
.cat-link.on::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

/* ---------- 商品网格 ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px 20px;
    margin-bottom: 40px;
}
.product-card {
    display: block;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    color: var(--text);
    transition: border-color .25s, box-shadow .25s, transform .35s ease;
}
.product-card:hover {
    border-color: var(--border);
    box-shadow: 0 8px 28px rgba(60,64,67,.10);
    transform: translateY(-2px);
    color: var(--text);
}
.product-cover {
    position: relative;
    aspect-ratio: 1 / 1; /* 统一方形封面：有图/无图卡片高度对齐；图片 contain 完整显示，留白处为淡蓝渐变背景 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f0fe, #c6dafc);
    overflow: hidden;
}
.product-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-body { padding: 18px 18px 16px; }
.product-name {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-desc {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.65;
    display: -webkit-box;
     
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.product-price {
    color: var(--text);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.3px;
    position: relative;
    overflow: hidden;
}
.product-price::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.15), transparent);
    animation: price-shimmer 4s ease-in-out infinite;
}
@keyframes price-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}
.product-sold {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: .5px;
}
.product-stock {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: .5px;
}

/* ---------- 空状态 ---------- */
/* 自定义入口模式下未登录访问后台页面的 404 提示 */
.admin-deny {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.admin-deny-inner {
    text-align: center;
    padding: 48px 56px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.admin-deny-code {
    margin: 0;
    font-size: 56px;
    font-weight: 700;
    color: var(--primary);
}
.admin-deny-text {
    margin: 14px 0 4px;
    font-size: 16px;
    color: var(--text);
}
.admin-deny-tip {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.empty-box {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 15px;
    margin: 20px 0;
}
.empty-box a { font-weight: 600; }

/* ---------- 商品详情 ---------- */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 28px;
    align-items: start;
}
.detail-cover {
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, #e8f0fe, #c6dafc);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* 与首页封面一致：方形 + 图片完整显示 + 淡蓝渐变背景 */
}
.detail-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.detail-desc {
    margin-top: 20px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.detail-desc h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.desc-text { font-size: 13.5px; line-height: 1.85; color: var(--text-secondary); white-space: pre-line; }

.buy-card {
    position: sticky;
    top: 80px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
}
.detail-name { margin: 0 0 14px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.detail-tags { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.tag {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}
.detail-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.price-label { font-size: 13px; color: var(--text-muted); }
.price-value { color: var(--text); font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.price-unit { font-size: 13px; color: var(--text-muted); }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.text-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.12);
    background: #fff;
}
select.text-input {
    border-left: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
textarea.text-input { resize: vertical; line-height: 1.7; }
.inline-input { width: 120px; padding: 6px 10px; }

/* 数量 */
.qty-box { display: flex; align-items: center; gap: 0; }
.qty-btn {
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    color: var(--primary-dark);
    transition: all 0.15s;
}
.qty-btn:first-child { border-radius: 12px 0 0 12px; }
.qty-btn:last-of-type { border-radius: 0 12px 12px 0; }
.qty-btn:hover { background: var(--primary-light); }
.qty-input {
    width: 70px;
    height: 38px;
    text-align: center;
    border: 1.5px solid var(--border);
    border-left: none;
    border-right: none;
    font-size: 15px;
    outline: none;
}
.qty-total { margin-left: 16px; font-size: 14px; color: var(--text-muted); }
.qty-total b { color: var(--text); font-size: 17px; }

/* 支付方式选择 */
.pay-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}
.pay-option input { display: none; }
.pay-option:hover { border-color: var(--pay-color); }
.pay-option.selected {
    border-color: var(--pay-color);
    background: color-mix(in srgb, var(--pay-color) 6%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pay-color) 12%, transparent);
}
.pay-icon { font-size: 20px; }
.pay-name { font-size: 14px; font-weight: 600; }
.pay-check {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pay-color);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 开关 */
.switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}
.switch-label input { width: 18px; height: 18px; accent-color: var(--primary); }
.pay-switches { display: flex; gap: 24px; flex-wrap: wrap; }

/* 按钮 */
.btn-buy {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-buy::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}
.btn-buy:hover::before { width: 300px; height: 300px; }
.btn-buy:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3); }
.btn-buy:disabled { opacity: 0.5; cursor: not-allowed; }
.buy-tip { text-align: center; font-size: 12px; color: var(--text-muted); margin: 10px 0 0; }
.contact-hint { margin: 6px 0 0; font-size: 12px; color: #188038; }
.contact-hint.invalid { color: var(--danger, #d93025); }

.btn-back, .btn-query {
    display: inline-block;
    padding: 10px 26px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.3s;
}
.btn-back:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-query {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-query:hover { color: #fff; background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3); }

/* ---------- 提示框 ---------- */
.alert-error {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: #fef2f2;
    color: #dc2626;
    font-size: 13.5px;
    margin: 12px 0;
    border: 1px solid #fecaca;
}
.alert-success {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: #f0fdf4;
    color: #16a34a;
    font-size: 13.5px;
    margin: 12px 0;
    border: 1px solid #bbf7d0;
}

/* ---------- 支付页 ---------- */
.pay-layout { display: flex; justify-content: center; padding: 10px 0 40px; }
.pay-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
}
.pay-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--text-secondary); letter-spacing: 1px; text-transform: uppercase; }
.pay-amount {
    font-size: 44px;
    font-weight: 800;
    color: var(--text);
    margin: 8px 0 24px;
    letter-spacing: -1px;
}
.pay-info-list { text-align: left; padding: 6px 0; margin-bottom: 20px; }
.pay-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-light);
}
.pay-info-row:last-child { border-bottom: none; }
.pay-info-row span { color: var(--text-muted); }
.pay-info-row b { font-weight: 600; word-break: break-all; }

.qr-box { display: none; }
.qr-tip { margin: 12px 0 4px; font-size: 14px; font-weight: 600; }
.qr-count { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.qr-count b { color: #ef4444; }
.pay-countdown {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}
.pay-countdown b { color: #ef4444; font-weight: 700; }
.pay-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-pay {
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-pay::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}
.btn-pay:hover::before { width: 300px; height: 300px; }
.btn-pay:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3); }
.btn-cancel { color: var(--text-muted); font-size: 13px; }
.btn-cancel:hover { color: #ef4444; }

/* ---------- 结果页 ---------- */
.result-card {
    max-width: 680px;
    margin: 10px auto 40px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
}
.result-icon { font-size: 56px; color: #16a34a; }
.result-title { margin: 14px 0 6px; font-size: 22px; font-weight: 700; color: var(--text); }
.result-sub { margin: 0 0 24px; color: var(--text-muted); font-size: 14px; }
.order-summary {
    text-align: left;
    padding: 6px 0;
    margin-bottom: 20px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}
.summary-row:last-child { border-bottom: none; }
.summary-row span { color: var(--text-muted); }
.summary-row b { word-break: break-all; text-align: right; }
.summary-row .amount { color: var(--text); font-size: 16px; font-weight: 700; }

/* 卡密框 */
.card-box {
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8f9fa;
    overflow: hidden;
    margin-bottom: 20px;
}
.card-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(241, 245, 249, 0.75);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.card-content {
    margin: 0;
    padding: 14px 16px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-secondary);
}
.btn-copy {
    padding: 6px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-copy:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(66, 133, 244, 0.25); }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 支付确认等待（结果页 / 收银台共用） ---------- */
.confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}
.confirm-icon svg { animation: pay-spin 1.2s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
.confirm-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 26px auto 22px;
    max-width: 440px;
}
.confirm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    background: #f1f3f4;
    border: 2px solid var(--border-light);
    color: var(--text-muted);
    transition: all 0.3s;
}
.confirm-step.done .step-dot {
    background: #ecfdf5;
    border-color: #16a34a;
    color: #16a34a;
}
.confirm-step.active .step-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    animation: step-pulse 1.4s ease-in-out infinite;
}
.step-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.confirm-step.done .step-label { color: #16a34a; font-weight: 600; }
.confirm-step.active .step-label { color: var(--text); font-weight: 600; }
.confirm-bar {
    flex: 1;
    height: 2px;
    min-width: 36px;
    margin: 14px 10px 0;
    background: var(--border-light);
}
.confirm-bar.done { background: #16a34a; }
@keyframes step-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.35); }
    50% { box-shadow: 0 0 0 9px rgba(66, 133, 244, 0); }
}
.confirm-tip { margin: 0 0 18px; color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.btn-confirm-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 30px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-confirm-refresh:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(66, 133, 244, 0.25);
}
/* 收银台内紧凑版等待视图 */
.pay-confirm-wait { padding: 8px 0 2px; }
.pay-confirm-wait .confirm-icon { width: 64px; height: 64px; }
.pay-confirm-wait .confirm-flow { margin: 16px auto 0; }
.pay-confirm-wait .step-dot { width: 26px; height: 26px; font-size: 12px; }
.pay-confirm-wait .confirm-bar { margin-top: 12px; min-width: 24px; }
.pay-confirm-wait .confirm-title { margin: 12px 0 0; font-size: 16px; font-weight: 700; color: var(--text); }
.pay-confirm-wait .confirm-sub { margin: 6px auto 0; max-width: 380px; font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }

/* ---------- 状态徽章 ---------- */
.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.status-pending { background: #fff3e0; color: #ef6c00; animation: badge-breathe 2s ease-in-out infinite; }
.status-paid { background: #dbeafe; color: #1d4ed8; }
.status-shipped { background: #dcfce7; color: #15803d; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }
@keyframes badge-breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 108, 0, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(239, 108, 0, 0); }
}

/* ---------- 查询页 ---------- */
.query-card {
    width: 100%;
    max-width: 980px;
    margin: 10px auto 40px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 32px;
}
/* 查询表单保持舒适宽度，表格则铺满卡片，避免宽屏下订单编号/操作列被挤压截断 */
.query-card .form-group { max-width: 520px; }
.query-card .btn-buy { max-width: 520px; }
.query-card .admin-table { min-width: 680px; }
.query-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.query-sub { margin: 0 0 22px; color: var(--text-muted); font-size: 13px; }
.query-result { margin-top: 24px; border-top: 1px solid var(--border-light); padding-top: 8px; }

/* ---------- 公告页 ---------- */
.page-title { margin: 6px 0 18px; }
.announce-list { display: flex; flex-direction: column; gap: 0; }
.announce-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 0;
    padding: 20px 24px;
    margin-bottom: -1px;
}
.announce-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.announce-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.announce-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.announce-title { font-size: 15px; font-weight: 600; }
.announce-time { font-size: 12px; color: var(--text-muted); letter-spacing: .5px; }
.announce-content { font-size: 13.5px; line-height: 1.8; color: var(--text-secondary); white-space: pre-wrap; }

/* ============================================================
   后台管理
   ============================================================ */

/* 登录页（左右分栏大厂式） */
.admin-login-bg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 20px;
}
.login-shell {
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 460px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.login-side {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 36px;
    background: linear-gradient(160deg, rgba(66, 133, 244, 0.94), rgba(29, 78, 216, 0.94));
    color: #fff;
}
.login-side-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
}
.login-side-title { margin: 14px 0 8px; font-size: 22px; font-weight: 700; }
.login-side-sub { margin: 0; font-size: 13px; opacity: 0.85; }
.login-side-list {
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
}
.login-side-list li { display: flex; align-items: center; gap: 8px; opacity: 0.92; }
.login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
    text-align: center;
}
.login-brand { margin-bottom: 6px; }
.login-title { margin: 12px 0 4px; font-size: 20px; font-weight: 600; }
.login-sub { margin: 0 0 24px; color: var(--text-muted); font-size: 13px; }
.login-main .form-group { text-align: left; }
.login-btn { margin-top: 6px; }
.login-tip { margin: 14px 0 0; font-size: 12px; color: var(--text-muted); }
.login-back {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.15s;
}
.login-back:hover { color: var(--primary); }
.login-foot {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}
@media (max-width: 720px) {
    .login-shell { flex-direction: column; max-width: 420px; }
    .login-side { padding: 28px 26px; }
    .login-side-list { display: none; }
    .login-main { padding: 28px 26px; }
}

/* 登录验证码 */
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row .text-input { flex: 1; min-width: 0; }
.captcha-img {
    width: 128px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: #fff;
}

/* 布局 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 218px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #001529;
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-logo {
    padding: 22px 20px 12px;
    font-size: 18px;
    font-weight: 800;
}
.admin-user {
    margin: 0 14px 14px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 13px;
}
.admin-nav { flex: 1; padding: 0 10px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav-item {
    display: block;
    padding: 10px 16px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    transition: all 0.2s;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    font-family: inherit;
    cursor: pointer;
}
.admin-nav-item:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.admin-nav-item.active { background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 600; }
.admin-side-foot { padding: 12px 10px; border-top: 1px solid rgba(255, 255, 255, 0.15); display: flex; flex-direction: column; gap: 4px; }
.btn-logout:hover { background: rgba(254, 226, 226, 0.2); }

.admin-main { flex: 1; background: transparent; min-width: 0; }
.admin-content { max-width: 1100px; margin: 0 auto; padding: 24px 28px 60px; }

.admin-page-title { margin: 0; font-size: 21px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-section-title { margin: 26px 0 14px; font-size: 16px; }
.page-tip { color: var(--text-muted); font-size: 13px; }
.card-head { margin: 0; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 18px;
    animation: card-pop-in 0.5s ease-out both;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    background: #e8f0fe;
    color: var(--sc);
}
.stat-num { font-size: 20px; font-weight: 800; color: var(--sc); }
.stat-label { font-size: 12.5px; color: var(--text-muted); }

/* 表格 */
.table-wrap {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
    padding: 12px 14px;
    text-align: left;
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background 0.15s; }
.admin-table tbody tr:hover { background: rgba(66, 133, 244, 0.05); }
.row-muted { opacity: 0.6; }
.row-expanded { background: #e8f0fe !important; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.muted { color: var(--text-muted); font-size: 12.5px; }
.amount { color: var(--text); font-weight: 700; }
.empty-cell { text-align: center; color: var(--text-muted); padding: 30px; }
.desc-cell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cell { max-width: 320px; }
.card-cell .card-content { padding: 8px 12px; background: #f8fafc; border-radius: 8px; max-height: 80px; overflow: hidden; }

.cell-product { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-cover {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.cell-cover img { width: 100%; height: 100%; object-fit: cover; }

.op-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 12.5px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.25s;
    font-family: inherit;
}
.btn-sm:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* 分页栏 */
.pager-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.pager-bar b { color: var(--text); }
.pager-size {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    outline: none;
}
.pager-size:focus { border-color: var(--primary); }
.pager-btns { display: flex; gap: 8px; }

/* 价格阶梯提示与优惠码 */
.tier-hint {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff3e0;
    color: #e65100;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}
.coupon-row { display: flex; gap: 8px; align-items: center; }
.coupon-row .text-input { flex: 1; }
.warn-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 9px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    vertical-align: middle;
}
.coupon-scope { display: flex; flex-wrap: wrap; gap: 14px; }
.coupon-scope .switch-label { cursor: pointer; font-size: 14px; }
.coupon-scope input[type="radio"] { accent-color: var(--primary); }
.tag-manual {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}
/* 首页卡片发货方式角标 */
.ship-badge {
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ship-badge.auto {
    background: var(--primary-light);
    color: var(--primary);
}
.ship-badge.manual {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}
.btn-edit {
    background: var(--primary-light);
    border-color: transparent;
    color: var(--primary-dark);
}
.btn-edit:hover { background: #bfdbfe; color: var(--primary-dark); transform: translateY(-1px); }
.btn-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.btn-danger:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; transform: translateY(-1px); }

/* 详情展开行 */
.detail-row td { background: #f8fafc; }
.order-detail { width: 100%; }

/* 表单卡片 */
.form-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.form-card-title { margin: 0 0 6px; font-size: 15px; }
.form-card-tip { margin: 0 0 14px; color: var(--text-muted); font-size: 12.5px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.form-group-btn { display: flex; align-items: flex-end; }
.req { color: #ef4444; }

.btn-primary {
    padding: 11px 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}
.btn-primary:hover::before { width: 250px; height: 250px; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

/* 筛选标签 */
.filter-tabs { display: flex; gap: 0; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border-light); }
.filter-tab {
    padding: 10px 18px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    margin-bottom: -1px;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 860px) {
    .detail-layout { grid-template-columns: 1fr; }
    .buy-card { position: static; }
    .header-inner { gap: 12px; }
    .nav-item { padding: 8px 10px; font-size: 13px; }
    .admin-sidebar { width: 64px; }
    .admin-logo, .admin-user, .admin-nav-item { font-size: 0; padding: 12px; text-align: center; }
    .admin-nav-item::first-letter, .admin-logo::first-letter { font-size: 16px; }
    .admin-content { padding: 18px 14px 50px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-card { padding: 24px 20px; }
    .hero-text h1 { font-size: 22px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .pay-select { grid-template-columns: 1fr; }
    .query-card, .result-card, .pay-card, .form-card { padding: 22px 18px; }
    .admin-content { padding: 16px 12px 40px; }
    .pay-amount { font-size: 36px; }
}

@media (max-width: 480px) {
    .header-inner { gap: 8px; }
    .logo { font-size: 17px; }
    .logo-icon { width: 24px; height: 24px; font-size: 13px; }
    .nav-item { padding: 8px 8px; font-size: 12.5px; }
    .hero-title { font-size: 26px; }
    .pay-card { padding: 20px 16px; }
    .query-card { padding: 20px 14px; }
    .result-card { padding: 24px 16px; }
    .product-grid { grid-template-columns: 1fr; gap: 14px; }
    .admin-nav-item::first-letter { font-size: 14px; }
}

/* ---------- 安装向导 ---------- */
.install-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 40px 20px;
}
.install-card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}
.install-title { margin: 0 0 4px; font-size: 22px; text-align: center; }
.install-sub { margin: 0 0 24px; color: var(--text-muted); font-size: 13px; text-align: center; }
.install-steps {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}
.install-step {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
}
.install-step.active { color: var(--primary); font-weight: 600; }
.install-step.done { color: #16a34a; }
.install-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.install-step.active .install-step-num { background: var(--primary); color: #fff; }
.install-step.done .install-step-num { background: #16a34a; color: #fff; }
.install-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}
.install-tip {
    background: #f0f7ff;
    border: 1px solid var(--primary-light, #dbeafe);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ---------- 首页信任标识 ---------- */
/* ---------- 仪表盘增强 ---------- */
.section-title {
    margin: 28px 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: all 0.35s;
    box-shadow: var(--shadow-sm);
    animation: card-pop-in 0.5s ease-out both;
}
.quick-card:nth-child(1) { animation-delay: 0.05s; }
.quick-card:nth-child(2) { animation-delay: 0.1s; }
.quick-card:nth-child(3) { animation-delay: 0.15s; }
.quick-card:nth-child(4) { animation-delay: 0.2s; }
@keyframes card-pop-in {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.quick-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--primary);
}
.quick-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 700;
    transition: transform 0.3s;
}
.quick-card:hover .quick-icon { transform: scale(1.1); }
.quick-text {
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   设计元素增强（SVG 图标体系 + 装饰）
   ============================================================ */

/* SVG 图标基础 */
.icon { vertical-align: -3px; flex-shrink: 0; }

/* 品牌 logo 方块 */
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-style: normal;
    flex-shrink: 0;
}
.admin-logo .logo-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.18);
    margin-right: 8px;
}
.install-title .logo-icon { vertical-align: -5px; }

/* 页面标题图标 */
.card-title-row { display: flex; align-items: center; gap: 10px; }
.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}
.page-head { margin-bottom: 20px; }
.page-head .page-title, .page-head .admin-page-title { margin: 0; }

/* 空状态图形（虚线圆环 + 交叉线） */
.empty-shape {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 2px dashed #c7d2fe;
    position: relative;
    opacity: 0.7;
}
.empty-shape::before,
.empty-shape::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: #c7d2fe;
}
.empty-shape::before { transform: translate(-50%, -50%) rotate(45deg); }
.empty-shape::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* 信任栏图标 */
.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #eef2ff;
    color: var(--primary);
}

/* 支付方式色点 */
.pay-icon-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pay-color) 15%, transparent);
}
/* 设置页支付开关色点 */
.pay-switch-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot);
    flex-shrink: 0;
}

/* USDT 收款面板 */
.usdt-panel {
    margin: 16px 0;
    padding: 16px;
    background: #e8f0fe;
    border-radius: 10px;
    border: 1px solid #c6dafc;
    text-align: left;
}
.usdt-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #1a73e8;
}
.usdt-qr {
    display: block;
    width: 180px;
    height: 180px;
    margin: 4px auto 14px;
    padding: 8px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #c6dafc;
}
.usdt-tip {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}
.usdt-label { margin: 0 0 4px; font-size: 12px; color: #1a73e8; }
.usdt-value { margin: 0 0 12px; font-size: 12.5px; word-break: break-all; }
.usdt-amount { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #4285f4; }
.usdt-amount-cny { font-size: 12.5px; font-weight: 400; color: #5f6368; }
.usdt-network-tip {
    margin: 0 0 12px;
    padding: 8px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 12.5px;
    line-height: 1.5;
}
.checkbox-inline { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.checkbox-inline input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* 结果页成功图标（弹入动画） */
.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #16a34a;
    animation: pop-in 0.4s ease;
}
@keyframes pop-in {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 公告卡片左侧渐变竖条 */
.announce-card { position: relative; overflow: hidden; }
.announce-badge {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

/* 安装完成图标 */
.install-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #16a34a;
    animation: pop-in 0.4s ease;
}

/* 商品封面首字（渐变背景由页面内联指定） */
.cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 44px;
    font-weight: 700;
    color: #1a73e8;
    letter-spacing: 1px;
}
.cover-placeholder.large { font-size: 72px; }

/* 含图标的按钮/导航对齐 */
.btn-buy, .btn-pay, .btn-copy, .btn-primary, .btn-back, .btn-query {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.nav-item, .nav-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.admin-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* 安装步骤数字图标居中 */
.install-step-num span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.install-tip {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 登录页品牌图标 */
.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 30px;
    font-weight: 800;
}

/* 仪表盘快捷操作图标 */
.quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 表格单元格小图标 */
.cell-cover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 首页弹窗公告 */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: popup-fade 0.4s ease both; /* 遮罩平滑变暗，避免弹窗出现像页面刷新 */
}

@keyframes popup-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-box {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    animation: popup-in 0.4s ease both; /* 与遮罩同节奏平滑淡入上浮 */
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-head h3 {
    margin: 0;
    font-size: 15px;
}

.popup-close {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.popup-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* 弹窗底部操作按钮与内容区左右对齐（避免按钮紧贴弹窗边缘） */
.popup-box .form-actions {
    margin-top: 0;
    padding: 0 16px 16px;
}

/* 公告 HTML 内容样式 */
.popup-body p,
.announce-content p {
    margin: 0 0 10px;
}

.popup-body p:last-child,
.announce-content p:last-child {
    margin-bottom: 0;
}

.popup-body a,
.announce-content a {
    color: var(--primary);
    text-decoration: underline;
}

.popup-body img,
.announce-content img {
    max-width: 100%;
    border-radius: 8px;
}

.popup-body ul,
.popup-body ol,
.announce-content ul,
.announce-content ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

/* Blazor 重连提示：重连中静默隐藏，仅连接被丢弃（需刷新）时显示浮层 */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
}
#components-reconnect-modal.components-reconnect-rejected,
#components-reconnect-modal.components-reconnect-failed {
    display: flex;
}
.reconnect-tip {
    padding: 14px 22px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    color: #333;
}

/* ============================================================
   全局覆盖层（简白主题）
   纯白底 + 细边框 + 柔和阴影
   ============================================================ */

/* 卡片纯白底 + 柔和阴影 */
.product-card,
.detail-desc,
.buy-card,
.pay-card,
.result-card,
.query-card,
.announce-card,
.stat-card,
.quick-card,
.table-wrap,
.form-card,
.admin-deny-inner,
.install-card,
.popup-box,
.empty-box {
    background: #fff;
    border-color: var(--border-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.4s ease, transform 0.35s ease;
}

/* 卡密框 / 展开行等浅灰区域 */
.card-box,
.detail-row td,
.card-cell .card-content {
    background: #f8f9fa;
}
.card-box-head {
    background: #f1f5f9;
}

/* 表格表头 / 行悬浮 */
.admin-table th {
    background: #f8fafc;
}
.admin-table tbody tr:hover { background: #f5f7fa; }
.row-expanded { background: rgba(66, 133, 244, 0.14) !important; }

/* 次要按钮 / 数量选择 / 支付选项 */
.btn-back, .btn-sm, .qty-btn, .qty-input, .pay-option, .nav-admin {
    background: #fff;
    border-color: var(--border);
}
.qty-btn:hover { background: var(--primary-light); }
.pay-option.selected {
    background: color-mix(in srgb, var(--pay-color) 6%, #fff);
}

/* 卡密封面占位区（首页与详情商品封面为淡蓝渐变，见 .product-cover / .detail-cover 定义） */
.cell-cover {
    background: #f8f9fa;
}

/* 弹窗：遮罩 */
.popup-overlay {
    background: rgba(0, 0, 0, 0.35);
}
.popup-close {
    background: #f1f5f9;
}

/* 重连提示浮层 */
.reconnect-tip {
    background: #fff;
    border: 1px solid var(--border);
}

/* 不支持 backdrop-filter 的浏览器回退 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .admin-sidebar { background: #001529; }
}
