@charset "UTF-8";
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

:root {
    /* 清新淡雅蓝紫主题 · 参考 /stu 设计语言 */
    --bg-page: #f0f4ff;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-gray: #f7f9fb;
    --bg-light: #fafcfe;
    --primary: #3b5bdb;          /* 清新蓝紫 */
    --primary-dark: #2563eb;
    --primary-light: #4f6ef7;
    --primary-bg: #eef2ff;
    --secondary: #4f6ef7;        /* 浅蓝紫 */
    --gradient-primary: linear-gradient(135deg, #3b5bdb 0%, #2563eb 100%);
    --gradient-hot: linear-gradient(135deg, #ff8f5e 0%, #ff4d6d 100%);
    --gradient-gold: linear-gradient(135deg, #f9a825 0%, #f57f17 100%);
    --success: #07c160;
    --success-bg: #e8f8ee;
    --warning: #ffa502;
    --info: #3b5bdb;
    --danger: #ff3b30;
    --text-dark: #1a1a1a;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #bfbfbf;
    --border: #eeeeee;
    --border-dark: #e0e0e0;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --transition: all 0.2s ease;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --tab-height: 50px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg-page); color: var(--text-primary); font-size: 14px; line-height: 1.6; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:active { opacity: 0.7; }
img { display: block; max-width: 100%; }
input, textarea, select, button { font-family: var(--font); font-size: 14px; outline: none; border: none; background: none; }
button { cursor: pointer; }
ul, ol { list-style: none; }

/* ========== 移动端容器 ========== */
.mobile-container { max-width: 750px; margin: 0 auto; min-height: 100vh; background: var(--bg-page); position: relative; box-shadow: 0 0 40px rgba(0,0,0,0.05); }
@media (min-width: 768px) { .mobile-container { max-width: 430px; } }

/* ========== 顶部导航栏 ========== */
.nav-bar { position: sticky; top: 0; z-index: 100; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.nav-bar-primary { background: var(--gradient-primary); color: #fff; border-bottom: none; }
.nav-bar-content { display: flex; align-items: center; height: 44px; padding: 0 12px; position: relative; }
.nav-bar-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-bar-primary .nav-bar-title { color: #fff; }
.nav-bar-back { position: absolute; left: 12px; display: flex; align-items: center; gap: 2px; color: var(--text-primary); font-size: 15px; }
.nav-bar-primary .nav-bar-back { color: #fff; }
.nav-bar-back svg { width: 22px; height: 22px; }
.nav-bar-right { position: absolute; right: 12px; display: flex; align-items: center; gap: 12px; }
.nav-bar-right svg { width: 22px; height: 22px; }

/* ========== 底部Tab栏 ========== */
.tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: calc(var(--tab-height) + var(--safe-bottom)); background: var(--bg-white); border-top: 1px solid var(--border); display: flex; z-index: 100; padding-bottom: var(--safe-bottom); }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); font-size: 10px; transition: var(--transition); }
.tab-item.active { color: var(--primary); }
.tab-item svg { width: 24px; height: 24px; }
.tab-item-icon { position: relative; }
.tab-badge { position: absolute; top: -4px; right: -10px; background: var(--primary); color: #fff; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px; }

/* ========== 搜索栏 ========== */
.search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-white); }
.search-bar-primary { background: var(--gradient-primary); }
.search-input-wrap { flex: 1; display: flex; align-items: center; background: var(--bg-gray); border-radius: 20px; padding: 6px 12px; gap: 6px; }
.search-bar-primary .search-input-wrap { background: rgba(255,255,255,0.9); }
.search-input-wrap svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-input-wrap input { flex: 1; border: none; background: none; font-size: 14px; color: var(--text-primary); }
.search-input-wrap input::placeholder { color: var(--text-light); }
.search-btn { padding: 6px 16px; background: var(--gradient-primary); color: #fff; border-radius: 20px; font-size: 14px; font-weight: 500; white-space: nowrap; }

/* ========== 轮播图 ========== */
.swiper { position: relative; width: 100%; overflow: hidden; border-radius: 0; }
.swiper-track { display: flex; transition: transform 0.3s ease; }
.swiper-slide { min-width: 100%; position: relative; }
.swiper-slide img { width: 100%; height: 180px; object-fit: cover; }
.swiper-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.swiper-dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.5); transition: var(--transition); }
.swiper-dot.active { width: 18px; background: #fff; }
.swiper-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.3); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.swiper-prev { left: 8px; }
.swiper-next { right: 8px; }

/* ========== 分类网格 ========== */
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px; background: var(--bg-white); }
.category-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.category-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--primary-bg); }
.category-name { font-size: 12px; color: var(--text-primary); text-align: center; }

/* ========== 公告滚动 ========== */
.notice-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fffbe6; border-bottom: 1px solid #fff1bf; overflow: hidden; }
.notice-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--warning); }
.notice-scroll { flex: 1; overflow: hidden; white-space: nowrap; }
.notice-text { display: inline-block; animation: scrollText 15s linear infinite; font-size: 13px; color: var(--text-secondary); }
@keyframes scrollText { from{transform:translateX(100%)} to{transform:translateX(-100%)} }

