/*============================================================
 *  JY陪玩团 - 全局设计系统 v2.0
 *  设计理念：年轻化 / 电竞感 / 流畅动效
 *============================================================*/

/* ===== CSS 变量体系 ===== */
:root {
    /* 主题色系 */
    --primary: #7c5ce7;
    --primary-light: #a78bfa;
    --primary-dark: #5b3ec4;
    --primary-glow: rgba(124, 92, 231, 0.35);
    --primary-bg: rgba(124, 92, 231, 0.08);

    /* 功能色 */
    --success: #10b981;
    --success-light: #6ee7b7;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-light: #fca5a5;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-light: #fcd34d;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-light: #93c5fd;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* 中性色 */
    --bg: #f0f2f7;
    --bg-card: #ffffff;
    --bg-input: #f8f9fb;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* 圆角 */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 40px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);

    /* 动效 */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* 字体 */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

/* ===== 全局重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: var(--primary); transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--info), var(--primary-light), var(--primary));
    opacity: 0.7;
}
.navbar .nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar .logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}
.navbar .logo:hover { color: #fff; opacity: 0.9; }
.navbar .logo img { height: 38px; border-radius: 10px; }
.navbar .nav-links { display: flex; gap: 2px; align-items: center; }
.navbar .nav-links a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}
.navbar .nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.navbar .nav-links a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
}
.navbar .nav-links .nav-btn {
    background: var(--primary);
    color: #fff;
    padding: 8px 22px;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.navbar .nav-links .nav-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}
.navbar .nav-user {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}
.navbar .nav-user .badge {
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* ===== 容器 ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 20px; }
.page-header { text-align: center; padding: 48px 20px 32px; }
.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.page-header p { color: var(--text-secondary); font-size: 15px; }

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 按钮体系 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
}
.btn:active { transform: scale(0.97); }

/* 涟漪效果 */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.btn:active::after { opacity: 1; }

/* 按钮变体 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}
.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-success:hover { box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35); transform: translateY(-1px); }
.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35); transform: translateY(-1px); }
.btn-warning {
    background: linear-gradient(135deg, var(--warning), var(--warning-light));
    color: #fff;
}
.btn-info {
    background: linear-gradient(135deg, var(--info), var(--info-light));
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: var(--radius); }
.btn-block { display: flex; width: 100%; }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== 表单控件 ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}
.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    transition: all var(--transition);
    outline: none;
    background: var(--bg-input);
    color: var(--text);
}
.form-control:hover { border-color: #d1d5db; }
.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-bg);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* 验证码输入组 */
.input-code-group { display: flex; gap: 10px; }
.input-code-group .form-control { flex: 1; }
.input-code-group .btn { white-space: nowrap; min-width: 120px; }

/* 提示条 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUp 0.3s ease;
}
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-info { background: var(--info-bg); color: #1e40af; border: 1px solid rgba(59, 130, 246, 0.2); }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid rgba(245, 158, 11, 0.2); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 网格系统 ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===== 标签徽章 ===== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.tag-purple { background: rgba(124, 92, 231, 0.12); color: var(--primary); }
.tag-green { background: var(--success-bg); color: #065f46; }
.tag-red { background: var(--danger-bg); color: #991b1b; }
.tag-orange { background: var(--warning-bg); color: #92400e; }
.tag-blue { background: var(--info-bg); color: #1e40af; }
.tag-gray { background: #f3f4f6; color: var(--text-secondary); }

/* ===== 商品卡片 ===== */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}
.product-card .pc-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    overflow: hidden;
    position: relative;
}
.product-card .pc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.product-card:hover .pc-image img { transform: scale(1.08); }
.product-card .pc-body { padding: 16px; }
.product-card .pc-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}
.product-card .pc-game { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.product-card .pc-bottom { display: flex; justify-content: space-between; align-items: center; }
.product-card .pc-price {
    color: var(--danger);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.product-card .pc-price small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== 店员卡片 ===== */
.staff-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
    padding: 28px 20px 20px;
    border: 1px solid var(--border);
}
.staff-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}
.staff-card .sc-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(124, 92, 231, 0.3);
    transition: transform var(--transition);
}
.staff-card:hover .sc-avatar { transform: scale(1.05); }
.staff-card .sc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.staff-card .sc-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.staff-card .sc-tags { margin-bottom: 6px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.staff-card .sc-games { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.staff-card .sc-price { color: var(--danger); font-size: 18px; font-weight: 800; }
.staff-card .sc-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== 认证页（登录/注册） ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #1a1a2e 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(124,92,231,.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(59,130,246,.06) 0%, transparent 50%);
    animation: auth-bg 20s ease-in-out infinite;
}
@keyframes auth-bg {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-20px, 10px); }
    66% { transform: translate(20px, -10px); }
}
.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 440px;
    max-width: 100%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
    animation: auth-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes auth-in {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-box .auth-logo {
    text-align: center;
    margin-bottom: 28px;
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-box .auth-tabs { display: flex; margin-bottom: 28px; border-bottom: 2px solid var(--border); }
.auth-box .auth-tabs a {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.auth-box .auth-tabs a:hover { color: var(--text); }
.auth-box .auth-tabs a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ===== 模态框 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 520px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal h2 { margin-bottom: 20px; font-size: 20px; font-weight: 700; }
.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition);
    line-height: 1;
}
.modal-close:hover { color: var(--danger); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== 订单状态徽章 ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: rgba(124, 92, 231, 0.15); color: var(--primary); }
.status-accepted { background: rgba(59, 130, 246, 0.15); color: #1d4ed8; }
.status-finished { background: rgba(16, 185, 129, 0.15); color: #065f46; }
.status-settled { background: #f3f4f6; color: var(--text-secondary); }

/* ===== 面包屑 ===== */
.breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb span { margin: 0 6px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 32px 0; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* ===== 搜索栏 ===== */
.search-bar { display: flex; gap: 10px; margin-bottom: 24px; align-items: center; }
.search-bar .form-control { max-width: 360px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: left; font-size: 14px; }
table th {
    background: #f8f9fb;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
table td { border-bottom: 1px solid var(--border); }
table tbody tr { transition: background var(--transition-fast); }
table tbody tr:hover { background: #f8f9fb; }
table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== 统计卡片 ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}
.stat-card.purple::before { background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.blue::before { background: var(--info); }
.stat-card.orange::before { background: var(--warning); }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; color: var(--text); }
.stat-card .stat-icon { font-size: 36px; position: absolute; right: 16px; bottom: 12px; opacity: 0.08; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.6; }
.empty-state p { font-size: 15px; line-height: 1.8; }

/* ===== 聊天室 ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fafbfc;
}
.chat-message { display: flex; gap: 10px; align-items: flex-start; animation: msgIn 0.25s ease; }
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-message.self { flex-direction: row-reverse; }
.chat-message .cm-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}
.chat-message .cm-content {
    background: #fff;
    padding: 10px 16px;
    border-radius: 16px;
    max-width: 65%;
    box-shadow: var(--shadow-sm);
}
.chat-message.self .cm-content {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}
.chat-message .cm-name { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 2px; }
.chat-message.self .cm-name { color: rgba(255, 255, 255, 0.8); }
.chat-message .cm-text { font-size: 14px; word-break: break-word; line-height: 1.5; }
.chat-message .cm-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-input-area {
    display: flex;
    padding: 16px;
    border-top: 1px solid var(--border);
    gap: 10px;
    background: #fff;
}
.chat-input-area input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 28px;
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
    background: var(--bg-input);
}
.chat-input-area input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-bg); }
.chat-input-area .btn { border-radius: 28px; padding: 12px 24px; }

/* ===== Toast 通知系统 ===== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--primary); color: #fff; }
.toast.warning { background: var(--warning); color: #fff; }
.toast.out { animation: toastOut 0.25s ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-24px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-16px); }
}

/* ===== 页面加载动画 ===== */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-card);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 页面可见动画 ===== */
.fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 卡片入场交错动画 */
.stagger-item { opacity: 0; animation: staggerIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
@keyframes staggerIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 页脚 ===== */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}
.site-footer p { line-height: 1.8; }

/* ===== 滚动显示淡入 ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Hero 区域 ===== */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    padding: 80px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(124,92,231,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59,130,246,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-section h1 {
    font-size: 42px; font-weight: 800; margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 30%, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-section p { font-size: 17px; color: rgba(255,255,255,0.75); margin-bottom: 32px; line-height: 1.8; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats .hs-item { text-align: center; }
.hero-stats .hs-num { font-size: 28px; font-weight: 800; color: var(--primary-light); }
.hero-stats .hs-label { font-size: 13px; color: rgba(255,255,255,0.6); }

/* ===== 分类导航 ===== */
.category-nav {
    display: flex; gap: 14px; padding: 24px 0; flex-wrap: wrap; justify-content: center;
}
.category-nav .cat-item {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 18px 28px;
    display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow);
    border: 1px solid var(--border); transition: all var(--transition);
    text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px;
}
.category-nav .cat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.category-nav .cat-item .cat-icon { font-size: 24px; }

/* ===== 流程步骤 ===== */
.steps-section { padding: 48px 20px; text-align: center; }
.steps-section h2 { font-size: 24px; font-weight: 800; margin-bottom: 32px; }
.steps-grid { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.step-card {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px 20px;
    box-shadow: var(--shadow); border: 1px solid var(--border); width: 200px;
    transition: all var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-card .step-num {
    width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; margin: 0 auto 14px;
}
.step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ===== CTA 区域 ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #5b3ec4 100%);
    border-radius: var(--radius-lg); padding: 40px; text-align: center;
    color: #fff; margin: 20px 0;
}
.cta-section h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.cta-section p { font-size: 15px; opacity: 0.85; margin-bottom: 20px; }
.cta-section .btn-cta {
    background: #fff; color: var(--primary); padding: 12px 32px;
    border-radius: var(--radius-full); font-weight: 700; font-size: 15px;
    border: none; cursor: pointer; transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.cta-section .btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* ===== 占位卡片 ===== */
.placeholder-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.placeholder-card {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px;
    border: 2px dashed var(--border); text-align: center; color: var(--text-muted);
    transition: all var(--transition);
}
.placeholder-card:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.placeholder-card .ph-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.5; }
.placeholder-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.placeholder-card p { font-size: 13px; }

/* ===== 待办卡片 ===== */
.todo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.todo-card {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px;
    border: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
    transition: all var(--transition);
}
.todo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.todo-card .tc-icon { font-size: 30px; }
.todo-card .tc-info { flex: 1; }
.todo-card .tc-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.todo-card .tc-info p { font-size: 12px; color: var(--text-muted); }
.todo-card .tc-badge {
    background: var(--danger); color: #fff; font-size: 13px; font-weight: 700;
    padding: 4px 12px; border-radius: var(--radius-full);
}
.todo-card .tc-badge.success { background: var(--success); }

/* ===== 快捷入口 ===== */
.quick-actions {
    display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.quick-actions a {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 20px; font-size: 14px; font-weight: 600; color: var(--text);
    text-decoration: none; transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.quick-actions a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 后台布局 ===== */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
}
.admin-sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}
.admin-sidebar h2 {
    color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
}
.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    margin: 1px 0;
}
.admin-sidebar a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.admin-sidebar a.active {
    background: rgba(124, 92, 231, 0.2);
    color: #fff;
    border-left-color: var(--primary-light);
    font-weight: 600;
}
.admin-sidebar .badge {
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
}
.admin-content { padding: 28px; background: var(--bg); overflow-x: hidden; }

/* ===== 充值页面 ===== */
.recharge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.recharge-item {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}
.recharge-item:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.recharge-item.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 4px var(--primary-bg);
}
.recharge-item .ri-amount { font-size: 24px; font-weight: 800; color: var(--text); }
.recharge-item .ri-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.recharge-item.selected .ri-amount { color: var(--primary); }

/* ===== 店员详情 ===== */
.staff-detail-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.staff-detail-header .sd-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(124, 92, 231, 0.3);
}
.staff-detail-header .sd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.staff-detail-header .sd-info h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.staff-detail-header .sd-price { font-size: 28px; font-weight: 800; color: var(--danger); }

/* ===== 个人中心 ===== */
.mine-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.mine-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: sticky;
    top: 88px;
}
.mine-sidebar .ms-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    font-weight: 700;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(124, 92, 231, 0.3);
}
.mine-sidebar .ms-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-sidebar .ms-name { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.mine-sidebar .ms-role { text-align: center; font-size: 13px; margin-bottom: 16px; }
.mine-sidebar .ms-balance {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    color: #fff;
    margin: 12px 0 16px;
}
.mine-sidebar .ms-balance .amount { font-size: 28px; font-weight: 800; }
.mine-menu { margin-top: 8px; }
.mine-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
}
.mine-menu a:hover, .mine-menu a.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

/* ===== 公告走马灯 ===== */
.notice-marquee {
    padding: 10px 20px;
    background: linear-gradient(135deg, #fefce8, #fff);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    font-size: 14px;
}
.notice-marquee .marquee-content {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}
.notice-marquee .marquee-content span {
    display: inline-block;
    animation: marquee 25s linear infinite;
    padding-left: 100%;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}
.notice-marquee:hover .marquee-content span { animation-play-state: paused; }

/* ===== 轮播图 ===== */
.banner-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 16px 0;
}
.banner-slide {
    display: none;
    position: relative;
}
.banner-slide.active { display: block; }
.banner-slide img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    transition: transform 6s ease;
}
.banner-wrapper:hover .banner-slide.active img { transform: scale(1.03); }
.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}
.banner-dot.active { background: #fff; width: 28px; border-radius: 5px; }
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}
.banner-wrapper:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.banner-arrow.prev { left: 16px; }
.banner-arrow.next { right: 16px; }

/* ===== 后台管理专用 ===== */

/* 页头统计条 */
.page-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.page-stats .ps-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition);
}
.page-stats .ps-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.page-stats .ps-card .ps-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.page-stats .ps-card .ps-icon.purple { background: rgba(124,92,231,.12); color: var(--primary); }
.page-stats .ps-card .ps-icon.green { background: var(--success-bg); color: var(--success); }
.page-stats .ps-card .ps-icon.blue { background: var(--info-bg); color: var(--info); }
.page-stats .ps-card .ps-icon.orange { background: var(--warning-bg); color: var(--warning); }
.page-stats .ps-card .ps-icon.red { background: var(--danger-bg); color: var(--danger); }
.page-stats .ps-card .ps-info { flex: 1; min-width: 0; }
.page-stats .ps-card .ps-num { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; }
.page-stats .ps-card .ps-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 卡片头部操作栏 */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}
.card-header-row .card-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; flex-shrink: 0; }
.card-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 后台搜索框（紧凑型） */
.admin-search {
    display: flex;
    gap: 8px;
}
.admin-search .form-control {
    width: 240px;
    padding: 8px 14px;
    font-size: 13px;
}

