/* ============================================================
   云企发卡网Pro - 设计系统 v3（现代发卡UI）
   风格：扁平 · 白底 · 蓝主橙缀 · 高信息密度 · 双端适配
   ============================================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fff7ed;
    --secondary: #111827;
    --secondary-light: #374151;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --info: #0284c7;
    --info-light: #f0f9ff;
    --text: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f1f5f9;
    --bg: #f5f7fa;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
    --shadow: 0 1px 3px rgba(17, 24, 39, 0.08), 0 1px 2px rgba(17, 24, 39, 0.04);
    --shadow-lg: 0 10px 30px rgba(17, 24, 39, 0.10);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-width: 232px;
    --font: "MiSans", "HarmonyOS Sans SC", "HarmonyOS Sans", "OPPO Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, h5 { color: var(--text); font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; }
.break-all { word-break: break-all; }
/* 全局防文字溢出 */
.card-body, .card-header, .alert, .form-hint, .shop-card-body, .goods-info,
.stat-card, .modal-body, .auth-body, .article-content, .agreement-content,
.shop-notice, .info-box, .announcement-text, .notification-item, .page-subtitle {
    overflow-wrap: break-word;
}
.btn { white-space: nowrap; }
.btn-block { white-space: normal; }
svg { vertical-align: middle; }

/* ============ 布局 ============ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 32px; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 32px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.hl { color: var(--accent); font-weight: inherit; }
.muted { color: var(--text-muted); }

/* ============ 顶部导航（白底现代） ============ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(17,24,39,.03);
}
.nav-container {
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--text); }
.nav-logo img { height: 34px; max-width: 160px; object-fit: contain; }
.nav-logo:hover { color: var(--text); }
.logo-badge {
    width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37,99,235,.28);
}
.logo-badge svg { width: 19px; height: 19px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    padding: 7px 13px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary);
    font-weight: 600; transition: all .15s;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { white-space: nowrap; }
.nav-notify { position: relative; width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all .15s; }
.nav-notify:hover { background: var(--border-light); color: var(--text); }
.nav-notify svg { width: 20px; height: 20px; }
.notify-dot {
    position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.nav-user { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 9px; cursor: pointer; transition: background .15s; }
.nav-user:hover { background: var(--border-light); }
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
    color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; width: 230px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 6px; display: none; z-index: 1100;
}
.nav-dropdown.show { display: block; }
.nav-dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--text-secondary); }
.nav-dropdown a:hover { background: var(--border-light); color: var(--text); }
.nav-dropdown a svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-muted); }
.nav-dropdown a:hover svg { color: var(--primary); }
.dd-divider { height: 1px; background: var(--border-light); margin: 5px 0; }
.nav-toggle, .menu-toggle {
    display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 9px;
    background: var(--white); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg, .menu-toggle svg { width: 20px; height: 20px; color: var(--text-secondary); }

/* ============ Hero（浅色简洁） ============ */
.hero {
    background: linear-gradient(180deg, #eef4ff 0%, #f8faff 55%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 56px 0 60px;
}
.hero-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-secondary); font-size: 15px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { min-width: 170px; justify-content: center; }
@media (max-width: 768px) {
    .hero-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
    .hero-actions .btn { width: 100%; }
}
.hero-stats { display: flex; justify-content: center; gap: 44px; margin-top: 44px; flex-wrap: wrap; }
.hs-item { text-align: center; }
.hs-num { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.hs-num i { color: var(--accent); font-style: normal; }
.hs-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ============ 卡片 ============ */
.card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
    padding: 14px 20px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-header h3 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border-light); }

/* ============ 按钮（扁平） ============ */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .15s; line-height: 1.5; background: none; text-decoration: none; font-weight: 600;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: var(--white); border-color: var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-light); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-link { color: var(--primary); background: none; border: none; padding: 4px 8px; }
.btn-link:hover { color: var(--primary-dark); background: var(--primary-light); }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: var(--radius-sm); line-height: 1.5; }
.btn-lg { padding: 12px 26px; font-size: 15px; border-radius: var(--radius); line-height: 1.5; }
.btn-block { width: 100%; display: flex; justify-content: center; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============ 徽章 ============ */
.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
    border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; max-width: 100%; letter-spacing: 0.01em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: #f3f4f6; color: var(--text-secondary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-accent { background: var(--accent-light); color: var(--accent); }

/* ============ 表单 ============ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.01em; }
.form-control {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; background: var(--white); transition: border-color .15s, box-shadow .15s; outline: none; font-weight: 500;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control-sm { padding: 6px 10px; font-size: 13px; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.form-row .form-group { flex: 1; min-width: 200px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group-append { display: flex; }
.input-group-append .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border: 1px solid var(--border); border-left: none; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute; inset: 0; background: #d1d5db; border-radius: 24px; transition: background .2s; cursor: pointer;
}
.switch-slider::before {
    content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%;
    background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ============ 表格 ============ */
.table-wrapper, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.table thead th {
    text-align: left; padding: 11px 14px; background: #f8fafc; color: var(--text-secondary);
    font-weight: 700; font-size: 12.5px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle;
}
.table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); vertical-align: middle; word-break: break-word; font-weight: 500; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f9fafb; }
.table tbody tr:last-child td { border-bottom: none; }

