/* ============================================================
   分析师交易活跃度分析 - 样式
   配色对齐 sector 板块页面：主强调色 #667eea, 卡片边框 #eef0f2
   买入 #28a745 / 卖出 #fd7e14，高对比色盲友好
   ============================================================ */

/* 主容器 — 与全站保持一致的间距（宽度由内部 Bootstrap .container 控制） */
.activity-container {
    margin: 0 auto;
    padding: 72px 16px 32px;
}

/* 页面标题 — 对齐 sector-header 简洁风格 */
.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #212529;
}
.page-header p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
}

/* 筛选区域 — 对齐 sector 日期/策略按钮风格 */
.filter-section {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.filter-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #6c757d;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-btn {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover {
    background: #f0f2ff;
    border-color: #667eea;
    color: #667eea;
}
.filter-btn.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* 卡片容器 — 对齐 sector card 风格 */
.section-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* 图表时间快捷按钮（与 sector.css 保持一致） */
.chart-time-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.chart-time-tab {
    padding: 4px 14px;
    border-radius: 14px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.chart-time-tab:hover,
.chart-time-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* ============================================================
   行业分布网格
   ============================================================ */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1200px) {
    .industry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .industry-grid {
        grid-template-columns: 1fr;
    }
}

/* 面板 — 对齐 sector 表格头部风格 */
.industry-panel {
    border: 1px solid #eef0f2;
    border-radius: 10px;
    overflow: hidden;
}
.panel-header {
    background: #f8f9fa;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #f0f0f0;
}
.panel-header-highlight {
    background: #f0f2ff !important;
    color: #667eea !important;
}

/* 分布行 */
.dist-row {
    padding: 8px 0;
}
.dist-half {
    padding: 0 12px 8px;
}
.dist-label {
    padding: 6px 0;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 徽章 — 对齐 sector 信号标签风格 */
.badge-buy {
    display: inline-block;
    background: rgba(40,167,69,0.12);
    color: #28a745;
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid rgba(40,167,69,0.28);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-sell {
    display: inline-block;
    background: rgba(253,126,20,0.12);
    color: #fd7e14;
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid rgba(253,126,20,0.28);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* 排名列表 */
.dist-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dist-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}
.dist-item:last-child {
    border-bottom: none;
}

/* 醒目高亮（Top3） — 对齐 sector 卡片风格 */
.dist-highlight {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 5px 6px;
    margin: 2px -6px;
    border-left: 3px solid #667eea;
}
.dist-highlight .dist-name {
    font-weight: 700;
    color: #212529;
}

/* 排名数字 — 对齐 sector 风格 */
.dist-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 6px;
    flex-shrink: 0;
}
.dist-highlight .dist-rank {
    background: #667eea;
    color: #fff;
}

/* 行业名称 — 对齐 sector stock-link 风格 */
.dist-name {
    flex: 1;
    color: #495057;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}
.dist-name:hover {
    color: #667eea;
    text-decoration: underline;
}

/* 数量 */
.dist-count {
    margin-left: auto;
    color: #999;
    font-size: 0.75rem;
    font-weight: 600;
    padding-left: 8px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.2rem;
    }
    .section-card {
        padding: 14px;
    }
    .dist-half {
        padding: 0 6px 6px;
    }
    .dist-item {
        font-size: 0.75rem;
    }
}