/* 图片上传预览区 */
.upload-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}
.upload-preview .up-current {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-input);
}
.upload-preview .up-current img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-preview .up-current.empty {
    color: var(--text-muted);
    font-size: 12px;
}
.upload-preview .up-info { font-size: 12px; color: var(--text-muted); }

/* 页面统计三列布局 */
.stat-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }

/* 水平统计条 */
.stat-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.stat-bar-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.stat-bar-item .sbi-label { color: var(--text-muted); }
.stat-bar-item .sbi-value { font-weight: 700; color: var(--text); }

/* 卡片内联分组 */
.card-group { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card-group .card { margin-bottom: 0; }

/* 审批状态标签增强 */
.audit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}
.audit-badge.approved { background: var(--success-bg); color: #065f46; }
.audit-badge.pending { background: var(--warning-bg); color: #92400e; animation: pulse-badge 2s infinite; }
.audit-badge.rejected { background: var(--danger-bg); color: #991b1b; }

/* 提现标签 */
.withdraw-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}
.withdraw-tag.approved { background: var(--success-bg); color: #065f46; }
.withdraw-tag.pending { background: #fef3c7; color: #92400e; }

/* 店员在线状态指示器 */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.online-dot.on { background: var(--success); box-shadow: 0 0 6px var(--success); }
.online-dot.off { background: var(--text-muted); }

/* 反馈回复预览 */
.reply-preview {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    color: #065f46;
    max-width: 300px;
    line-height: 1.5;
}

/* 卡密代码块 */
code.card-code {
    display: inline-block;
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--primary-dark);
}

/* 批量操作栏 */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fb;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 产品类型徽章 */
.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.type-badge.service { background: rgba(124,92,231,.1); color: var(--primary); }
.type-badge.vip { background: rgba(245,158,11,.1); color: #92400e; }
.type-badge.item { background: rgba(59,130,246,.1); color: #1d4ed8; }

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .page-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .card-group { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 200px 1fr; }
    .recharge-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .recharge-grid { grid-template-columns: repeat(2, 1fr); }
    .page-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-cols-3, .stat-cols-2 { grid-template-columns: 1fr; }
    .stat-bar { gap: 16px; }
    .admin-search .form-control { width: 100%; }
    .auth-box { padding: 28px 24px; }
    .navbar .nav-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 8px; }
    .navbar .nav-links { gap: 1px; flex-wrap: wrap; justify-content: center; }
    .navbar .nav-links a { padding: 6px 10px; font-size: 12px; }
    .navbar .nav-user { flex-wrap: wrap; justify-content: center; font-size: 12px; gap: 8px; }
    /* 后台布局由 v2.0 统一处理，此处移除旧覆盖 */
    .mine-layout { grid-template-columns: 1fr; }
    .mine-sidebar { position: static; }
    .staff-detail-header { flex-direction: column; align-items: center; text-align: center; }
    .banner-slide img { height: 200px; }
    .page-header h1 { font-size: 26px; }
}
@media (max-width: 480px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr; }
    .page-stats { grid-template-columns: 1fr; }
    .stat-cols-3 { grid-template-columns: 1fr; }
    .recharge-grid { grid-template-columns: 1fr 1fr; }
    .input-code-group { flex-direction: column; }
    .chat-input-area { flex-direction: column; }
    .chat-input-area input { border-radius: var(--radius); }
    .chat-input-area .btn { border-radius: var(--radius); }
}

/*============================================================
 *  前台统一组件样式 v3.0
 *============================================================*/

/* ===== 导航栏补充：移动端汉堡菜单 + 用户胶囊样式 ===== */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.25); }