/* ========== 商品卡片 - 瀑布流 ========== */
.product-waterfall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
.product-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.product-card:active { transform: scale(0.98); }
.product-card-img { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--bg-gray); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-tag { position: absolute; top: 6px; left: 6px; padding: 2px 6px; background: var(--gradient-hot); color: #fff; font-size: 10px; border-radius: 4px; font-weight: 600; }
.product-card-body { padding: 8px; }
.product-card-title { font-size: 13px; color: var(--text-primary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.product-card-meta { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.product-card-shop { font-size: 11px; color: var(--text-muted); }
.product-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.product-card-price { color: var(--primary); font-weight: 700; }
.product-card-price-symbol { font-size: 12px; }
.product-card-price-value { font-size: 17px; }
.product-card-price-original { font-size: 11px; color: var(--text-light); text-decoration: line-through; margin-left: 4px; }
.product-card-sales { font-size: 11px; color: var(--text-muted); }
.product-card-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-gray); }

/* ========== 大商品卡（横排） ========== */
.product-list-item { display: flex; gap: 10px; padding: 12px; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.product-list-item-img { width: 110px; height: 110px; border-radius: var(--radius); flex-shrink: 0; object-fit: cover; background: var(--bg-gray); }
.product-list-item-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.product-list-item-title { font-size: 14px; color: var(--text-primary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-list-item-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 500; }
.tag-primary { background: var(--primary-bg); color: var(--primary); }
.tag-orange { background: #fff4e6; color: var(--secondary); }
.tag-green { background: var(--success-bg); color: var(--success); }
.tag-gray { background: var(--bg-gray); color: var(--text-muted); }

/* ========== 按钮 ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500; transition: var(--transition); border: 1px solid transparent; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gradient-primary); color: #fff; }
.btn-danger { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border-dark); color: var(--text-primary); }
.btn-outline-primary { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-gray { background: var(--bg-gray); color: var(--text-secondary); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-round { border-radius: 20px; }
.btn-disabled { opacity: 0.5; pointer-events: none; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 10px 12px; background: var(--bg-white); border: 1px solid var(--border-dark); border-radius: var(--radius); font-size: 14px; color: var(--text-primary); transition: var(--transition); }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,91,219,0.1); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========== 卡片 ========== */
.card { background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 16px; font-weight: 600; color: var(--text-dark); }
.card-body { padding: 16px; }
.card-footer { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ========== 标签页 ========== */
.tabs { display: flex; background: var(--bg-white); border-bottom: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab { flex-shrink: 0; padding: 12px 16px; font-size: 14px; color: var(--text-secondary); position: relative; transition: var(--transition); white-space: nowrap; }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--primary); border-radius: 2px; }

/* ========== 徽章 ========== */
.badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.badge-primary { background: var(--primary); color: #fff; }
.badge-success { background: var(--success); color: #fff; }
.badge-warning { background: var(--warning); color: #fff; }
.badge-gray { background: var(--bg-gray); color: var(--text-muted); }

/* ========== 价格 ========== */
.price { color: var(--primary); font-weight: 700; }
.price-symbol { font-size: 12px; }
.price-value { font-size: 20px; }
.price-original { font-size: 13px; color: var(--text-light); text-decoration: line-through; margin-left: 6px; }

/* ========== 状态标签 ========== */
.status-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.status-pending { background: #fff4e6; color: var(--warning); }
.status-active, .status-success, .status-normal { background: var(--success-bg); color: var(--success); }
.status-danger, .status-failed, .status-closed { background: var(--primary-bg); color: var(--primary); }
.status-offline, .status-disabled { background: var(--bg-gray); color: var(--text-muted); }

/* ========== 列表 ========== */
.list-item { display: flex; align-items: center; padding: 12px 16px; background: var(--bg-white); border-bottom: 1px solid var(--border); gap: 12px; }
.list-item:active { background: var(--bg-gray); }
.list-item-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--bg-gray); flex-shrink: 0; }
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-size: 15px; color: var(--text-dark); font-weight: 500; }
.list-item-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.list-item-arrow { color: var(--text-light); font-size: 18px; }

/* ========== 模态框 ========== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; align-items: flex-end; justify-content: center; }
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal { background: var(--bg-white); border-radius: 16px 16px 0 0; width: 100%; max-width: 430px; max-height: 80vh; overflow-y: auto; animation: slideUp 0.3s ease; }
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 600; color: var(--text-dark); }
.modal-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text-muted); }
.modal-body { padding: 16px; }
.modal-footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.modal-footer .btn { flex: 1; }

/* ========== Toast ========== */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 12px 20px; border-radius: var(--radius); font-size: 14px; z-index: 2000; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.empty-state-text { font-size: 14px; color: var(--text-muted); }

/* ========== 加载 ========== */
.loading { text-align: center; padding: 20px; color: var(--text-muted); font-size: 14px; }
.spinner { display: inline-block; width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }

/* ========== 统计卡片 ========== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.stat-card { background: var(--bg-white); border-radius: var(--radius); padding: 12px 8px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text-dark); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ========== 用户端专用样式 ========== */
.user-header { background: var(--gradient-primary); color: #fff; padding: 12px; }
.user-header-top { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.user-info { flex: 1; }
.user-name { font-size: 18px; font-weight: 600; }
.user-level { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.user-quick { display: flex; justify-content: space-around; padding: 16px 0 8px; }
.user-quick-item { text-align: center; }
.user-quick-icon { font-size: 24px; margin-bottom: 4px; }
.user-quick-text { font-size: 12px; }

/* ========== 快捷入口网格 ========== */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; background: var(--bg-white); }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.quick-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg-gray); }
.quick-text { font-size: 12px; color: var(--text-primary); }

/* ========== 优惠卷 ========== */
.coupon-card { display: flex; background: var(--bg-white); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.coupon-left { width: 100px; background: var(--gradient-primary); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; position: relative; }
.coupon-left::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--bg-page); }
.coupon-amount { font-size: 28px; font-weight: 700; }
.coupon-amount-symbol { font-size: 14px; }
.coupon-condition { font-size: 11px; opacity: 0.9; margin-top: 4px; }
.coupon-right { flex: 1; padding: 12px; display: flex; flex-direction: column; justify-content: center; }
.coupon-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.coupon-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.coupon-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ========== 商品详情 ========== */
.detail-gallery { width: 100%; aspect-ratio: 1; background: var(--bg-gray); overflow: hidden; position: relative; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-price-bar { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; background: var(--bg-white); }
.detail-price-current { color: var(--primary); font-size: 28px; font-weight: 700; }
.detail-price-symbol { font-size: 16px; }
.detail-price-original { font-size: 14px; color: var(--text-light); text-decoration: line-through; }
.detail-price-tag { margin-left: auto; padding: 2px 8px; background: var(--primary-bg); color: var(--primary); border-radius: 4px; font-size: 12px; }
.detail-title { padding: 12px 16px; background: var(--bg-white); }
.detail-title h2 { font-size: 16px; font-weight: 600; color: var(--text-dark); line-height: 1.4; }
.detail-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.detail-info-row { display: flex; justify-content: space-between; padding: 8px 16px; background: var(--bg-white); border-top: 1px solid var(--border); font-size: 13px; }
.detail-info-label { color: var(--text-muted); }
.detail-info-value { color: var(--text-primary); }

/* ========== 底部操作栏 ========== */
.action-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: var(--bg-white); border-top: 1px solid var(--border); display: flex; align-items: center; padding: 8px 12px; gap: 8px; z-index: 100; padding-bottom: calc(8px + var(--safe-bottom)); }
.action-bar-icon { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 8px; }
.action-bar-icon svg { width: 24px; height: 24px; }
.action-bar-icon span { font-size: 10px; color: var(--text-muted); }
.action-bar-btn { flex: 1; padding: 10px; border-radius: 20px; font-size: 15px; font-weight: 600; text-align: center; }
.action-bar-btn-cart { background: var(--gradient-gold); color: #fff; }
.action-bar-btn-buy { background: var(--gradient-primary); color: #fff; }

/* ========== 商家端/管理端共用 ========== */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg-page); }
.admin-sidebar { width: 220px; background: linear-gradient(180deg, #3b5bdb 0%, #2563eb 100%); color: #e8e8e8; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.admin-sidebar-header { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.admin-sidebar-header h2 { font-size: 18px; color: #fff; }
.admin-sidebar-header p { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.admin-sidebar-nav { padding: 8px 0; }
.admin-sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: rgba(255,255,255,0.75); font-size: 14px; transition: var(--transition); }
.admin-sidebar-link:hover, .admin-sidebar-link.active { background: rgba(255,255,255,0.15); color: #fff; border-left: 3px solid #fff; }
.admin-sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.admin-main { flex: 1; margin-left: 220px; padding: 20px; }

/* 移动端管理端 - 底部Tab */
.admin-tab-bar { position: fixed; bottom: 0; left: 0; right: 0; height: calc(54px + var(--safe-bottom)); background: var(--bg-white); border-top: 1px solid var(--border); display: flex; z-index: 100; padding-bottom: var(--safe-bottom); }
.admin-tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); font-size: 10px; }
.admin-tab-item.active { color: var(--primary); }
.admin-tab-item svg { width: 22px; height: 22px; }

/* ========== 表格 - 响应式 ========== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: var(--bg-gray); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text-secondary); white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.table tr:active { background: var(--bg-gray); }

/* ========== 分页 ========== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 16px; }
.pagination button { min-width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg-white); border: 1px solid var(--border); color: var(--text-primary); font-size: 13px; }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; }

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-bold { font-weight: 700; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }

/* ========== 暗色管理端 ========== */
.dark-admin-body { background: #f0f4ff; color: #333; }
.dark-admin-sidebar { background: linear-gradient(180deg, #3b5bdb 0%, #2563eb 100%); }

/* ========== 订单状态卡片 ========== */
.order-card { background: var(--bg-white); border-radius: var(--radius-lg); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.order-card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.order-shop { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.order-status { font-size: 13px; font-weight: 500; }
.order-card-body { padding: 12px 16px; }
.order-item { display: flex; gap: 10px; margin-bottom: 8px; }
.order-item:last-child { margin-bottom: 0; }
.order-item-img { width: 70px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-gray); flex-shrink: 0; }
.order-item-info { flex: 1; min-width: 0; }
.order-item-title { font-size: 13px; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-item-spec { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.order-item-price { font-size: 14px; color: var(--primary); font-weight: 600; }
.order-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--border); }
.order-total { font-size: 14px; }
.order-total strong { color: var(--primary); }
.order-actions { display: flex; gap: 8px; }

/* ========== 签到日历 ========== */
.signin-calendar { background: var(--bg-white); border-radius: var(--radius-lg); padding: 16px; margin: 12px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.calendar-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 14px; color: var(--text-primary); position: relative; }
.calendar-day.checked { background: var(--success); color: #fff; }
.calendar-day.today { border: 2px solid var(--primary); }
.calendar-day.missed { color: var(--text-light); }

/* ========== 会员卡片 ========== */
.member-card { background: var(--gradient-gold); border-radius: var(--radius-lg); padding: 20px; margin: 12px; color: #fff; position: relative; overflow: hidden; }
.member-card-level { font-size: 24px; font-weight: 700; }
.member-card-points { font-size: 36px; font-weight: 700; margin-top: 8px; }
.member-card-label { font-size: 12px; opacity: 0.9; }
.member-progress { height: 8px; background: rgba(255,255,255,0.3); border-radius: 4px; margin-top: 16px; overflow: hidden; }
.member-progress-bar { height: 100%; background: #fff; border-radius: 4px; }

/* ========== 聊天 ========== */
.chat-page { display: flex; flex-direction: column; height: 100vh; background: var(--bg-page); }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 12px; }
.chat-msg-self { flex-direction: row-reverse; }
.chat-msg-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-gray); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.chat-msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.chat-msg-other .chat-msg-bubble { background: var(--bg-white); color: var(--text-primary); border-top-left-radius: 4px; }
.chat-msg-self .chat-msg-bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.chat-input-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-white); border-top: 1px solid var(--border); padding-bottom: calc(8px + var(--safe-bottom)); }
.chat-input { flex: 1; padding: 8px 12px; background: var(--bg-gray); border-radius: 20px; font-size: 14px; }

/* ========== 管理端面板适配 ========== */
@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; padding: 12px; padding-bottom: 60px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== 搜索页 ========== */
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; }
.search-tag { padding: 6px 14px; background: var(--bg-gray); border-radius: 16px; font-size: 13px; color: var(--text-secondary); }
.search-tag.hot { background: var(--primary-bg); color: var(--primary); }

/* ========== 筛选栏 ========== */
.filter-bar { display: flex; background: var(--bg-white); border-bottom: 1px solid var(--border); position: sticky; top: 44px; z-index: 50; }
.filter-item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px; font-size: 13px; color: var(--text-secondary); }
.filter-item.active { color: var(--primary); font-weight: 600; }

/* ========== 评价 ========== */
.review-item { padding: 12px 16px; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.review-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-gray); }
.review-name { font-size: 14px; font-weight: 500; }
.review-stars { color: var(--warning); font-size: 12px; }
.review-content { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.review-images { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.review-image { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.review-reply { margin-top: 8px; padding: 8px 12px; background: var(--bg-gray); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); }

/* ========== 管理端专业布局 v5.1 ========== */
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.admin-page-title { font-size: 20px; font-weight: 700; color: var(--text-dark); }
.admin-page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.admin-search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.admin-search-input { flex: 1; padding: 8px 14px; background: var(--bg-white); border: 1px solid var(--border-dark); border-radius: var(--radius); font-size: 14px; }
.admin-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,91,219,0.1); }
.admin-filter-row { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.admin-filter-chip { padding: 6px 14px; border-radius: 16px; font-size: 13px; white-space: nowrap; background: var(--bg-white); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.admin-filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-filter-chip:active { opacity: 0.7; }
.admin-data-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-data-table thead { background: var(--bg-gray); }
.admin-data-table th { padding: 12px 14px; text-align: left; font-weight: 600; color: var(--text-secondary); white-space: nowrap; border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.admin-data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-primary); vertical-align: middle; }
.admin-data-table tbody tr:hover { background: var(--bg-light); }
.admin-data-table tbody tr:last-child td { border-bottom: none; }
.admin-card-list { display: flex; flex-direction: column; gap: 10px; }
.admin-data-card { background: var(--bg-white); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.admin-data-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.admin-data-card-title { font-size: 15px; font-weight: 600; color: var(--text-dark); }
.admin-data-card-meta { font-size: 12px; color: var(--text-muted); }
.admin-data-card-body { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.admin-data-card-field { font-size: 13px; }
.admin-data-card-field-label { color: var(--text-muted); }
.admin-data-card-field-value { color: var(--text-primary); font-weight: 500; }
.admin-data-card-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.admin-action-btn { padding: 5px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--bg-white); color: var(--text-secondary); cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.admin-action-btn:hover { opacity: 0.8; }
.admin-action-btn:active { opacity: 0.6; }
.admin-action-btn-primary { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }
.admin-action-btn-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.admin-action-btn-danger { background: #fff0f0; border-color: var(--danger); color: var(--danger); }
.admin-action-btn-warning { background: #fff8e6; border-color: var(--warning); color: var(--warning); }
.admin-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.admin-stat-mini { background: var(--bg-white); border-radius: var(--radius-lg); padding: 14px; text-align: center; box-shadow: var(--shadow-sm); }
.admin-stat-mini-value { font-size: 22px; font-weight: 700; color: var(--text-dark); }
.admin-stat-mini-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.admin-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 16px 0; }
.admin-pagination a { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--bg-white); border: 1px solid var(--border); color: var(--text-primary); font-size: 13px; text-decoration: none; transition: var(--transition); }
.admin-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.admin-pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-pagination a.disabled { opacity: 0.4; pointer-events: none; }
.admin-empty { text-align: center; padding: 48px 20px; }
.admin-empty-icon { width: 64px; height: 64px; margin: 0 auto 12px; opacity: 0.2; }
.admin-empty-text { font-size: 14px; color: var(--text-muted); }
.admin-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.admin-tab { padding: 10px 18px; font-size: 14px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); text-decoration: none; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.admin-form-row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-form-row > * { flex: 1; min-width: 200px; }
.admin-detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); }
.admin-detail-label { width: 120px; color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.admin-detail-value { flex: 1; color: var(--text-dark); font-size: 14px; font-weight: 500; }
.admin-avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.admin-avatar-md { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.admin-product-img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.admin-select { padding: 7px 12px; border: 1px solid var(--border-dark); border-radius: var(--radius); font-size: 13px; background: var(--bg-white); color: var(--text-primary); }
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-modal { background: var(--bg-white); border-radius: var(--radius-xl); max-width: 500px; width: 100%; max-height: 80vh; overflow-y: auto; }
.admin-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.admin-modal-title { font-size: 17px; font-weight: 700; color: var(--text-dark); }
.admin-modal-body { padding: 20px; }
.admin-modal-footer { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); justify-content: flex-end; }
@media (max-width: 768px) {
    .admin-stat-row { grid-template-columns: repeat(2, 1fr); }
    .admin-data-table { display: block; }
    .admin-data-table thead { display: none; }
    .admin-data-table tbody, .admin-data-table tr, .admin-data-table td { display: block; width: 100%; }
    .admin-data-table tr { border-bottom: 8px solid var(--bg-page); }
    .admin-data-table td { padding: 8px 14px; border: none; }
    .admin-data-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); font-size: 11px; display: block; margin-bottom: 2px; }
}

/* ========== v13.0 UI增强 - 动画/深色模式/骨架屏 ========== */

/* 全局平滑滚动 */
html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
::-webkit-scrollbar { width: 0; height: 0; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* 输入框增强 */
input, textarea, select { -webkit-appearance: none; appearance: none; }
input[type="checkbox"], input[type="radio"] { appearance: auto; }

/* 防止文字选中闪烁 */
.label, .title, .name, .nav-bar-title, .tab, .btn { -webkit-user-select: none; user-select: none; }

/* 微交互动画 */
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes bounceIn { 0% { opacity: 0; transform: scale(0.8); } 60% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes ripple { to { transform: scale(2); opacity: 0; } }

/* 动画工具类 */
.anim-bounce-in { animation: bounceIn 0.4s ease; }
.anim-slide-right { animation: slideInRight 0.3s ease; }
.anim-slide-left { animation: slideInLeft 0.3s ease; }
.anim-fade-up { animation: fadeInUp 0.4s ease; }
.anim-pulse { animation: pulse 2s ease infinite; }

/* 骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
.skeleton-text { height: 14px; margin-bottom: 6px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-card { height: 200px; border-radius: 10px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-line { height: 12px; border-radius: 4px; }

/* 涟漪点击效果 */
.ripple { position: relative; overflow: hidden; }
.ripple-effect {
    position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4);
    transform: scale(0); animation: ripple 0.6s linear;
    pointer-events: none;
}

/* 深色模式 */
:root[data-theme="dark"] {
    --bg-page: #121212;
    --bg-white: #1e1e1e;
    --bg-card: #1a1a1a;
    --bg-gray: #2a2a2a;
    --bg-light: #222;
    --primary: #3b5bdb;
    --primary-dark: #2563eb;
    --primary-light: #4f6ef7;
    --primary-bg: #0a0f5f;
    --secondary: #4f6ef7;
    --gradient-primary: linear-gradient(135deg, #3b5bdb 0%, #4f6ef7 100%);
    --success: #07c160;
    --success-bg: #1a2e22;
    --warning: #ffa502;
    --info: #3b5bdb;
    --danger: #ff3b30;
    --text-dark: #f0f0f0;
    --text-primary: #e0e0e0;
    --text-secondary: #aaa;
    --text-muted: #777;
    --text-light: #555;
    --border: #333;
    --border-dark: #444;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}
:root[data-theme="dark"] body { background: var(--bg-page); color: var(--text-primary); }
:root[data-theme="dark"] .mobile-container { background: var(--bg-page); box-shadow: 0 0 40px rgba(0,0,0,0.3); }
:root[data-theme="dark"] .nav-bar { background: var(--bg-white); border-bottom-color: var(--border); }
:root[data-theme="dark"] .tab-bar { background: var(--bg-white); border-top-color: var(--border); }
:root[data-theme="dark"] .product-card { background: var(--bg-card); }
:root[data-theme="dark"] .card { background: var(--bg-card); }
:root[data-theme="dark"] .list-item { background: var(--bg-white); border-bottom-color: var(--border); }
:root[data-theme="dark"] .modal { background: var(--bg-white); }
:root[data-theme="dark"] input, :root[data-theme="dark"] textarea, :root[data-theme="dark"] select {
    background: var(--bg-gray); color: var(--text-primary); border-color: var(--border-dark);
}
:root[data-theme="dark"] .form-input, :root[data-theme="dark"] .form-textarea, :root[data-theme="dark"] .form-select {
    background: var(--bg-gray); border-color: var(--border-dark); color: var(--text-primary);
}
:root[data-theme="dark"] .search-input-wrap { background: var(--bg-gray); }
:root[data-theme="dark"] .search-input-wrap input { color: var(--text-primary); }
:root[data-theme="dark"] .search-input-wrap input::placeholder { color: var(--text-muted); }
:root[data-theme="dark"] .coupon-left { background: var(--gradient-primary); }
:root[data-theme="dark"] .admin-data-table { background: var(--bg-card); }
:root[data-theme="dark"] .admin-data-table thead { background: var(--bg-gray); }
:root[data-theme="dark"] .admin-data-table th { color: var(--text-muted); border-bottom-color: var(--border); }
:root[data-theme="dark"] .admin-data-table td { color: var(--text-primary); border-bottom-color: var(--border); }
:root[data-theme="dark"] .admin-data-table tbody tr:hover { background: var(--bg-light); }
:root[data-theme="dark"] .admin-filter-chip { background: var(--bg-card); border-color: var(--border); color: var(--text-secondary); }
:root[data-theme="dark"] .admin-search-input { background: var(--bg-card); border-color: var(--border-dark); color: var(--text-primary); }
:root[data-theme="dark"] .admin-stat-mini { background: var(--bg-card); }
:root[data-theme="dark"] .admin-stat-mini-value { color: var(--text-dark); }
:root[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}
:root[data-theme="dark"] .notice-bar { background: #2a2510; border-bottom-color: #3a3515; }
:root[data-theme="dark"] .notice-text { color: var(--text-secondary); }

/* 长辈模式 - 放大字体 */
:root[data-font-size="large"] { font-size: 20px; }
:root[data-font-size="large"] .product-card-title { font-size: 15px; }
:root[data-font-size="large"] .product-card-price-value { font-size: 20px; }
:root[data-font-size="large"] .nav-bar-title { font-size: 19px; }
:root[data-font-size="large"] .tab { font-size: 16px; }
:root[data-font-size="large"] .btn { font-size: 16px; padding: 10px 20px; }
:root[data-font-size="large"] .list-item-title { font-size: 17px; }
:root[data-font-size="large"] .list-item-desc { font-size: 15px; }
:root[data-font-size="large"] .form-input, :root[data-font-size="large"] .form-textarea { font-size: 16px; }
:root[data-font-size="large"] .toast { font-size: 16px; }
:root[data-font-size="large"] .tab-item span { font-size: 12px; }
:root[data-font-size="large"] .tab-item svg { width: 26px; height: 26px; }

/* 安全区域 */
.safe-top { padding-top: max(0px, env(safe-area-inset-top)); }
.safe-bottom { padding-bottom: max(0px, env(safe-area-inset-bottom)); }

/* 图片懒加载淡入 */
img.lazy { opacity: 0; transition: opacity 0.3s; }
img.lazy.loaded { opacity: 1; }

/* 防止图片溢出 */
img { max-width: 100%; height: auto; }

/* 玻璃态效果 */
.glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
:root[data-theme="dark"] .glass {
    background: rgba(30,30,30,0.7);
}

/* 渐变文字 */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 改进的空状态 */
.empty-state { padding: 80px 24px; }
.empty-state-icon {
    width: 80px; height: 80px; margin: 0 auto 20px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--bg-gray); font-size: 36px; opacity: 0.5;
}
.empty-state-text { font-size: 15px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state-btn {
    display: inline-block; padding: 8px 24px; background: var(--gradient-primary);
    color: #fff; border-radius: 20px; font-size: 14px; text-decoration: none;
}

/* 下拉刷新提示 */
.pull-refresh {
    position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
    width: 32px; height: 32px; background: var(--bg-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); transition: transform 0.3s; z-index: 50;
}
.pull-refresh svg { width: 18px; height: 18px; color: var(--primary); }

/* 返回顶部按钮 */
.back-to-top {
    position: fixed; bottom: 70px; right: 16px; width: 40px; height: 40px;
    background: var(--bg-white); border-radius: 50%; box-shadow: var(--shadow);
    display: none; align-items: center; justify-content: center; z-index: 90;
    cursor: pointer; transition: var(--transition);
}
.back-to-top.show { display: flex; animation: bounceIn 0.3s ease; }
.back-to-top svg { width: 20px; height: 20px; color: var(--primary); }

/* 价格闪光动画 */
@keyframes priceFlash {
    0% { color: var(--primary); }
    50% { color: var(--secondary); transform: scale(1.1); }
    100% { color: var(--primary); }
}
.price-flash { animation: priceFlash 0.6s ease; }

/* 购物车弹跳 */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.2) rotate(-10deg); }
    60% { transform: scale(0.9) rotate(5deg); }
}
.cart-bounce { animation: cartBounce 0.5s ease; }

/* 数量角标动画 */
@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.badge-pop { animation: badgePop 0.4s ease; }

/* 底部安全区间距 */
.bottom-safe-space { height: calc(60px + var(--safe-bottom)); }

/* 卡片hover效果（桌面端） */
@media (min-width: 768px) {
    .product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
    .btn:hover { opacity: 0.9; }
}

/* 禁用长按菜单 */
* { -webkit-touch-callout: none; }
img { -webkit-user-drag: none; }

/* 改进的选择高亮 */
::selection { background: rgba(59,91,219,0.2); }
:root[data-theme="dark"] ::selection { background: rgba(59,91,219,0.3); }

/* 数字滚动器 */
.counter { display: inline-block; transition: transform 0.3s; }

/* 进度条组件 */
.progress-bar { height: 6px; background: var(--bg-gray); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--gradient-primary); border-radius: 3px; transition: width 0.5s ease; }

/* 标签胶囊 */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.pill-primary { background: var(--primary-bg); color: var(--primary); }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-warning { background: #fff8e1; color: var(--warning); }
.pill-gray { background: var(--bg-gray); color: var(--text-muted); }

/* 分割线 */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-muted); font-size: 12px; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* 浮动操作按钮 */
.fab {
    position: fixed; width: 48px; height: 48px; border-radius: 50%;
    background: var(--gradient-primary); color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg); z-index: 90; cursor: pointer;
    transition: var(--transition);
}
.fab:active { transform: scale(0.9); }
.fab svg { width: 22px; height: 22px; }

/* 评分星星组件 */
.stars { display: inline-flex; gap: 2px; }
.stars i { font-size: 12px; color: var(--warning); font-style: normal; }
.stars i.empty { color: var(--text-light); }

/* 折扣标签 */
.discount-badge {
    position: absolute; top: 8px; right: 8px;
    background: var(--gradient-hot); color: #fff;
    padding: 4px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 700;
    box-shadow: 0 2px 6px rgba(255,71,87,0.3);
}

/* 加载更多按钮 */
.load-more {
    text-align: center; padding: 16px; color: var(--text-muted);
    font-size: 13px; cursor: pointer;
}
.load-more:active { opacity: 0.6; }

/* 优化触摸目标 */
@media (max-width: 768px) {
    .btn { min-height: 40px; }
    .list-item { min-height: 56px; }
    .tab { min-height: 44px; }
}


/* ============================================================
   蚌小e · stu 潮流主题层 (2026-10-05)
   参考 /stu 学生卡设计语言: 紫色系 #3b5bdb + 点阵纹理底 +
   渐变胶囊按钮 + 大圆角卡片 + 柔和紫色阴影 + 贴纸胶囊标签
   本段追加在文件末尾, 同优先级下自动覆盖上方旧规则
   ============================================================ */

:root {
    --primary: #3b5bdb;
    --primary-dark: #2563eb;
    --primary-light: #4f6ef7;
    --primary-bg: #eef2ff;
    --secondary: #4f6ef7;
    --gradient-primary: linear-gradient(135deg, #4f6ef7 0%, #3b5bdb 100%);
    --gradient-primary-soft: linear-gradient(135deg, #a28ff1 0%, #4f6ef7 100%);
    --gradient-hot: linear-gradient(135deg, #ff8f5e 0%, #f4364e 100%);
    --gradient-gold: linear-gradient(135deg, #ffc46b 0%, #ff9a3d 100%);
    --bg-page: #f0f4ff;
    --bg-gray: #f2f5ff;
    --bg-light: #f8faff;
    --danger: #f4364e;
    --warning: #ff9a3d;
    --border: #e8ecfb;
    --border-dark: #dfe5fa;
    --shadow-sm: 0 1px 4px rgba(59,91,219,.06);
    --shadow: 0 4px 16px rgba(59,91,219,.10);
    --shadow-lg: 0 12px 32px rgba(59,91,219,.16);
    --radius: 10px;
    --radius-sm: 8px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

/* ---- 页面底: stu 点阵纹理 + 淡紫渐变 ---- */
body {
    background:
        radial-gradient(circle, #eef2ff 1.3px, transparent 1.3px) 0 0 / 20px 20px,
        linear-gradient(180deg, #fafcff 0%, #f0f4ff 100%);
}
.mobile-container {
    background: transparent;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(59,91,219,.07);
}

/* ---- 顶栏 ---- */
.nav-bar {
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid #e8ecfb;
}
.nav-bar-primary {
    background: var(--gradient-primary);
}
.nav-bar-title { font-weight: 800; letter-spacing: .5px; }
.nav-bar-back svg { stroke: #3b5bdb; }

/* ---- 底部标签栏 ---- */
.tab-bar {
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid #e8ecfb;
}
.tab-item.active { color: var(--primary); font-weight: 800; }
.tab-item.active .tab-item-icon { transform: translateY(-2px) scale(1.06); filter: drop-shadow(0 4px 8px rgba(59,91,219,.35)); transition: transform .18s cubic-bezier(.34,1.56,.64,1); }
.tab-badge { background: var(--gradient-hot); }

/* ---- 按钮: 渐变胶囊 ---- */
.btn {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .3px;
    transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s ease;
}
.btn:active { transform: scale(.96); }
.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 6px 18px rgba(59,91,219,.32);
    border: none;
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(59,91,219,.42); }
.btn-danger { background: var(--gradient-hot); box-shadow: 0 6px 18px rgba(244,54,78,.30); border: none; }
.btn-success { background: linear-gradient(135deg, #34d98a 0%, #0eb96a 100%); box-shadow: 0 6px 18px rgba(14,185,106,.28); border: none; }
button.primary, .btn-hot { background: var(--gradient-hot); border-radius: 999px; font-weight: 800; box-shadow: 0 8px 22px rgba(244,54,78,.32); }

/* ---- 输入 ---- */
input[type="text"], input[type="tel"], input[type="number"], input[type="password"], input[type="email"], textarea, select {
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3.5px rgba(59,91,219,.12) !important;
    outline: none;
}

/* ---- 卡片 ---- */
.product-card, .product-list-item, .sec-product-card, .group-card {
    border-radius: 14px;
    border: 1px solid #eef2ff;
    box-shadow: 0 4px 14px rgba(59,91,219,.08);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:active, .product-list-item:active { transform: scale(.98); }

/* ---- 价格: stu 红橙系 ---- */
.product-card-price-value, .price, .price-value { color: #f4364e; font-weight: 900; }

/* ---- 标签: 贴纸胶囊 ---- */
.tag { border-radius: 999px; font-weight: 700; padding: 2px 9px; }
.tag-primary { background: var(--primary-bg); color: var(--primary); }

/* ---- 搜索/公告/分类 ---- */
.search-input-wrap input { border-radius: 999px; }
.notice-bar { background: var(--primary-bg); border-radius: 999px; color: var(--primary); }
.category-icon { border-radius: 16px; }

/* ---- 通用区块标题: 900 字重 ---- */
h1, h2, h3 { letter-spacing: .2px; }

/* ============================================================
   管理端 / 商家端 PC (.adm-* / .pc-* / .mc-*) — stu 化
   ============================================================ */
.adm-card, .admin-data-card, .mc-card {
    border-radius: 14px;
    border: 1px solid #e8ecfb;
    box-shadow: 0 4px 16px rgba(59,91,219,.07);
}
.adm-btn, .admin-action-btn { border-radius: 999px; font-weight: 700; }
.adm-btn-primary, .admin-action-btn-primary, .pc-topbar-btn-primary {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 12px rgba(59,91,219,.26) !important;
    border: none !important;
}
.adm-btn-danger, .admin-action-btn-danger, .pc-topbar-btn-danger {
    background: var(--gradient-hot) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(244,54,78,.24) !important;
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus, .adm-search-input:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3.5px rgba(59,91,219,.12) !important;
}
.adm-tab.active { color: var(--primary) !important; }
.adm-tab.active::after { background: var(--gradient-primary) !important; height: 3px !important; border-radius: 999px !important; }
.adm-pagination a.active { background: var(--gradient-primary) !important; box-shadow: 0 3px 10px rgba(59,91,219,.28) !important; }
.adm-tag { border-radius: 999px; font-weight: 700; }
.adm-stat-card { border-radius: 14px; border: 1px solid #e8ecfb; box-shadow: 0 4px 16px rgba(59,91,219,.07); }
.adm-stat-icon { border-radius: 12px; }
.adm-table thead th { background: #eef2ff; color: #2563eb; font-weight: 800; }
.adm-table tbody tr:hover td { background: #f2f5ff; }

/* ---- Stu 统一页面容器点阵底 ---- */
.cart-page,.checkout-page,.page-wrap,.list-page,.page,.mobile-container{
  background:
    radial-gradient(circle,#eef2ff 1.3px,transparent 1.3px) 0 0 / 20px 20px,
    linear-gradient(180deg,#fafcff 0%,#f0f4ff 100%) !important;
  background-attachment:fixed !important;
}
