/* 咖啡车管理后台样式 - 基础版 */

:root {
    --primary: #6F4E37;
    --primary-light: #8B6914;
    --primary-dark: #5A3F2D;
    --success: #52c41a;
    --warning: #faad14;
    --error: #f5222d;
    --info: #1890ff;
    --bg: #f5f5f5;
    --sidebar-bg: #1a1a2e;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --border: #e8e8e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

/* ==================== 统一字体规范 ==================== */
/* 确保所有元素继承字体 */
*, *::before, *::after {
    font-family: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}

/* 确保所有表单元素使用微软雅黑 */
input, textarea, select, button {
    font-family: inherit;
    font-size: 14px;
}

/* 标题字体统一 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

/* 正文字体 */
p, span, div, label, td, th {
    font-size: 14px;
    line-height: 1.5;
}

/* 小字字体 */
.small-text, .text-small {
    font-size: 13px;
}

/* 统一所有按钮大小 */
.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-md {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
}

/* 禁用状态统一 */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 按钮图标统一 */
.btn .icon,
.btn i {
    font-size: 16px;
    line-height: 1;
}

.btn-sm .icon,
.btn-sm i {
    font-size: 14px;
}

/* ==================== 统一按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

/* 布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s;
}

.logo {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo i {
    font-size: 32px;
    color: var(--primary-light);
}

.logo span {
    font-size: 18px;
    font-weight: 600;
}

.nav-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(111, 78, 55, 0.3);
    color: #fff;
    border-left-color: var(--primary-light);
}

.nav-item i {
    font-size: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
}

/* 顶部栏 */
.header {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg);
    border-radius: 20px;
}