/* 用户信息胶囊（登录后显示） */
.navbar .nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    font-size: 13px;
}
.navbar .nav-user .nu-name {
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.navbar .nav-user .nu-balance {
    color: #ffe066;
    font-weight: 600;
    font-size: 13px;
}
.navbar .nav-user .nu-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.navbar .nav-user .nu-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.navbar .nav-user .nu-recharge {
    background: rgba(255, 224, 102, 0.2);
    color: #ffe066;
}
.navbar .nav-user .nu-recharge:hover { background: rgba(255, 224, 102, 0.35); }
.navbar .nav-user .nu-logout { color: rgba(255, 255, 255, 0.6); }

/* 移动端：≤900px 切换为汉堡菜单 */
@media (max-width: 900px) {
    .navbar .nav-inner { position: relative; }
    .nav-toggle { display: block; }
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #5b3ec4, #7c5ce7);
        padding: 12px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
        z-index: 999;
    }
    .navbar .nav-links.open { display: flex; }
    .navbar .nav-links > a,
    .navbar .nav-links .nav-btn {
        padding: 10px 14px;
        border-radius: 8px;
        text-align: center;
    }
    .navbar .nav-user {
        width: 100%;
        justify-content: center;
        margin-top: 6px;
    }
}

/* ===== 页脚加强 ===== */
.site-footer { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #b8b8d1; padding: 50px 0 0; margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.footer-col p { margin: 4px 0; font-size: 13px; line-height: 1.7; opacity: .85; }
.footer-col a { display: block; color: rgba(255,255,255,.7); text-decoration: none; font-size: 13px; padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; font-size: 12px; opacity: .6; }
.footer-bottom p { margin: 0; }
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ===== 页面头部 ===== */
.page-header {
    text-align: center;
    padding: 40px 20px 30px;
    position: relative;
}
.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}
.page-header p { color: var(--text-secondary); font-size: 15px; margin: 0; }