/* ============ 弹窗 ============ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(17,24,39,.55); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center; z-index: 2000; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 460px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-content { width: 100%; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 16px; margin: 0; }
.modal-close {
    width: 30px; height: 30px; border: none; background: var(--border-light); border-radius: 8px;
    cursor: pointer; color: var(--text-secondary); font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 10px; }

/* ============ 提示框 ============ */
.alert { padding: 11px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; line-height: 1.6; }
.alert-success { background: var(--success-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-danger, .alert-error { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--info-light); color: #075985; border: 1px solid #bae6fd; }

/* ============ 空状态 ============ */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state svg { width: 46px; height: 46px; margin-bottom: 10px; color: #d1d5db; }

/* ============ 分页 ============ */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 34px; height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text-secondary); background: var(--white);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ 统计卡 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-num { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.stat-label { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.stat-value { font-size: 20px; font-weight: 800; }
.stat { display: inline-flex; align-items: center; gap: 6px; }

/* ============ 商铺卡片 ============ */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.shop-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .18s; box-shadow: var(--shadow); }
.shop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #d1d5db; }
.shop-card-header { padding: 18px 20px 14px; display: flex; align-items: center; gap: 13px; }
.shop-card-header img.shop-avatar { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border-light); }
.shop-name { font-size: 15.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.shop-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.shop-card-body { padding: 0 20px 12px; font-size: 13px; color: var(--text-secondary); }
.shop-stats { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--border-light); font-size: 12.5px; color: var(--text-muted); }
.shop-card-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); }

/* ============ 商品卡片 ============ */
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.goods-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    transition: all .18s; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative;
}
.goods-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #d1d5db; }
.goods-image { width: 100%; height: 150px; object-fit: cover; background: #f8fafc; display: block; }
.goods-info { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.goods-name { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.5; margin-bottom: 8px; word-break: break-word; }
.goods-badge { position: absolute; top: 10px; left: 10px; }
.goods-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.goods-price { font-size: 18px; font-weight: 800; color: var(--accent); }
.goods-price::before { content: "¥"; font-size: 12px; font-weight: 600; margin-right: 1px; }
.goods-stock { font-size: 12px; color: var(--text-muted); }

/* ============ 认证登录页 ============ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-header { padding: 28px 32px 6px; text-align: center; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.auth-title { font-size: 20px; font-weight: 800; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.auth-body { padding: 14px 32px 26px; }
.auth-footer { padding: 14px 32px 22px; text-align: center; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border-light); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ============ 用户中心/后台布局 ============ */
.merchant-layout, .admin-layout { display: flex; min-height: calc(100vh - 60px); }
.merchant-sidebar, .admin-sidebar {
    width: var(--sidebar-width); background: var(--white); border-right: 1px solid var(--border);
    flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
}
.admin-sidebar-header, .ms-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--border-light); }
.admin-sidebar-title, .ms-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.admin-sidebar-subtitle, .ms-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.admin-menu, .ms-menu { padding: 10px 12px; flex: 1; }
.admin-menu a, .ms-menu a {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
    font-size: 13.5px; color: var(--text-secondary); margin-bottom: 2px; transition: all .12s;
}
.admin-menu a svg, .ms-menu a svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-muted); }
.admin-menu a:hover, .ms-menu a:hover { background: var(--border-light); color: var(--text); }
.admin-menu a.active, .ms-menu a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.admin-menu a.active svg, .ms-menu a.active svg { color: var(--primary); }
.merchant-main, .admin-main { flex: 1; padding: 24px; min-width: 0; }
.admin-topbar, .merchant-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 24px; background: var(--white); border-bottom: 1px solid var(--border); margin: -24px -24px 24px;
}
.admin-header-title { font-size: 17px; font-weight: 700; }
.page-header { margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.main-content { flex: 1; padding: 24px; min-width: 0; }
.content { flex: 1; min-width: 0; }

/* ============ 页脚（深色） ============ */
.site-footer { background: #0f172a; color: rgba(255,255,255,.65); padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 36px; margin-bottom: 32px; }
.fb-title { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.fb-title span { color: var(--accent); }
.footer-brand p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.5); }
.footer-section h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-section a { display: block; padding: 4px 0; font-size: 13px; color: rgba(255,255,255,.55); }
.footer-section a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,.4); }

