/* 扬州市场研究Dashboard - 自定义样式 */

/* Tab按钮样式 */
.tab-btn {
    padding: 1rem 0;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab-btn:hover {
    color: #2563eb;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* 指标卡片样式 */
.metric-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.metric-card .label {
    color: #6b7280;
    font-size: 0.875rem;
}

.metric-card .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.metric-card .unit {
    font-size: 0.875rem;
    font-weight: normal;
    color: #6b7280;
}

.metric-card .change {
    font-size: 0.875rem;
}

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

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

/* 图表容器 */
.chart-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.chart-container {
    min-height: 300px;
}

/* 地图容器 */
#amap-container {
    width: 100%;
    height: 500px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f7fa 50%, #e8f4f8 100%);
}

/* POI类型筛选按钮 */
.poi-filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.poi-filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.poi-filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Loading状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #9ca3af;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 热门商圈列表 */
.business-area-list {
    max-height: 300px;
    overflow-y: auto;
}

.business-area-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.business-area-item:last-child {
    border-bottom: none;
}

.business-area-item .rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 0.75rem;
}

.business-area-item .rank.top3 {
    background: #fbbf24;
    color: white;
}

.business-area-item .name {
    flex: 1;
    font-weight: 500;
}

.business-area-item .district {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.business-area-item .count {
    color: #3b82f6;
    font-weight: 500;
}

/* 响应式布局 */
@media (max-width: 1280px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    #amap-container {
        height: 350px;
    }
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.data-table tr:hover td {
    background: #f9fafb;
}

/* Tooltip样式补充 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
}

/* 区域信息面板 */
.district-info-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    min-width: 200px;
    z-index: 100;
}

.district-info-panel h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.district-info-panel .info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.district-info-panel .info-row .label {
    color: #6b7280;
}

.district-info-panel .info-row .value {
    font-weight: 500;
    color: #1f2937;
}