/* ===== 面包屑 ===== */
.breadcrumb {
    padding: 14px 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* ===== 搜索区 ===== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.search-bar form { display: flex; gap: 10px; width: 100%; max-width: 500px; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 180px; }
.search-bar select { width: 160px; }

/* ===== 分类筛选 ===== */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    justify-content: center;
}
.filter-tabs a {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--border);
    transition: all .2s;
}
.filter-tabs a:hover { border-color: var(--primary); color: var(--primary); }
.filter-tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 商品卡加强 ===== */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all .3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pc-image {
    height: 140px;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    display: flex; align-items: center; justify-content: center;
    font-size: 56px; color: #fff; overflow: hidden;
    position: relative;
}
.pc-image img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pc-name { font-weight: 600; font-size: 14px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pc-game { display: flex; gap: 4px; flex-wrap: wrap; }
.pc-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.pc-price { color: #ff6b6b; font-weight: 700; font-size: 18px; }
.pc-price small { color: var(--text-muted); font-size: 12px; font-weight: 400; margin-left: 2px; }

/* ===== 店员卡加强 ===== */
.staff-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all .3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.staff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.staff-card .sc-online { position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,.2); }
.staff-card .sc-online.off { background: #95a5a6; box-shadow: 0 0 0 3px rgba(149,165,166,.2); }
.sc-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px; font-weight: 600;
    margin: 0 auto;
    overflow: hidden;
}
.sc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sc-name { font-weight: 600; font-size: 15px; color: var(--text); }
.sc-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; min-height: 22px; }
.sc-games { font-size: 12px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sc-price { color: #ff6b6b; font-weight: 700; font-size: 16px; }
.sc-stats { display: flex; gap: 12px; justify-content: center; font-size: 12px; color: var(--text-secondary); padding-top: 8px; border-top: 1px dashed var(--border); }

/* ===== 状态徽章 ===== */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-paid { background: var(--info-bg); color: var(--info); }
.status-accepted { background: var(--primary-bg); color: var(--primary); }
.status-finished { background: var(--success-bg); color: var(--success); }
.status-settled { background: rgba(108,117,125,.1); color: #6c757d; }

/* ===== 通用空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 64px; margin-bottom: 12px; opacity: .6; }
.empty-state p { margin: 6px 0; font-size: 14px; }

/* ===== 充值选项加强 ===== */
.recharge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.recharge-item {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all .25s;
    background: var(--bg-card);
    position: relative;
}
.recharge-item:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.recharge-item.active { border-color: var(--primary); background: var(--primary-bg); }
.recharge-item .re-tag {
    position: absolute; top: -8px; right: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px;
}
.recharge-item .amount { font-size: 24px; font-weight: 700; color: var(--primary); }
.recharge-item .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== 按钮扩展 ===== */
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-block { display: block; width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(124,92,231,.35); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 卡片扩展 ===== */
.card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ''; width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }

/* ===== 网格 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ===== 表单加强 ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-control { display: block; width: 100%; padding: 10px 14px; font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); transition: all .2s; }
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-bg); }
.input-code-group { display: flex; gap: 8px; }
.input-code-group input { flex: 1; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
table th { background: var(--bg); color: var(--text-secondary); font-weight: 600; font-size: 13px; }
table tbody tr:hover { background: rgba(124,92,231,.03); }
table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.tag-purple { background: var(--primary-bg); color: var(--primary); }
.tag-green { background: var(--success-bg); color: var(--success); }
.tag-red { background: var(--danger-bg); color: var(--danger); }
.tag-orange { background: var(--warning-bg); color: var(--warning); }

/* ===== Alert 提示 ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border-left: 4px solid; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: var(--info); }

/* ===== 通用动画 ===== */
.fade-in { animation: fadeIn .4s ease-out; }
.fade-in-up { animation: fadeInUp .5s ease-out; }
.stagger-item { animation: fadeInUp .4s ease-out backwards; }
.stagger-item:nth-child(1) { animation-delay: .05s; }
.stagger-item:nth-child(2) { animation-delay: .1s; }
.stagger-item:nth-child(3) { animation-delay: .15s; }
.stagger-item:nth-child(4) { animation-delay: .2s; }
.stagger-item:nth-child(5) { animation-delay: .25s; }
.stagger-item:nth-child(6) { animation-delay: .3s; }
.stagger-item:nth-child(7) { animation-delay: .35s; }
.stagger-item:nth-child(8) { animation-delay: .4s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 分页 ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a { padding: 8px 14px; border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); text-decoration: none; border: 1px solid var(--border); font-size: 14px; transition: all .2s; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 数据统计卡片 ===== */
.page-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 24px; }
.stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-card .stat-label { font-size: 12px; color: var(--text-secondary); }
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--text); margin-top: 2px; }
.stat-card.purple .stat-icon { background: var(--primary-bg); color: var(--primary); }
.stat-card.orange .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-card.green .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card.blue .stat-icon { background: var(--info-bg); color: var(--info); }
.stat-card.red .stat-icon { background: var(--danger-bg); color: var(--danger); }

/* ===== Toast ===== */
.toast { position: fixed; top: 80px; right: 20px; background: var(--text); color: #fff; padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 9999; animation: toastIn .3s; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/*============================================================
 *  终极覆盖补丁 v3.1
 *  目的：覆盖之前重复定义导致的样式失效问题
 *============================================================*/

/* 导航栏强制深色渐变 */
.navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%) !important;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    min-height: 64px;
}
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c5ce7, #a78bfa, #3b82f6, #a78bfa, #7c5ce7);
    opacity: 0.7;
}
.navbar .nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
}
.navbar .logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar .logo img { height: 38px; border-radius: 10px; }
.navbar .nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}
.navbar .nav-links > a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s;
}
.navbar .nav-links > a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.navbar .nav-links > a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
}

/* 后台统计卡片 - 强制生效 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.25s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.stat-card .stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}
.stat-card .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}
.stat-card.purple .stat-icon { background: rgba(124, 92, 231, 0.1); color: #7c5ce7; }
.stat-card.green .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-card.blue .stat-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-card.orange .stat-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-card.red .stat-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* 后台卡片 - 强制白色背景 */
.card {
    background: #fff !important;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #7c5ce7;
    border-radius: 2px;
}

/* 按钮统一样式 - 强制 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, #7c5ce7, #5b3ec4);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 92, 231, 0.35);
    color: #fff;
}
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
.btn-outline {
    background: transparent;
    color: #7c5ce7;
    border: 1px solid #7c5ce7;
}
.btn-outline:hover {
    background: #7c5ce7;
    color: #fff;
}
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

/* 表格 - 强制 */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}
table th {
    background: #f8f9fb;
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
}
table tbody tr:hover { background: rgba(124, 92, 231, 0.03); }

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.status-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-paid { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-accepted { background: rgba(124, 92, 231, 0.1); color: #7c5ce7; }
.status-finished { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-settled { background: rgba(108, 117, 125, 0.1); color: #6c757d; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
}
.tag-purple { background: rgba(124, 92, 231, 0.1); color: #7c5ce7; }
.tag-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.tag-red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.tag-orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #1f2937;
}
.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8f9fb;
    transition: all 0.2s;
    font-family: inherit;
    color: #1f2937;
}
.form-control:focus {
    outline: none;
    border-color: #7c5ce7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 92, 231, 0.08);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}
.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 12px;
    opacity: 0.6;
}

/* 快捷入口 */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.quick-actions a {
    padding: 10px 18px;
    background: #fff;
    border-radius: 999px;
    color: #1f2937;
    text-decoration: none;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}
.quick-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    color: #7c5ce7;
}

/* 待办卡片 */
.todo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.todo-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}
.todo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.todo-card .tc-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(124, 92, 231, 0.1);
    color: #7c5ce7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.todo-card .tc-info { flex: 1; min-width: 0; }