/* ============ 商铺页 ============ */
.shop-layout-new { }
.shop-theme-header { margin-bottom: 20px; }
.shop-avatar { border-radius: 12px; object-fit: cover; }
.shop-categories-top { margin-bottom: 20px; }
.category-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.category-tag {
    padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--white);
    font-size: 13px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; transition: all .15s; text-decoration: none;
}
.category-tag:hover { border-color: var(--primary); color: var(--primary); }
.category-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.shop-notice { background: var(--primary-light); border: 1px solid #dbeafe; color: var(--text-secondary); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 20px; }
.shop-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }

/* ============ 聊天室 ============ */
.chat-layout, .chat-container { display: flex; gap: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: calc(100vh - 160px); min-height: 480px; }
.chat-sidebar { width: 240px; border-right: 1px solid var(--border); background: #fafbfc; overflow-y: auto; flex-shrink: 0; }
.chat-sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); background: var(--white); }
.chat-sidebar-header h3 { font-size: 14px; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; background: #f8fafc; }
.chat-message { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-message-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-message-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.chat-message-username { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.chat-message-time { font-size: 11px; color: var(--text-muted); }
.chat-message-bubble { background: var(--white); border: 1px solid var(--border); padding: 9px 13px; border-radius: 4px 12px 12px 12px; font-size: 13.5px; max-width: 560px; word-break: break-word; }
.chat-message-bubble.recalled, .recalled { opacity: .5; font-style: italic; font-size: 12.5px; color: var(--text-muted); }
.chat-recall-btn { font-size: 11px; color: var(--text-muted); border: none; background: none; cursor: pointer; }
.chat-recall-btn:hover { color: var(--danger); }
.chat-input-area { border-top: 1px solid var(--border); padding: 12px 16px; background: var(--white); }
.chat-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.emoji-btn { border: none; background: none; font-size: 18px; cursor: pointer; padding: 4px; }
.chat-emoji-panel { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--border-light); border-radius: 8px; margin-bottom: 8px; max-height: 160px; overflow-y: auto; }
.chat-emoji-panel button { border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; }
.chat-emoji-panel button:hover { background: var(--white); }
.chat-input-wrapper { display: flex; gap: 10px; }
.chat-input { flex: 1; }
.chat-send-btn { flex-shrink: 0; }
.chat-input-area .chat-input { margin-bottom: 0; }
.chat-message-content { flex: 1; min-width: 0; }

/* ============ 商品详情/知识/文件展示 ============ */
.goods-detail-html { font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.goods-detail-html img { max-width: 100%; border-radius: 8px; }
.info-box { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13.5px; }
.success-box, .success-list { text-align: center; padding: 20px; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--success-light); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.success-icon svg { width: 28px; height: 28px; }
.check-list { text-align: left; max-width: 420px; margin: 16px auto; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border-light); border-radius: 8px; margin-bottom: 8px; background: var(--white); font-family: ui-monospace, monospace; font-size: 13px; }
.check-name { font-weight: 600; color: var(--text-secondary); }
.check-status { margin-left: auto; }
.countdown-text { font-size: 13px; color: var(--accent); font-weight: 600; }
.promo-countdown { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--danger); font-weight: 600; }
.progress { height: 6px; background: var(--border-light); border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 6px; transition: width .3s; }

/* ============ 文章/公告/协议 ============ */
.article-content { font-size: 14.5px; line-height: 1.9; color: var(--text-secondary); }
.article-content h1, .article-content h2, .article-content h3 { color: var(--text); margin: 18px 0 8px; }
.article-content p { margin-bottom: 12px; }
.article-content img { max-width: 100%; border-radius: 8px; }
.agreement-content { padding: 12px 4px; }
.announcement-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.announcement-item:last-child { border-bottom: none; }
.announcement-text { flex: 1; font-size: 13.5px; }
.notification-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.notification-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notification-icon svg { width: 19px; height: 19px; }

/* ============ 特色/安装/其他 ============ */
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 24px; height: 24px; }
.install-body { min-height: 100vh; background: var(--bg); padding: 40px 20px; }
.install-container { max-width: 560px; margin: 0 auto; }
.install-header { text-align: center; margin-bottom: 28px; }
.steps { display: flex; justify-content: center; gap: 24px; margin-bottom: 28px; }
.step-item { text-align: center; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--border-light); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 6px; }
.step-item.active .step-num { background: var(--primary); color: #fff; }
.step-item.done .step-num { background: var(--success); color: #fff; }
.captcha-wrapper { display: flex; align-items: center; gap: 10px; }
.captcha-image { border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; height: 38px; }
.captcha-image img { height: 100%; display: block; border-radius: var(--radius-sm); }
.theme-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; transition: all .15s; }
.theme-preview:hover { border-color: var(--primary); }
.theme-preview.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; }
.online-service-btn { position: fixed; right: 22px; bottom: 22px; z-index: 900; box-shadow: var(--shadow-lg); }
.glass-card { background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius); }
.loading { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }
.show { display: flex !important; }