/* 内容区 */
.content {
    padding: 24px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.stat-icon .icon {
    width: 28px;
    height: 28px;
}

.stat-change .icon-sm {
    width: 12px;
    height: 12px;
}

.bg-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.bg-success { background: linear-gradient(135deg, var(--success) 0%, #73d13d 100%); }
.bg-warning { background: linear-gradient(135deg, var(--warning) 0%, #ffc53d 100%); }
.bg-info { background: linear-gradient(135deg, var(--info) 0%, #69c0ff 100%); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-change {
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--error); }

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 图表区域 */
.charts-row {
    display: grid;
    grid-template-columns: 2fr minmax(320px, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chart-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-card .card-header h3 {
    margin: 0;
    font-size: 16px;
}

.chart-container {
    height: 300px;
    flex: 1;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* 表格 */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: #fafafa;
}

.table tbody tr:hover {
    background: #fafafa;
}

/* 按钮 */
/* ==================== 统一按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.1);
}

/* 输入框组 - 用于输入框+单位组合 */
.input-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .input-addon {
    padding: 10px 12px;
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.col-4 { flex: 0 0 33.333%; }
.col-6 { flex: 0 0 50%; }

/* 营业时间输入框并排显示 */
.business-hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.business-hours-row .form-control {
    flex: 1;
}

.hours-separator {
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

/* 表单行自适应 */
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* 选择框 */
.select, 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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* 小选择框 */
.select-sm {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding: 6px 28px 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
    background-color: #fff;
    cursor: pointer;
}

.select-sm:focus {
    outline: none;
    border-color: var(--primary);
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.tab:hover {
    background: var(--bg);
    color: var(--text);
}

.tab.active {
    background: var(--primary);
    color: #fff;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-right .search-input {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.filter-right input[type="date"].form-control {
    width: 140px;
    flex-shrink: 0;
}

/* ==================== 商品规格样式 ==================== */
.spec-item {
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.spec-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.spec-row .form-control {
    flex: 1;
}

.spec-row .spec-name,
.spec-row .spec-value {
    flex: 2;
}

.spec-row .spec-price {
    flex: 1;
    min-width: 80px;
}

.spec-row .btn-danger {
    flex-shrink: 0;
}

#specsList {
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .spec-row {
        flex-wrap: wrap;
    }
    
    .spec-row .form-control {
        flex: 1 1 45%;
    }
    
    .spec-row .btn-danger {
        width: 100%;
        margin-top: 8px;
    }
}

/* ==================== 会员详情紧凑样式 ==================== */
.member-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #6F4E37 0%, #8B6914 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    color: #fff;
}

.member-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 500;
    flex-shrink: 0;
}

.member-basic-info {
    flex: 1;
}

.member-name-large {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.member-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    opacity: 0.9;
}

.member-level-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    background: rgba(255,255,255,0.2);
}

.member-assets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.asset-card {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}

.asset-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.asset-value.highlight {
    color: #52c41a;
}

.asset-label {
    font-size: 12px;
    color: #999;
}

.member-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 8px;
}

.info-label {
    font-size: 13px;
    color: #666;
}

.info-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.recent-orders-section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    padding-left: 4px;
}

.orders-list {
    max-height: 200px;
    overflow-y: auto;
}

.order-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.order-item-compact:last-child {
    margin-bottom: 0;
}

.order-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-no {
    font-size: 13px;
    color: #666;
    font-family: monospace;
}

/* 统一订单编号样式 */
.order-no-unified {
    font-size: 13px;
    color: #666;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.order-amount {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.order-time {
    font-size: 12px;
    color: #999;
}

.member-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.member-actions .btn {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
}

/* 会员列表简化样式 */
.member-info-simple {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-info-simple .member-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.member-info-simple .member-phone {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 等级图标样式 */
.level-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.level-icon-wrapper:hover {
    transform: scale(1.1);
}

.level-emoji {
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@media (max-width: 768px) {
    .member-assets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .member-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 图片上传样式 ==================== */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.image-preview:hover {
    border-color: var(--primary);
    background: #f5f0eb;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.image-placeholder i {
    font-size: 48px;
    opacity: 0.5;
}

.image-placeholder span {
    font-size: 14px;
}

/* 搜索 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    position: relative;
    flex: 1;
}

.search-input i,
.search-input .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 16px;
    height: 16px;
}

/* 日期选择框样式优化 */
input[type="date"].form-control {
    padding: 10px 14px;
    min-height: 40px;
}

.search-input input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    gap: 8px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 状态标签 */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending { background: #fff7e6; color: #fa8c16; }
.status-paid { background: #e6f7ff; color: #1890ff; }
.status-making { background: #f6ffed; color: #52c41a; }
.status-completed { background: #f6ffed; color: #52c41a; }
.status-cancelled { background: #fff1f0; color: #f5222d; }

/* 会员等级 */
.member-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.level-0 { background: #f5f5f5; color: #666; }
.level-1 { background: #e6f7ff; color: #1890ff; }
.level-2 { background: #fff7e6; color: #fa8c16; }
.level-3 { background: #f9f0ff; color: #722ed1; }

/* 复选框 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* 链接 */
.link {
    color: var(--primary);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* 商品信息 */
.product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: var(--bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.product-name {
    font-weight: 500;
}

.product-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 统计行 */
.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.stat-item {
    flex: 1;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-item .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-item .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 设置页面 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 文字颜色类 */
.text-danger {
    color: var(--error) !important;
}

.text-warning {
    color: var(--warning) !important;
}

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

/* 积分规则网格 */
.points-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 会员等级设置 - 紧凑表格布局 */
.member-levels-card {
    margin-bottom: 24px;
}

.member-levels-table {
    width: 100%;
}

.member-levels-header {
    display: grid;
    grid-template-columns: 60px 1fr 140px 100px;
    gap: 12px;
    padding: 12px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.member-levels-row {
    display: grid;
    grid-template-columns: 60px 1fr 140px 100px;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.2s;
}

.member-levels-row:hover {
    background: #fafafa;
}

.member-levels-row:last-child {
    border-bottom: none;
}

.level-col-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.level-col-name {
    min-width: 0;
}

.level-col-name input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
}

.level-col-spend .input-group,
.level-col-discount .input-group {
    max-width: 120px;
}

.level-col-spend input,
.level-col-discount input {
    padding: 8px 10px;
    font-size: 14px;
    text-align: center;
}

.level-col-spend .input-addon,
.level-col-discount .input-addon {
    padding: 8px 10px;
    font-size: 13px;
}

/* 充值优惠设置 - 紧凑表格布局 */
.recharge-config-card {
    margin-bottom: 24px;
}

.recharge-configs-table {
    width: 100%;
}

.recharge-configs-header {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 120px 80px;
    gap: 12px;
    padding: 12px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.recharge-configs-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 120px 80px;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.2s;
}

.recharge-configs-row:hover {
    background: #fafafa;
}

.recharge-configs-row:last-child {
    border-bottom: none;
}

.recharge-col-enable {
    display: flex;
    align-items: center;
    justify-content: center;
}

.recharge-col-amount input,
.recharge-col-gift input {
    padding: 8px 10px;
    font-size: 14px;
    text-align: center;
}

.recharge-col-amount .input-group,
.recharge-col-gift .input-group {
    max-width: 140px;
}

.recharge-col-total {
    display: flex;
    align-items: center;
}

.recharge-total-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--success) 0%, #73d13d 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.recharge-col-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.recharge-col-action .btn {
    padding: 6px 10px;
    font-size: 14px;
}

/* 今日位置 */
.location-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.location-preview {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    border: 2px dashed var(--border);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.preview-placeholder i {
    font-size: 40px;
    opacity: 0.5;
}

.location-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff7e6;
    border-radius: 8px;
    font-size: 13px;
    color: #fa8c16;
}

/* 平板端适配 */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .points-rules-grid {
        grid-template-columns: 1fr;
    }
    
    /* 会员等级表格平板端 */
    .member-levels-header,
    .member-levels-row {
        grid-template-columns: 50px 1fr 120px 90px;
        gap: 10px;
        padding: 10px 16px;
    }
    
    .level-icon-wrapper {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    /* 充值优惠设置平板端 */
    .recharge-configs-header,
    .recharge-configs-row {
        grid-template-columns: 50px 1fr 1fr 100px 60px;
        gap: 10px;
        padding: 10px 16px;
    }
    
    /* 图表区域平板端适配 */
    .charts-row {
        gap: 16px;
    }
    
    .chart-container {
        height: 260px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 全局防止溢出 */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        -webkit-text-size-adjust: 100%; /* 防止iOS自动调整字体 */
    }
    
    /* 所有容器防止溢出 */
    .admin-container,
    .main-content,
    .content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* 侧边栏遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    .sidebar-overlay.show {
        display: block;
    }
    
    /* 侧边栏隐藏 */
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        position: fixed;
        z-index: 100;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        font-size: 20px;
        cursor: pointer;
    }
    
    /* 统计卡片单列 */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 16px;
    }
    
    /* 图表区域单列 */
    .charts-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .chart-card {
        padding: 16px;
        border-radius: 10px;
        overflow: visible;
    }
    
    .chart-card .card-header {
        padding: 0 0 12px 0;
        margin-bottom: 0;
    }
    
    .chart-card .card-header h3 {
        font-size: 15px;
        margin: 0;
    }
    
    .chart-container {
        height: 220px;
        margin-top: 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .chart-container canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
    
    .select-sm {
        font-size: 13px;
        padding: 5px 24px 5px 10px;
        background-position: right 6px center;
    }
    
    /* 顶部栏 */
    .header {
        padding: 10px 16px;
        min-height: 56px;
    }
    .header h1 {
        font-size: 16px;
        font-weight: 600;
    }
    .header-right {
        display: none;
    }
    
    /* 菜单按钮 */
    .menu-toggle {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: #f5f5f5;
        border: none;
        margin-right: 12px;
    }
    
    /* 侧边栏 */
    .sidebar {
        width: 260px;
        box-shadow: none;
    }
    
    .sidebar.show {
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    
    .sidebar .logo {
        padding: 16px 20px;
        min-height: 60px;
    }
    
    .sidebar .logo span {
        font-size: 16px;
    }
    
    .nav-menu {
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 12px 20px;
        font-size: 15px;
        border-left-width: 3px;
    }
    
    .nav-item i {
        font-size: 20px;
        width: 24px;
        text-align: center;
        margin-right: 12px;
    }
    
    .sidebar-footer {
        padding: 12px 16px;
    }
    
    .logout {
        padding: 10px;
    }
    
    /* 内容区 */
    .content {
        padding: 16px;
    }
    
    /* 卡片 */
    .card {
        margin-bottom: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-radius: 10px;
    }
    .card-header {
        padding: 14px 16px;
        word-wrap: break-word;
    }
    .card-header h3 {
        font-size: 15px;
    }
    .card-body {
        padding: 14px 16px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .card-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }
    .card-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* 表单标签 */
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    /* 复选框优化 */
    .checkbox-label {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    /* 表格横向滚动 */
    .table-responsive {
        margin: 0 -16px;
        padding: 0 16px;
        width: calc(100% + 32px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
        white-space: nowrap;
    }
    
    .table th {
        font-size: 12px;
        font-weight: 600;
    }
    
    /* 表格中的按钮 */
    .table .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    
    /* 按钮触摸优化 - 保持统一风格 */
    .btn {
        padding: 12px 20px;
        min-height: 44px;
        font-size: 14px;
        font-weight: 500;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 小按钮优化 - 保持统一风格 */
    .btn-sm {
        padding: 10px 16px;
        min-height: 36px;
        font-size: 13px;
        font-weight: 500;
    }
    
    /* 按钮组优化 */
    .card-footer .btn + .btn {
        margin-top: 8px;
    }
    
    /* 表单优化 */
    .form-control {
        padding: 12px 14px;
        font-size: 16px;
        max-width: 100%;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .col-4, .col-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
    
    /* 输入框组防止溢出 */
    .input-group {
        width: 100%;
        max-width: 100%;
    }
    
    .input-group .form-control {
        min-width: 0;
    }
    
    /* 营业时间移动端适配 */
    .business-hours-row {
        gap: 8px;
    }
    
    .hours-separator {
        font-size: 13px;
    }
    
    /* 弹窗全屏优化 */
    .modal {
        align-items: flex-end;
        padding: 0;
    }
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 85%;
        max-height: 85%;
        border-radius: 16px 16px 0 0;
        overflow-y: auto;
    }
    .modal-header {
        padding: 16px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
        border-bottom: 1px solid var(--border);
    }
    .modal-body {
        padding: 16px;
        overflow-y: auto;
        flex: 1;
    }
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid var(--border);
    }
    .modal-footer .btn {
        width: 100%;
        min-height: 44px;
    }
    
    /* 弹窗表单优化 */
    .modal .form-group {
        margin-bottom: 16px;
    }
    
    .modal .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
        display: block;
    }
    
    .modal .form-control {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 12px;
    }
    
    /* 弹窗标题 */
    .modal-header h3 {
        font-size: 16px;
    }
    
    /* 统计行单列 */
    .stats-row {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .stat-item {
        width: 100%;
        box-sizing: border-box;
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .stat-item .stat-number {
        font-size: 24px;
    }
    
    .stat-item .stat-label {
        font-size: 14px;
    }
    
    /* 网格布局单列 */
    .settings-grid,
    .points-rules-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    /* 标签页横向滚动 */
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .tab {
        white-space: nowrap;
        padding: 10px 16px;
    }
    
    /* 筛选栏优化 */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        max-width: 100%;
    }
    .filter-tab {
        white-space: nowrap;
    }
    .filter-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .filter-right .search-input,
    .filter-right .form-control {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 搜索栏优化 */
    .search-bar {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-input input {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 统计卡片网格 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .stat-card .stat-label {
        font-size: 12px;
    }
    
    /* 会员等级表格移动端 */
    .member-levels-header {
        display: none;
    }
    
    .member-levels-row {
        grid-template-columns: 44px 1fr 1fr;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .level-col-icon {
        grid-row: span 2;
    }
    
    .level-icon-wrapper {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .level-col-name {
        grid-column: span 2;
    }
    
    .level-col-name input {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .level-col-spend,
    .level-col-discount {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .level-col-spend::before {
        content: '门槛';
        font-size: 11px;
        color: var(--text-secondary);
    }
    
    .level-col-discount::before {
        content: '折扣';
        font-size: 11px;
        color: var(--text-secondary);
    }
    
    .level-col-spend .input-group,
    .level-col-discount .input-group {
        max-width: 100%;
    }
    
    .level-col-spend input,
    .level-col-discount input {
        font-size: 14px;
        padding: 8px;
    }
    
    /* 充值优惠设置移动端 */
    .recharge-configs-header {
        display: none;
    }
    
    .recharge-configs-row {
        grid-template-columns: 1fr 1fr 70px;
        gap: 8px;
        padding: 14px 16px;
        position: relative;
        border-bottom: 1px solid var(--border);
    }
    
    .recharge-col-enable {
        position: absolute;
        top: 14px;
        right: 16px;
    }
    
    .recharge-col-enable input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .recharge-col-amount {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .recharge-col-amount::before {
        content: '充值金额';
        font-size: 12px;
        color: var(--text-secondary);
    }
    
    .recharge-col-gift {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .recharge-col-gift::before {
        content: '赠送';
        font-size: 12px;
        color: var(--text-secondary);
    }
    
    .recharge-col-total {
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        justify-content: flex-end;
    }
    
    .recharge-col-total::before {
        content: '到账';
        font-size: 12px;
        color: var(--text-secondary);
    }
    
    .recharge-col-amount .input-group,
    .recharge-col-gift .input-group {
        max-width: 100%;
    }
    
    .recharge-col-amount input,
    .recharge-col-gift input {
        font-size: 14px;
        padding: 8px;
    }
    
    .recharge-total-badge {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .recharge-col-action {
        display: none; /* 移动端简化，长按或滑动删除 */
    }
}

/* SVG 图标支持 */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

/* 导航栏图标 */
.nav-item .icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: 0.7;
}

.nav-item.active .icon,
.nav-item:hover .icon {
    opacity: 1;
}

/* 按钮内图标 */
.btn .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* 登录页 Logo */
.login-logo .icon {
    width: 48px;
    height: 48px;
}

/* 模态框关闭按钮 */
.btn-close .icon {
    width: 24px;
    height: 24px;
}

/* 统计卡片图标 */
.stat-icon .icon {
    width: 24px;
    height: 24px;
}

/* 表单输入框图标 */
.input-icon .icon {
    width: 20px;
    height: 20px;
}

/* ==================== 权益配置页面样式 ==================== */

/* 等级标签页 */
.level-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
    padding: 0 20px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(111, 78, 55, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #fff;
}

.tab-icon {
    font-size: 20px;
}

.tab-name {
    font-weight: 500;
}

/* 配置区域 */
.level-config {
    padding: 24px;
}

.config-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-section {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 颜色选择器 */
.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.color-value {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 带后缀的输入框 */
.input-with-suffix {
    display: flex;
    align-items: center;
}

.input-with-suffix .form-control {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.input-suffix {
    padding: 10px 14px;
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 开关样式 */
.benefit-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.toggle-item:hover {
    background: rgba(111, 78, 55, 0.05);
}

.toggle-item input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: #d9d9d9;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-item input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-item input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.toggle-icon {
    font-size: 18px;
}

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

/* 配置操作按钮 */
.config-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

.save-status {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.save-status.error {
    color: var(--error);
}

/* 权益预览区域 */
.benefit-preview-content {
    padding: 8px;
}

.preview-header {
    margin-bottom: 20px;
}

.preview-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.preview-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-benefit-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: #f5f5f5;
    border: 1px solid var(--border);
}

.preview-benefit-item.auto {
    background: rgba(111, 78, 55, 0.1);
    border-color: rgba(111, 78, 55, 0.2);
    color: var(--primary);
}

.preview-benefit-item.monthly {
    background: rgba(24, 144, 255, 0.1);
    border-color: rgba(24, 144, 255, 0.2);
    color: #1890ff;
}

.preview-benefit-item.birthday {
    background: rgba(250, 173, 20, 0.1);
    border-color: rgba(250, 173, 20, 0.2);
    color: #faad14;
}

.preview-benefit-item.special {
    background: rgba(114, 46, 209, 0.1);
    border-color: rgba(114, 46, 209, 0.2);
    color: #722ed1;
}

.benefit-icon {
    font-size: 16px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    animation: slideIn 0.3s ease;
}

.toast.show {
    display: block;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 14px;
    color: var(--text);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== 权益统计页面样式 ==================== */

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-secondary);
    padding: 0 4px;
}

.page-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 12px;
}

/* 等级对比样式 */
.level-usage-comparison {
    padding: 8px;
}

.comparison-item {
    margin-bottom: 20px;
}

.progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 商品销量排行 */
.top-products {
    padding: 10px 0;
    width: 100%;
    overflow-x: auto;
    min-width: 0;
}

.top-products .top-product-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
    gap: 12px;
    min-width: 280px;
}

.top-products .top-product-item:last-child {
    border-bottom: none;
}

.top-products .top-product-item > .rank {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f5f5f5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #666 !important;
    flex-shrink: 0 !important;
}

.top-products .top-product-item > .rank.top {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #fff !important;
}

.top-products .top-product-item > .product-info-row {
    flex: 1 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 8px !important;
}

.top-products .top-product-item > .product-info-row > .product-name {
    font-weight: 500 !important;
    color: #333 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.top-products .top-product-item > .product-info-row > .product-sales {
    color: #666 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.top-products .top-product-item > .product-bar {
    width: 100px !important;
    height: 6px !important;
    background: #e8e8e8 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.top-products .top-product-item > .product-bar > .bar-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #6F4E37, #8B6914) !important;
    border-radius: 3px !important;
    transition: width 0.5s ease;
    min-width: 2px !important;
}