.todo-card .tc-info h4 { margin: 0 0 2px; font-size: 14px; }
.todo-card .tc-info p { margin: 0; font-size: 12px; color: #6b7280; }
.todo-card .tc-badge {
    background: #ef4444;
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}
.todo-card .tc-badge.success { background: #10b981; }

/* 响应式 */
@media (max-width: 900px) {
    /* 后台侧边栏已由 v2.1 统一处理 */
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .stat-cards { grid-template-columns: 1fr; }
}

/*============================================================
 *  全断点响应式适配 v3.2
 *  4 级断点：PC(>1200) | 平板(≤1200) | 大手机(≤768) | 小手机(≤480)
 *============================================================*/

/* ===== PC 端：≥1201px（默认已适配，无需修改） ===== */

/* ===== 平板横屏 / 小型 PC：≤1200px ===== */
@media (max-width: 1200px) {
    .container, .navbar .nav-inner, .admin-content, .footer-inner {
        max-width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    /* 后台 4 列统计卡变 2x2 */
    .stat-cards { grid-template-columns: repeat(2, 1fr) !important; }
    /* 店员/商品 4 列变 3 列 */
    .grid-4 { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ===== 平板竖屏 / 大屏手机：≤900px ===== */
@media (max-width: 900px) {
    /* 导航栏汉堡菜单已由 v3.1 处理 */
    .navbar .nav-inner { height: 56px; min-height: 56px; }
    .navbar { min-height: 56px; padding: 0 12px; }
    .navbar .logo { font-size: 18px; }
    .navbar .logo img { height: 32px; }

    /* 英雄区（首页/详情/申请）改为上下结构 */
    .hero, .hero-banner, .auth-split, .staff-detail-hero, .panel-hero {
        grid-template-columns: 1fr !important;
        padding: 24px 16px !important;
        gap: 20px !important;
    }
    .hero h1, .hero-banner h1, .auth-split h1 { font-size: 28px !important; }
    .hero-side, .hero-banner-side { width: 100% !important; max-width: none !important; }

    /* 两列布局（详情页/个人中心/客服）变单列 */
    .auth-split, .detail-layout, .panel-grid, .cs-layout, .chat-layout, .recharge-layout, .staff-detail-grid {
        grid-template-columns: 1fr !important;
    }
    .auth-side, .auth-form-wrap, .panel-side, .cs-side, .chat-side, .recharge-side, .staff-detail-side {
        position: static !important;
        max-width: 100% !important;
    }

    /* 后台侧边栏已由 v2.1 统一处理（抽屉式） */

    /* 3 列变 2 列 */
    .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .page-stats { grid-template-columns: repeat(2, 1fr) !important; }
    .todo-cards { grid-template-columns: 1fr !important; }

    /* 订单/商品/店员卡片 */
    .product-card, .staff-card { padding: 14px 10px; }
    .sc-avatar, .sc-avatar img { width: 56px !important; height: 56px !important; }
    .staff-detail-grid { gap: 16px; }

    /* 充值选项 4 列变 2 列 */
    .recharge-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* 表格横向滚动 */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-wrap table { min-width: 600px; }

    /* 聊天布局 */
    .chat-layout {
        grid-template-rows: auto 1fr auto !important;
    }
    .chat-side { display: none; }
    .chat-side.mobile-open {
        display: block;
        position: fixed;
        inset: 56px 0 0;
        background: #fff;
        z-index: 100;
        overflow-y: auto;
    }

    /* 标题/页面头部缩小 */
    .page-header h1 { font-size: 24px !important; }
    .panel-hero h1 { font-size: 22px !important; }

    /* 模态框 90% 宽 */
    .modal, .modal-content, .modal-dialog {
        width: 90% !important;
        max-width: 90% !important;
        margin: 20px auto !important;
    }
}

/* ===== 大屏手机：≤768px ===== */
@media (max-width: 768px) {
    body { font-size: 14px; }
    .container, .admin-content, .footer-inner { padding-left: 12px !important; padding-right: 12px !important; }

    /* 导航栏进一步压缩 */
    .navbar { min-height: 52px; padding: 0 8px; }
    .navbar .nav-inner { height: 52px; min-height: 52px; }
    .navbar .logo { font-size: 16px; }
    .navbar .logo img { height: 28px; }

    /* 页面头部 */
    .page-header { padding: 24px 12px 16px; }
    .page-header h1 { font-size: 22px !important; }
    .page-header p { font-size: 13px; }

    /* 表单紧凑 */
    .form-control { padding: 9px 12px; font-size: 14px; }
    .btn { padding: 8px 14px; font-size: 13px; }
    .btn-lg { padding: 10px 20px; font-size: 15px; }
    .btn-block { width: 100%; }

    /* 表格 */
    .table-wrap table { min-width: 480px; }
    table th, table td { padding: 8px 6px; font-size: 12px; }
    .actions .btn { padding: 4px 8px; font-size: 11px; }

    /* 状态徽章 */
    .status-badge { font-size: 11px; padding: 2px 8px; }

    /* 卡片内边距 */
    .card { padding: 14px; }
    .card-title { font-size: 14px; margin-bottom: 12px; }

    /* 个人中心侧边栏移到顶部 */
    .panel-layout, .cs-layout { grid-template-columns: 1fr !important; }
    .panel-side, .cs-side { margin-bottom: 16px; }
    .panel-side .panel-user { text-align: center; }

    /* 搜索栏/筛选条件变单列 */
    .search-bar form { flex-direction: column; }
    .search-bar input, .search-bar select { width: 100% !important; }
    .filter-tabs { gap: 6px; }
    .filter-tabs a { font-size: 12px; padding: 5px 12px; }

    /* 充值选项 2 列变 2 列保持 */
    .recharge-grid { gap: 10px; }
    .recharge-item { padding: 16px 8px; }
    .recharge-item .amount { font-size: 20px; }
}

/* ===== 小屏手机：≤480px ===== */
@media (max-width: 480px) {
    /* 所有网格变单列 */
    .grid-2, .grid-3, .grid-4,
    .page-stats, .stat-cards, .todo-cards,
    .recharge-grid, .quick-actions, .filter-tabs {
        grid-template-columns: 1fr !important;
    }
    .quick-actions { flex-direction: column; }
    .quick-actions a { text-align: center; }

    /* 隐藏次要信息 */
    .hide-mobile { display: none !important; }

    /* 客服/公告/消息等卡片垂直堆叠 */
    .faq-item .faq-q { padding: 12px 14px; font-size: 13px; }
    .faq-item .faq-a { padding: 0 14px 12px; font-size: 13px; }

    /* 表格/列表 */
    .table-wrap table { min-width: 360px; }
    .empty-state { padding: 40px 16px; }
    .empty-state .empty-icon { font-size: 48px; }

    /* 按钮变全宽 */
    .btn-mobile-full { width: 100%; display: block; }

    /* 英雄区/详情页主标题更小 */
    .hero h1, .hero-banner h1, .auth-split h1 { font-size: 22px !important; }
    .hero p, .hero-banner p { font-size: 13px; }

    /* 个人中心统计数字 */
    .panel-user .pu-stat .num { font-size: 18px; }

    /* 商品/店员卡片 */
    .pc-body, .sc-body { padding: 10px 6px; }
    .pc-name { font-size: 13px; }
    .sc-name { font-size: 14px; }
    .pc-price, .sc-price { font-size: 16px; }

    /* 表单紧凑 */
    .form-group { margin-bottom: 12px; }
    .form-group label { font-size: 12px; }

    /* 模态框 */
    .modal-content { padding: 16px; }
    .modal-title { font-size: 16px; }

    /* 聊天 */
    .chat-msg { max-width: 80%; }
    .chat-msg .msg-text { font-size: 13px; padding: 8px 12px; }

    /* 订单/商品卡 */
    .ord-card, .ord-list { gap: 10px; }
    .ord-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ord-head .ord-no { font-size: 12px; }

    /* 分页 */
    .pagination a { padding: 6px 10px; font-size: 12px; }

    /* 公告/消息条目 */
    .notice-item, .msg-item { padding: 12px; }
    .notice-item h3, .msg-item h4 { font-size: 14px; }
}

/* ===== 通用移动端优化 ===== */
img, video { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; }
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="tel"], input[type="search"], textarea {
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
/* 防止 iOS Safari 输入框自动缩放 */
@supports (-webkit-touch-callout: none) {
    .form-control { font-size: 16px; }
}
/* 横向滚动提示 */
.scroll-hint {
    display: none;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 0;
}
@media (max-width: 768px) {
    .scroll-hint { display: block; }
    .table-wrap + .scroll-hint::before { content: '← 左右滑动查看更多 →'; }
}

/*================================================================
 *  移动端终极修复 v4.0
 *  解决：导航栏压屏 / 遮罩缺失 / 布局溢出 / 断点冲突
 *================================================================*/

/* ===== 1. 导航遮罩层（之前完全缺失！） ===== */
.nav-mask {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    transition: opacity 0.25s ease;
    opacity: 0;
}
.nav-mask.open {
    display: block !important;
    opacity: 1;
}

/*================================================================
 *  后台侧边栏 v2.0 - 全平台自适应（桌面+移动端）
 *================================================================*/

/* --- 移动端顶部栏（固定定位，替代原来的 toggle 按钮） --- */
.admin-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    z-index: 9999;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.admin-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    flex-shrink: 0;
}
.admin-hamburger:hover { background: rgba(167,139,250,0.25); }
.hamburger-line {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}
/* 汉堡 → X 变形 */
.admin-hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.admin-hamburger.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.admin-hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}
.admin-header-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-header-home {
    font-size: 20px;
    text-decoration: none;
    color: #c4b5fd;
    transition: color 0.2s;
    flex-shrink: 0;
}
.admin-header-home:hover { color: #fff; }

/* --- 遮罩层 --- */
.admin-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.admin-overlay.show {
    display: block !important;
    opacity: 1;
}

/* ===== 后台移动端适配（仅 ≤900px 生效，PC端不受影响） ===== */
@media (max-width: 900px) {

    /* 1. 显示移动端顶部栏 + 隐藏桌面navbar */
    .admin-mobile-header { display: flex !important; }
    .admin-layout nav.navbar { display: none !important; }

    /* 2. 布局变单列 + 留出顶栏高度 */
    .admin-layout {
        grid-template-columns: 1fr !important;
        margin-top: 52px;
        min-height: calc(100vh - 52px);
    }

    /* 3. 侧边栏 → 左滑抽屉 */
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        z-index: 10001 !important;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        padding: 20px 0 !important;
        box-shadow: none !important;
    }
    .admin-sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 6px 0 40px rgba(0,0,0,0.45) !important;
    }
    .admin-sidebar h2 { padding: 18px 20px 12px; margin: 0; }

    /* 4. 菜单链接加大触控区（覆盖 PC 端样式） */
    .admin-sidebar a {
        padding: 13px 20px !important;
        font-size: 14.5px !important;
        margin: 2px 8px !important;
        border-radius: 10px !important;
        border-left: none !important;
    }
    .admin-sidebar a.active {
        background: linear-gradient(90deg, rgba(124,92,231,0.35), transparent) !important;
        border-left: 3px solid #7c5ce7 !important;
    }

    /* 5. 内容区内边距缩小 */
    .admin-content { padding: 16px 14px !important; min-height: auto; }

    /* 6. body锁定 */
    body.sidebar-open { overflow: hidden !important; }
}

/* ===== 小屏手机 ≤480px ===== */
@media (max-width: 480px) {
    .admin-mobile-header { height: 48px; padding: 0 10px; }
    .admin-hamburger { width: 36px; height: 36px; }
    .admin-header-title { font-size: 14.5px; }
    .admin-sidebar { width: 260px !important; }
    .admin-content { padding: 12px 10px !important; }
}

/* ===== 3. 移动端导航栏核心修复（≤900px） ===== */
@media (max-width: 900px) {

    /* --- 导航栏主体 --- */
    .navbar {
        min-height: 54px !important;
        padding: 0 12px !important;
        position: relative;
    }
    .navbar .nav-inner {
        height: 54px !important;
        min-height: 54px !important;
        position: relative !important;
    }
    .navbar .logo {
        font-size: 17px !important;
        flex-shrink: 0;
    }
    .navbar .logo img {
        height: 30px !important;
    }

    /* --- 汉堡按钮：始终显示 --- */
    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 8px;
        order: -1; /* 放到最左边（logo之后） */
        margin-right: auto;
        flex-shrink: 0;
    }

    /* --- 导航链接区：下拉菜单形式 --- */
    .navbar .nav-links {
        display: none !important;
        position: absolute !important;
        top: 100% !important;      /* 紧贴导航栏底部 */
        left: 0 !important;
        right: 0 !important;
        background: #16213e !important;
        padding: 8px 12px 16px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
        z-index: 998 !important;
        max-height: calc(100vh - 54px);  /* 关键：不超出屏幕！ */
        overflow-y: auto;               /* 超长菜单可滚动 */
        -webkit-overflow-scrolling: touch;
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }
    .navbar .nav-links.open {
        display: flex !important;
        animation: navSlideDown 0.25s ease;
    }

    /* 下拉动画 */
    @keyframes navSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 链接项样式 */
    .navbar .nav-links > a,
    .navbar .nav-links > .nav-btn {
        padding: 11px 14px !important;
        border-radius: 10px !important;
        text-align: left !important;
        font-size: 14px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: rgba(255,255,255,0.85) !important;
        background: transparent !important;
        transition: all 0.15s ease !important;
    }
    .navbar .nav-links > a:hover,
    .navbar .nav-links > a.active {
        background: rgba(124,92,231,0.25) !important;
        color: #fff !important;
    }

    /* --- 用户信息胶囊：移动端展开为纵向列表 --- */
    .navbar .nav-user {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        margin-top: 6px !important;
        padding: 10px 12px !important;
        background: rgba(255,255,255,0.06) !important;
        border-radius: 10px !important;
        backdrop-filter: none;
        justify-content: flex-start !important;
    }
    .navbar .nav-user .nu-name {
        max-width: 100%;
        font-size: 15px !important;
        text-align: center;
        font-weight: 700;
    }
    .navbar .nav-user .nu-balance {
        text-align: center;
        font-size: 13px;
        padding: 4px 0;
    }
    .navbar .nav-user .nu-link {
        display: block !important;
        text-align: center !important;
        padding: 9px 12px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
    }
    .navbar .nav-user .nu-recharge {
        background: rgba(255,224,102,0.2) !important;
        color: #ffe066 !important;
    }

    /* --- 登录/注册按钮 --- */
    .navbar .nav-links .nav-btn,
    .navbar .nav-links .nav-btn-primary {
        text-align: center !important;
        justify-content: center;
        padding: 11px 20px !important;
        border-radius: 10px !important;
    }
    .navbar .nav-links .nav-btn-primary {
        background: var(--primary) !important;
    }

    /* --- 未登录状态：按钮横向排列 --- */
    .navbar:not(.logged-in) .nav-links {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
}

/* ===== 4. 大屏手机 ≤768px 进一步优化 ===== */
@media (max-width: 768px) {
    .navbar { min-height: 50px !important; padding: 0 8px !important; }
    .navbar .nav-inner { height: 50px !important; min-height: 50px !important; }
    .navbar .logo { font-size: 15px !important; }
    .navbar .logo img { height: 26px !important; }
    .nav-toggle { width: 34px; height: 34px; font-size: 18px; }
    .navbar .nav-links { top: 100% !important; max-height: calc(100vh - 50px) !important; }
    .navbar .nav-links > a,
    .navbar .nav-links .nav-btn {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    .navbar .nav-user { padding: 8px 10px !important; }
    .navbar .nav-user .nu-name { font-size: 14px !important; }
}

/* ===== 5. 小屏手机 ≤480px ===== */
@media (max-width: 480px) {
    .navbar .logo { font-size: 14px !important; }
    .navbar .logo img { height: 24px !important; }
    .navbar .nav-links > a,
    .navbar .nav-links .nav-btn {
        padding: 9px 10px !important;
        font-size: 13px !important;
    }
    .navbar .nav-user .nu-name { font-size: 13px !important; }
    .navbar .nav-user .nu-balance { font-size: 12px !important; }
}

/* ===== 后台侧边栏移动端抽屉（已移至 v2.0 统一区域） ===== */

/* ===== 7. 全局网格/卡片移动端适配 ===== */

/* 统计卡片 */
@media (max-width: 1200px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr) !important; }
    .page-stats { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    .stat-cards { grid-template-columns: 1fr !important; }
    .page-stats { grid-template-columns: 1fr !important; }
    .stat-card { flex-direction: column; text-align: center; padding: 16px 14px !important; }
    .stat-card .stat-icon { margin-bottom: 8px; }
}

/* 商品/店员卡片 */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}

/* 待办卡片 */
@media (max-width: 768px) {
    .todo-cards { grid-template-columns: 1fr !important; }
    .todo-card { padding: 14px 16px; }
    .todo-card .tc-icon { font-size: 24px; width: 38px; height: 38px; }
}

/* 充值选项 */
@media (max-width: 768px) {
    .recharge-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .recharge-item { padding: 16px 10px !important; }
    .recharge-item .amount { font-size: 20px !important; }
}
@media (max-width: 400px) {
    .recharge-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* 快捷入口 */
@media (max-width: 600px) {
    .quick-actions { flex-direction: column; }
    .quick-actions a { text-align: center; justify-content: center; }
}

/* 分类导航 */
@media (max-width: 768px) {
    .category-nav { gap: 8px; padding: 16px 0; }
    .category-nav .cat-item { padding: 12px 18px; font-size: 13px; }
}
@media (max-width: 480px) {
    .category-nav { flex-direction: column; align-items: stretch; }
    .category-nav .cat-item { justify-content: center; }
}

/* 步骤流程 */
@media (max-width: 768px) {
    .steps-grid { gap: 12px; }
    .step-card { width: 150px; padding: 20px 14px; }
    .step-card .step-num { width: 38px; height: 38px; font-size: 16px; }
}
@media (max-width: 480px) {
    .steps-grid { flex-direction: column; align-items: center; }
    .step-card { width: 100%; max-width: 280px; }
}

/* Hero 英雄区域 */
@media (max-width: 768px) {
    .hero-section { padding: 48px 16px; }
    .hero-section h1 { font-size: 28px !important; }
    .hero-section p { font-size: 14px; }
    .hero-stats { gap: 24px; }
    .hero-stats .hs-num { font-size: 22px; }
}
@media (max-width: 480px) {
    .hero-section { padding: 36px 12px; }
    .hero-section h1 { font-size: 24px !important; }
    .hero-section p { font-size: 13px; }
    .hero-stats { gap: 16px; flex-wrap: wrap; justify-content: center; }
}

/* CTA 区域 */
@media (max-width: 768px) {
    .cta-section { padding: 28px 20px; margin: 16px 0; border-radius: 12px; }
    .cta-section h2 { font-size: 19px; }
}
@media (max-width: 480px) {
    .cta-section { padding: 24px 16px; }
    .cta-section h2 { font-size: 17px; }
    .cta-section p { font-size: 13px; }
}

/* ===== 8. 表格移动端优化 ===== */
@media (max-width: 768px) {
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
        border: 1px solid var(--border);
    }
    table { min-width: 500px; }
    table th, table td {
        padding: 8px 8px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }
    table th { font-size: 11px !important; letter-spacing: 0.03em; }
    .actions { flex-wrap: wrap; gap: 4px; }
    .actions .btn-sm { padding: 4px 8px; font-size: 11px; }
}
@media (max-width: 480px) {
    table { min-width: 420px; }
    table th, table td { padding: 7px 6px !important; font-size: 11px !important; }
}

/* ===== 9. 表单移动端优化 ===== */
@media (max-width: 768px) {
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 12px; margin-bottom: 5px; }
    .form-control { padding: 10px 12px; font-size: 14px; border-radius: 8px; }
    select.form-control { padding-right: 32px; }
    .input-code-group { gap: 8px; }
    .input-code-group .btn { min-width: 90px; font-size: 13px; }
}
@media (max-width: 480px) {
    .input-code-group { flex-direction: column; }
    .input-code-group .btn { width: 100%; min-width: 0; }
}