/* ============ 页头工具条 ============ */
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-header .admin-header-title { font-size: 16px; font-weight: 700; }
.admin-overlay, .ms-overlay {
    position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 1400; display: none;
}
.admin-overlay.show, .ms-overlay.show { display: block; }
.menu-toggle { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .chat-sidebar { width: 200px; }
}

@media (max-width: 768px) {
    .nav-container { height: 56px; }
    .nav-links {
        position: fixed; top: 56px; left: 0; right: 0; background: var(--white);
        border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch;
        padding: 10px 16px; gap: 2px; display: none; box-shadow: var(--shadow-lg); z-index: 1200;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 11px 12px; border-radius: 8px; font-size: 14.5px; }
    .nav-toggle { display: flex; }
    .nav-username { display: none !important; }
    .hero { padding: 38px 0 42px; }
    .hero h1 { font-size: 26px; }
    .hero-stats { gap: 28px; margin-top: 34px; }
    .hs-num { font-size: 23px; }
    .merchant-layout, .admin-layout { display: block; }
    .merchant-sidebar, .admin-sidebar {
        position: fixed; left: 0; top: 56px; bottom: 0; height: auto; z-index: 1300;
        transform: translateX(-100%); transition: transform .22s ease; width: 250px; box-shadow: var(--shadow-lg);
    }
    .merchant-sidebar.open, .admin-sidebar.open { transform: translateX(0); }
    .menu-toggle { display: flex; }
    .merchant-main, .admin-main { padding: 16px; }
    .admin-topbar, .merchant-topbar { margin: -16px -16px 16px; padding: 12px 16px; }
    .main-content { padding: 16px; }
    .shop-grid, .goods-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .goods-image { height: 120px; }
    .goods-price { font-size: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .chat-layout, .chat-container { height: calc(100vh - 140px); min-height: 420px; }
    .chat-sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
    .chat-sidebar.open { transform: translateX(0); }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .modal { max-width: calc(100vw - 24px) !important; }
    .modal-body { padding: 16px; }
    .modal-footer { flex-wrap: wrap; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-icon { width: 38px; height: 38px; border-radius: 9px; }
    .stat-num { font-size: 19px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-actions .btn { font-size: 14px; }
    .modal { margin: 12px; }
    .form-row .form-group { min-width: 100%; }
    .nav-logo { font-size: 16px; }
    .nav-logo img { height: 28px; }
    .btn-lg { padding: 10px 18px; }
}

/* 工具类补全 */
.header { position: sticky; top: 0; z-index: 1000; }
.section { margin: 32px 0; }
.grid { display: grid; gap: 16px; }
.primary { color: var(--primary); }
.warning { color: var(--warning); }
.success { color: var(--success); }
.danger { color: var(--danger); }
.info { color: var(--info); }
.error-list { color: var(--danger); font-size: 13px; }
.rt-btn { display: inline-flex; }

/* ============ Bootstrap 兼容加固层（保证本设计系统覆盖Bootstrap） ============ */
/* Bootstrap重置了这些类，这里按我们的设计系统重新声明确保覆盖 */
.btn, .card, .card-header, .card-body, .card-footer, .badge, .modal,
.form-control, .table, .alert, .pagination, .progress, .row, .container {
    font-family: inherit;
}
.btn { line-height: 1.5; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.modal { display: flex; flex-direction: column; max-height: 90vh; }
.form-control { height: auto; padding: 9px 12px; }
.table > :not(caption) > * > * { padding: 11px 14px; }
.progress { background: var(--border-light); border-radius: 6px; }
/* Bootstrap .show 与我们的弹窗显示逻辑保持一致 */
.show { display: flex !important; }
/* 防止Bootstrap给body/h添加的样式影响 */
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
h1, h2, h3, h4, h5 { margin: 0 0 0 0; }
a { text-decoration: none; }

/* ============ 人工排版细节层（对齐排版 · 去模板感 · 手写质感） ============ */
/* ---------- 文字排版：三档层级，行高统一 ---------- */
body { background: var(--bg); }
h1, h2, h3, h4, h5, p, .card-body, .card-text, .form-hint, .text-muted,
.shop-card-body, .goods-info, .stat-label, .table, .alert, .notification-item,
.article-content, .agreement-content, .announcement-text {
    letter-spacing: 0.01em;
}
.page-title, .card-title, .section-title, .goods-name, .shop-name {
    letter-spacing: -0.01em;
}
.card-title, .goods-name { line-height: 1.5; }
.card-text, .form-hint, .text-muted, .shop-card-body, .goods-info { line-height: 1.65; }
.stat-num, .stat-value, .stat { font-variant-numeric: tabular-nums; }

/* ---------- 页面区块标题：左侧橙色竖条（手写细节） ---------- */
.page-title { position: relative; padding-left: 13px; }
.page-title::before {
    content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 4px; border-radius: 2px; background: var(--accent);
}
.section-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.section-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }

/* ---------- 卡片：轻阴影 + 细边框，层次对比 ---------- */
.card, .shop-card, .goods-card, .stat-card, .auth-card, .chat-container,
.chat-layout, .panel {
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}
.card-header { background: #fff; border-bottom: 1px solid #eef1f6; font-weight: 700; }
.card-footer { background: #fff; border-top: 1px solid #eef1f6; }
.shop-card:hover, .goods-card:hover {
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    transform: translateY(-2px);
}

/* ---------- 表格：斑马纹 + 数字列右对齐 + hover 高亮 ---------- */
.table tbody tr:nth-child(even) { background: #fafbfd; }
.table tbody tr:hover { background: #f0f4ff; }
.table td.num, .table td.price, .table td.amount, .table td.money {
    text-align: right; font-variant-numeric: tabular-nums; font-weight: 600;
}

/* ---------- 按钮：主按钮微渐变质感，按压反馈 ---------- */
.btn-primary {
    background: linear-gradient(180deg, #3b76ff 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #2f6bff 0%, #1d4ed8 100%);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
.btn-outline {
    background: #fff; border: 1px solid #d5dce6; color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary); color: var(--primary); background: #f5f8ff;
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-danger { background: linear-gradient(180deg, #ef4444, #dc2626); border: none; }
.btn-success { background: linear-gradient(180deg, #22c55e, #16a34a); border: none; }

/* ---------- 价格 / 金额突出 ---------- */
.price, .goods-price, .amount-text { color: var(--accent); font-weight: 800; }
.stat-card .stat-icon { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04); }

/* ---------- 分隔线与细节 ---------- */
.divider, hr.divider { border: none; border-top: 1px dashed #e2e8f0; margin: 16px 0; }
.list-item { transition: background .15s; }
.list-item:hover { background: #f8fafc; }

/* ---------- 订单号 / 卡密等宽字体 ---------- */
.mono, .trade-no, .card-code, .order-no {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px; letter-spacing: 0.02em;
}

/* ---------- 导航与侧边栏 hover ---------- */
.nav-links a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-nav a:hover { background: var(--primary-light); color: var(--primary); }

/* ---------- 空状态 / 辅助文字排版 ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .empty-icon { margin-bottom: 12px; opacity: .45; }

/* ---------- 页脚细节 ---------- */
.footer-links a:hover { opacity: .85; text-decoration: underline; }

/* ============ 手工感视觉增强（层次 · 节奏 · 质感） ============ */
/* ---------- Hero：浅蓝渐变 + 装饰圆，告别纯白呆板 ---------- */
.hero {
    position: relative;
    background: linear-gradient(180deg, #eef4ff 0%, #f7f9ff 55%, var(--bg) 100%);
    border-bottom: 1px solid #e8eef7;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 380px; height: 380px; background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 65%); top: -160px; right: -100px; }
.hero::after { width: 260px; height: 260px; background: radial-gradient(circle, rgba(249,115,22,.07) 0%, transparent 65%); bottom: -120px; left: -80px; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 38px; }
.hero h1 span { background: linear-gradient(90deg, var(--primary), #4f7cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 15.5px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- 统计：数字加大加粗，图标色块更有辨识度 ---------- */
.stat-num { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 12.5px; letter-spacing: .02em; }
.stats-grid { gap: 14px; }

/* ---------- 商铺/商品区块标题带小字副标题 ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head .section-title { margin: 0; }

/* ---------- 卡片列表化：分隔线+紧凑行距（信息密度更真实） ---------- */
.list-group-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.list-group-row:last-child { border-bottom: none; }

/* ---------- 表格更紧凑、行高一致 ---------- */
.table { line-height: 1.5; }
.table thead th { letter-spacing: .03em; text-transform: none; }

/* ---------- 标签/状态点（真实运营细节） ---------- */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot-green { background: var(--success); }
.dot-gray { background: #9ca3af; }
.dot-orange { background: var(--accent); }

/* ---------- 公告区：左侧竖线引用感 ---------- */
.notice-item { padding: 10px 0; border-bottom: 1px dashed var(--border-light); }
.notice-item:last-child { border-bottom: none; }
.notice-item .notice-time { float: right; color: var(--text-muted); font-size: 12px; }

/* ============ 文字突出根治层（flex溢出 + 超长文本兜底） ============ */
/* flex/grid 子项允许收缩：长文字自动换行而不是把容器顶出 */
.card-body, .card-header, .card-footer, .shop-card-body, .goods-info,
.shop-card-header, .goods-card, .shop-card, .stat-card, .modal-body, .auth-card,
.alert, .list-item, .notice-item, .announcement-item, .article-content,
.agreement-content, .chat-message, .table-wrapper, .table-responsive,
.sidebar-nav, .page-header, .section-head, .hero-inner, .info-box,
.notification-item, .card-text, .form-hint, .page-subtitle, .panel,
.shop-notice, .goods-detail, .chat-message-bubble, .nav-links, .footer-bottom,
.stats-grid, .goods-grid, .shops-grid, .category-scroll {
    min-width: 0;
}
/* 全局断行兜底：只在单词/长URL超出时才断，不影响正常中文排版 */
p, h1, h2, h3, h4, h5, a, span, li, td, th, label, div, strong, b, em, small, blockquote {
    overflow-wrap: break-word;
}
/* 图片/图标不撑破容器 */
img, video, svg { max-width: 100%; }
/* 卡片内标题与描述最多显示完整并换行，禁止顶出 */
.goods-name, .shop-name, .card-title, .article-title, .announcement-title,
.notification-title { overflow-wrap: break-word; }
/* 徽章容器整体不溢出 */
.badge-group, .tags, .shop-tags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
/* 表单输入不溢出 */
input, select, textarea { max-width: 100%; }

/* ---------- 富文本详情/价格行补漏（真实页面高发溢出区） ---------- */
.goods-price-row, .goods-price, .goods-detail-html, .glass-card, .feature-card,
.goods-badge { min-width: 0; }
.goods-detail-html { overflow-wrap: break-word; }
.goods-detail-html img, .goods-detail-html table, .goods-detail-html pre,
.goods-detail-html iframe, .goods-detail-html video { max-width: 100%; }
.goods-detail-html pre, .goods-detail-html code {
    white-space: pre-wrap; word-break: break-word;
    background: #f8fafc; padding: 10px 12px; border-radius: 8px;
    font-size: 13px; line-height: 1.6;
}
.goods-detail-html table { display: block; overflow-x: auto; }

/* ============ 防透明/显示不全兜底（确保所有容器有明确背景） ============ */
body { background: var(--bg); }
/* 所有卡片/容器类显式白底（防CSS缺失时透明） */
.card, .card-body, .card-header, .card-footer, .modal, .modal-body,
.modal-header, .modal-footer, .stat-card, .shop-card, .shop-card-header,
.shop-card-footer, .goods-card, .goods-info, .auth-card, .chat-container,
.chat-layout, .chat-sidebar, .chat-messages, .page-header, .panel,
.table-wrapper, .table, .alert, .popup-box, .dropdown-menu, .nav-dropdown,
.online-service-panel, .info-box, .notification-item, .article-content,
.agreement-content, .settings-panel, .form-card, .order-card, .profile-card {
    background-color: var(--white);
}
/* 表格行不透明 */
.table thead th { background-color: #f8fafc; }
.table tbody td { background-color: transparent; }
.table tbody tr:nth-child(even) td { background-color: #fafbfd; }
.table tbody tr:hover td { background-color: #f0f4ff; }
/* 聊天区背景 */
.chat-sidebar { background-color: #fafbfc; }
.chat-messages { background-color: #f8fafc; }
.chat-message-bubble { background-color: var(--white); }
/* 输入控件不透明 */
input, select, textarea { background-color: var(--white); }
/* 防止内容被裁切导致显示不全 */
.card, .shop-card, .goods-card, .stat-card, .modal, .auth-card,
.chat-container, .chat-layout { overflow: visible; }
/* 弹窗内部滚动由modal-body承担 */
.modal-body { overflow-y: auto; }

/* ============================================================
   10套商铺主题系统（满血版：布局+视觉全套差异）
   body.theme-xxx 驱动，全部免费
   ============================================================ */
/* ---------- 文字突出终极防线 ---------- */
body { overflow-x: hidden; }

/* ================= 1. 企业模板（默认 蓝白黑·网格） ================= */
body.theme-enterprise .shop-theme-header {
    background: linear-gradient(135deg, #eef4ff 0%, #f5f8ff 60%, #ffffff 100%);
    border-bottom: 1px solid #e8eef7;
}
body.theme-enterprise .shop-theme-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(17,24,39,.05);
}
body.theme-enterprise .shop-theme-btn { background: var(--primary); border-radius: 8px; }

/* ================= 2. iOS26透明（毛玻璃·大圆角） ================= */
body.theme-ios .shop-theme-header {
    background: linear-gradient(135deg, rgba(102,126,234,.2), rgba(118,75,162,.16), rgba(240,147,251,.12)) !important;
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,.4);
}
body.theme-ios .shop-theme-card {
    background: rgba(255,255,255,.65) !important;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.5) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 24px rgba(100,116,139,.10);
}
body.theme-ios .shop-theme-btn {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important; border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(118,75,162,.25);
}
body.theme-ios .goods-grid { gap: 18px; }

/* ================= 3. 新年2026（红金喜庆·装饰） ================= */
body.theme-newyear .shop-theme-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 45%, #991b1b 75%, #b45309 100%);
    color: #fff !important;
    border-bottom: 3px solid #fbbf24;
}
body.theme-newyear .shop-theme-header h1,
body.theme-newyear .shop-theme-header .text-muted,
body.theme-newyear .shop-theme-header span { color: #fff !important; }
body.theme-newyear .shop-theme-header .text-muted strong { color: #fde68a !important; }
body.theme-newyear .shop-theme-card {
    background: #fff; border: 1px solid #fcd34d !important; border-radius: 12px;
    border-top: 3px solid #dc2626 !important;
    box-shadow: 0 2px 8px rgba(220,38,38,.06);
}
body.theme-newyear .shop-theme-btn {
    background: linear-gradient(135deg, #dc2626, #b45309) !important;
    border: none !important; border-radius: 8px !important;
}
body.theme-newyear .shop-theme-header .badge { background: rgba(255,255,255,.18); color: #fff; }

/* ================= 4. 卡通模板（糖果色·粗边框） ================= */
body.theme-cartoon .shop-theme-header {
    background: linear-gradient(135deg, #ffecd2, #fcb69f, #a8edea);
    border-bottom: 3px solid #2d3748;
}
body.theme-cartoon .shop-theme-card {
    background: #fff !important; border: 2px solid #2d3748 !important;
    border-radius: 16px !important; box-shadow: 4px 4px 0 #2d3748 !important;
}
body.theme-cartoon .shop-theme-btn {
    background: #ffb703 !important; color: #2d3748 !important;
    border: 2px solid #2d3748 !important; border-radius: 12px !important;
    box-shadow: 2px 2px 0 #2d3748 !important; font-weight: 700;
}

/* ================= 5. 超级企业（深蓝商务·商品列表式） ================= */
body.theme-super_enterprise .shop-theme-header {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    color: #fff !important; border-bottom: 2px solid #2563eb;
}
body.theme-super_enterprise .shop-theme-header h1,
body.theme-super_enterprise .shop-theme-header .text-muted,
body.theme-super_enterprise .shop-theme-header span { color: #fff !important; }
body.theme-super_enterprise .shop-theme-header .text-muted strong { color: #93c5fd !important; }
body.theme-super_enterprise .shop-theme-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    border-left: 4px solid #2563eb;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
body.theme-super_enterprise .shop-theme-btn {
    background: linear-gradient(180deg, #1d4ed8, #1e40af) !important;
    border: none !important; border-radius: 6px !important;
}
/* 布局差异：商品改为列表式（单列横排） */
body.theme-super_enterprise .goods-grid {
    grid-template-columns: 1fr !important; gap: 12px;
}
body.theme-super_enterprise .goods-card {
    display: flex !important; align-items: center; gap: 16px; padding: 14px 18px;
}
body.theme-super_enterprise .goods-card .goods-image {
    width: 84px !important; height: 84px !important; flex-shrink: 0; margin: 0 !important;
}
body.theme-super_enterprise .goods-card .goods-info { flex: 1; }
body.theme-super_enterprise .goods-card .goods-name { margin-bottom: 6px; }
body.theme-super_enterprise .goods-card .goods-buy { margin-left: auto; }

/* ================= 6. IOS38概念（极致毛玻璃·悬浮卡片） ================= */
body.theme-ios38 .shop-theme-header {
    background: rgba(255,255,255,.5) !important;
    backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
    border-bottom: 1px solid rgba(255,255,255,.6);
}
body.theme-ios38 .shop-theme-card {
    background: rgba(255,255,255,.72) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.7) !important;
    border-radius: 24px !important;
    box-shadow: 0 12px 32px rgba(67,56,202,.12);
}
body.theme-ios38 .shop-theme-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important; border-radius: 14px !important;
    box-shadow: 0 6px 16px rgba(99,102,241,.3);
}
body.theme-ios38 .goods-grid { gap: 20px; }
body.theme-ios38 .shop-theme-header .shop-avatar { box-shadow: 0 8px 24px rgba(99,102,241,.25); }

/* ================= 7. 超级卡通（亮色大色块·圆润） ================= */
body.theme-super_cartoon .shop-theme-header {
    background: linear-gradient(135deg, #fde68a, #fca5a5, #a5f3fc);
    border-bottom: 4px solid #f59e0b;
}
body.theme-super_cartoon .shop-theme-card {
    background: #fff !important; border: none !important; border-radius: 20px !important;
    box-shadow: 0 6px 20px rgba(245,158,11,.15) !important;
}
body.theme-super_cartoon .shop-theme-btn {
    background: linear-gradient(135deg, #f59e0b, #f97316) !important;
    border: none !important; border-radius: 999px !important; font-weight: 700;
}
body.theme-super_cartoon .shop-theme-header h1 { color: #78350f; }
body.theme-super_cartoon .shop-theme-header .text-muted span { color: #92400e !important; }

/* ================= 8. 浪漫少年（深蓝星空·霓虹蓝） ================= */
body.theme-romantic .shop-theme-header {
    background: linear-gradient(135deg, #0f172a, #1e3a5f 55%, #3b82f6);
    color: #fff !important; border-bottom: 1px solid rgba(59,130,246,.4);
}
body.theme-romantic .shop-theme-header h1,
body.theme-romantic .shop-theme-header .text-muted,
body.theme-romantic .shop-theme-header span { color: #fff !important; }
body.theme-romantic .shop-theme-header .text-muted strong { color: #93c5fd !important; }
body.theme-romantic .shop-theme-header .badge { background: rgba(59,130,246,.25); color: #dbeafe; }
body.theme-romantic .shop-theme-card {
    background: linear-gradient(160deg, #1e293b, #0f172a) !important;
    border: 1px solid rgba(59,130,246,.35) !important;
    border-radius: 16px !important; color: #e2e8f0 !important;
}
body.theme-romantic .shop-theme-card .goods-name { color: #e2e8f0 !important; }
body.theme-romantic .shop-theme-card .text-muted { color: #94a3b8 !important; }
body.theme-romantic .shop-theme-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: none !important; border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(59,130,246,.35);
}
body.theme-romantic .shop-theme-header .shop-avatar { border: 2px solid rgba(147,197,253,.5); }

/* ================= 9. 超萌少女（粉色甜美·特大圆角） ================= */
body.theme-cute .shop-theme-header {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8, #f9a8d4);
    border-bottom: 3px solid #f472b6;
}
body.theme-cute .shop-theme-header h1 { color: #9d174d; }
body.theme-cute .shop-theme-header .text-muted span { color: #be185d !important; }
body.theme-cute .shop-theme-card {
    background: linear-gradient(160deg, #fff, #fdf2f8) !important;
    border: 2px solid #f9a8d4 !important; border-radius: 24px !important;
    box-shadow: 0 6px 20px rgba(244,114,182,.12) !important;
}
body.theme-cute .shop-theme-btn {
    background: linear-gradient(135deg, #ec4899, #f472b6) !important;
    border: none !important; border-radius: 999px !important;
    box-shadow: 0 4px 12px rgba(236,72,153,.3); font-weight: 700;
}
body.theme-cute .shop-theme-header .shop-avatar { border: 2px solid #f9a8d4; }

/* ================= 10. 二次元（紫粉霓虹·动漫风） ================= */
body.theme-anime .shop-theme-header {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899);
    color: #fff !important; border-bottom: 2px solid #d8b4fe;
}
body.theme-anime .shop-theme-header h1,
body.theme-anime .shop-theme-header .text-muted,
body.theme-anime .shop-theme-header span { color: #fff !important; }
body.theme-anime .shop-theme-header .text-muted strong { color: #e9d5ff !important; }
body.theme-anime .shop-theme-header .badge { background: rgba(255,255,255,.2); color: #fff; }
body.theme-anime .shop-theme-card {
    background: linear-gradient(160deg, #faf5ff, #fdf4ff) !important;
    border: 2px solid #a855f7 !important; border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(168,85,247,.15) !important;
}
body.theme-anime .shop-theme-btn {
    background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
    border: none !important; border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
body.theme-anime .shop-theme-header .shop-avatar { border: 2px solid rgba(255,255,255,.5); }

/* ---------- 深色主题的文字可读性兜底 ---------- */
body.theme-romantic .shop-theme-header .shop-notice,
body.theme-anime .shop-theme-header .shop-notice { color: #e2e8f0; }
