/* 移动端数据统计样式 */

.time-selector {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.time-btn {
    padding: 8px 20px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 核心指标 */
.metrics-section {
    margin-bottom: 24px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.metric-icon.sales {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.metric-icon.orders {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-icon.customers {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-icon.conversion {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.metric-label {
    font-size: 12px;
    color: #6b7280;
}

.metric-change {
    font-size: 11px;
    font-weight: 500;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

/* 图表区域 */
.chart-section {
    margin-bottom: 24px;
}

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

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.btn-text {
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chart-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #6b7280;
}

.info-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.line-chart {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-svg {
    width: 100%;
    height: auto;
    min-width: 320px;
}

/* 分类占比 */
.category-section {
    margin-bottom: 24px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pie-chart {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.pie-svg {
    width: 200px;
    height: 200px;
}

.legend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-label {
    font-size: 14px;
    color: #1a1a1a;
}

.legend-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.legend-amount {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

/* 排名区域 */
.ranking-section {
    margin-bottom: 24px;
}

.ranking-list {
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

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

.ranking-item.top-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.ranking-item.top-2 {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.rank-badge {
    flex-shrink: 0;
}

.store-info {
    flex: 1;
}

.store-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.store-info p {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}

.store-trend {
    flex-shrink: 0;
}

.trend-chart {
    display: block;
}

/* 实时动态 */
.activity-section {
    margin-bottom: 80px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc2626;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: white;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.activity-icon.sale {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.activity-icon.stock {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.activity-icon.replenish {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-text {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.activity-amount {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}

.activity-product {
    font-size: 12px;
    color: #6b7280;
}

.activity-time {
    font-size: 11px;
    color: #9ca3af;
}