/* ===== 10. 卡片/模态框移动端优化 ===== */
@media (max-width: 768px) {
    .card { padding: 16px 14px; border-radius: 12px; margin-bottom: 16px; }
    .card-title { font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; }
    .empty-state { padding: 44px 16px; }
    .empty-state .empty-icon { font-size: 48px; }
    .modal { width: 94% !important; padding: 24px 18px; border-radius: 16px; }
    .modal h2 { font-size: 18px; }
    .modal-close { font-size: 24px; }
}
@media (max-width: 480px) {
    .card { padding: 14px 12px; }
    .card-title { font-size: 14px; }
    .empty-state { padding: 36px 12px; }
    .modal { padding: 20px 14px; width: 96% !important; }
    .modal h2 { font-size: 17px; }
}

/* ===== 11. 分页移动端优化 ===== */
@media (max-width: 480px) {
    .pagination { gap: 4px; margin-top: 20px; }
    .pagination a, .pagination span {
        min-width: 34px; height: 34px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 6px;
    }
}

/* ===== 12. 个人中心布局移动端 ===== */
@media (max-width: 768px) {
    .mine-layout { grid-template-columns: 1fr !important; }
    .mine-sidebar { position: static !important; padding: 20px 16px; }
    .mine-sidebar .ms-avatar { width: 72px; height: 72px; font-size: 28px; }
    .mine-sidebar .ms-name { font-size: 16px; }
    .mine-sidebar .ms-balance .amount { font-size: 24px; }
    .mine-menu { display: flex; flex-wrap: wrap; gap: 6px; }
    .mine-menu a { flex: 1; min-width: calc(50% - 3px); text-align: center; padding: 10px 8px; }
}
@media (max-width: 480px) {
    .mine-menu a { min-width: 100%; }
}

/* ===== 13. 店员详情移动端 ===== */
@media (max-width: 768px) {
    .staff-detail-header { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .staff-detail-header .sd-avatar { width: 100px; height: 100px; font-size: 40px; }
    .staff-detail-header .sd-info h1 { font-size: 22px; }
    .staff-detail-header .sd-price { font-size: 24px; }
}

/* ===== 14. 聊天室移动端 ===== */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 50px);
        max-width: 100%;
        border-radius: 0;
    }
    .chat-messages { padding: 14px; gap: 10px; }
    .chat-message .cm-avatar { width: 34px; height: 34px; font-size: 13px; }
    .chat-message .cm-content { padding: 8px 14px; max-width: 75%; border-radius: 12px; }
    .chat-message .cm-text { font-size: 13px; }
    .chat-input-area { padding: 12px; gap: 8px; }
    .chat-input-area input { padding: 10px 16px; font-size: 14px; border-radius: 24px; }
    .chat-input-area .btn { padding: 10px 20px; border-radius: 24px; }
}
@media (max-width: 480px) {
    .chat-message .cm-content { max-width: 80%; }
    .chat-message .cm-text { font-size: 12px; }
    .chat-input-area { padding: 10px; }
    .chat-input-area input { font-size: 16px; } /* iOS zoom fix */
}

/* ===== 15. 认证页（登录/注册）移动端 ===== */
@media (max-width: 480px) {
    .auth-page { padding: 16px; }
    .auth-box { padding: 32px 24px; width: 100%; border-radius: 16px; }
    .auth-box .auth-logo { font-size: 26px; }
    .auth-box .auth-tabs a { padding: 10px 8px; font-size: 14px; }
    .auth-box form .btn-lg { width: 100%; }
}

/* ===== 16. 公告走马灯移动端 ===== */
@media (max-width: 768px) {
    .notice-marquee { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
    .notice-marquee .marquee-icon { font-size: 16px; }
}

/* ===== 17. 轮播图移动端 ===== */
@media (max-width: 768px) {
    .banner-wrapper { border-radius: 12px; margin: 12px 0; }
    .banner-slide img { height: 200px !important; }
    .banner-dots { bottom: 10px; gap: 6px; }
    .banner-dot { width: 8px; height: 8px; }
    .banner-dot.active { width: 22px; }
    .banner-arrow { width: 36px; height: 36px; font-size: 16px; }
    .banner-arrow.prev { left: 8px; }
    .banner-arrow.next { right: 8px; }
}
@media (max-width: 480px) {
    .banner-slide img { height: 160px !important; }
}

/* ===== 18. 页脚移动端 ===== */
@media (max-width: 768px) {
    .site-footer { padding: 36px 0 0; margin-top: 40px; }
    .footer-grid { gap: 24px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr !important; gap: 20px; text-align: center; }
    .footer-col a { display: inline-block; }
}

/* ===== 19. 搜索栏/筛选移动端 ===== */
@media (max-width: 768px) {
    .search-bar { margin-bottom: 16px; }
    .search-bar form { flex-direction: column; gap: 8px; }
    .search-bar input, .search-bar select { width: 100% !important; }
    .admin-search { flex-direction: column; }
    .admin-search .form-control { width: 100% !important; }
    .filter-tabs { gap: 6px; justify-content: flex-start; }
    .filter-tabs a { padding: 5px 12px; font-size: 12px; }
}
@media (max-width: 480px) {
    .filter-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .filter-tabs a { flex-shrink: 0; }
}

/* ===== 20. 批量操作栏移动端 ===== */
@media (max-width: 768px) {
    .batch-bar { flex-direction: column; gap: 8px; padding: 10px 12px; }
    .batch-bar .btn { font-size: 12px; padding: 6px 14px; }
}

/* ===== 21. 图片上传预览移动端 ===== */
@media (max-width: 768px) {
    .upload-preview { flex-direction: column; gap: 10px; }
    .upload-preview .up-current { width: 80px; height: 80px; }
}

/* ===== 22. 卡密代码块移动端 ===== */
@media (max-width: 480px) {
    code.card-code { font-size: 10px; padding: 2px 6px; word-break: break-all; }
}

/* ===== 23. 反馈回复预览移动端 ===== */
@media (max-width: 768px) {
    .reply-preview { max-width: 100%; font-size: 12px; padding: 8px 12px; }
}

/* ===== 24. 安全横屏提示 ===== */
@media (max-width: 480px) and (orientation: landscape) {
    .chat-container { height: 100vh; }
    .auth-page { padding: 12px 24px; }
    .hero-section { padding: 24px 12px; }
}

/* ===== 25. 打印隐藏非必要元素 ===== */
@media print {
    .navbar, .admin-sidebar, .admin-mobile-header, .admin-hamburger,
    .admin-overlay, .nav-toggle, .nav-mask,
    .toast, .pagination { display: none !important; }
    .container, .admin-content { padding: 0; }
    .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}

