/* ============================================
   数据页面样式
   ============================================ */

   .data-page {
    background-color: #fff;
    padding: 30px 0 60px;
}

/* 数据可视化标签页 */
.data-visualization-section {
    margin-bottom: 50px;
}

.data-tabs {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.data-tab {
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: all 0.3s;
    /* font-family: 'GovWF_FZ', "Microsoft YaHei", "SimHei", Arial, sans-serif; */
    margin-bottom: -2px;
}
.data-tab:first-child{
    padding-left: 0;
}

.data-tab:hover {
    color: #115A94;
}

.data-tab.active {
    color: #115A94;
    border-bottom-color: #115A94;
}

/* 图例 */
.chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: #333;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
/* 视图切换按钮 */
.view-toggle-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    gap: 0;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}

.view-toggle-btn:hover {
    color: #115A94;
}

.view-toggle-btn.active {
    color: #115A94;
}

.view-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('/images/pic_title_icos.png');
    background-repeat: no-repeat;
    background-size: 20px auto;
    flex-shrink: 0;
}

.view-icon-list {
    background-position: 0 -2px;
}

.view-toggle-btn:hover .view-icon-list,
.view-toggle-btn.active .view-icon-list {
    background-position: 0 -82px;
}

.view-icon-chart {
    background-position: 0 -161px;
}

.view-toggle-btn:hover .view-icon-chart,
.view-toggle-btn.active .view-icon-chart {
    background-position: 0px -241px;
}

.view-text {
    line-height: 1;
}

/* 数据图表行 */
.data-charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.chart-widget {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    /* border-radius: 8px; */
    padding: 10px 20px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); */
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.nav-arrow {
    width: 24px;
    height: 24px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 24px;
    color: #a8b3c0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    line-height: 1;
}

.nav-arrow:hover {
    color: #54657E;
}

.widget-title {
    font-size: 16px;
    font-weight: normal;
    color: #3D4D65;
    margin: 0;
    /* font-family: 'GovWF_FZ', "Microsoft YaHei", "SimHei", Arial, sans-serif; */
}

.chart-container {
    width: 100%;
    height: 200px;
    margin-bottom: 5px;
    position: relative;
}

/* 仪表盘容器特殊高度 */
#gaugeChart {
    height: 160px;
    margin-bottom: 0;
}

/* 柱状图容器特殊高度 */
#barChart {
    height: 120px;
}

/* 图表进度指示器 */
.chart-progress-indicator {
    width: 40px;
    height: 3px;
    background-color: #ff5252;
    margin: 15px auto 0;
    border-radius: 2px;
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
}

.chart-label {
    text-align: center;
    font-size: 14px;
    color: #54657E;
    margin: 0;
    margin-top: -5px;
}

.chart-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* 顶部统计数据样式（用于柱状图上方） */
.chart-stats-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 10px;
}

.stat-value-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-value {
    font-size: 26px;
    color: #3D4D65;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #54657E;
}

.stat-growth {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    background-color: #4dd4d7;
    padding: 8px;
    border-radius: 6px;
    line-height: 1;
}

/* 增长量列表 */
.growth-list {
    text-align: center;
}
#growthChart {
    height: 160px; 
}
.growth-total {
    font-size: 26px;
    color: #3D4D65;
    /* margin-bottom: 20px; */
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding-left: 2px;
}

.growth-unit {
    font-size: 12px;
    font-weight: normal;
    color: #54657E;
}

.growth-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.growth-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    position: relative;
}

.growth-items .month {
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.growth-items .value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
}

/* 进度条容器 */
.growth-items li::after {
    content: '';
    position: absolute;
    left: 50px;
    right: 60px;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    z-index: 0;
}

/* 进度条 */
.growth-items li::before {
    content: '';
    position: absolute;
    left: 50px;
    height: 8px;
    border-radius: 4px;
    z-index: 1;
}

/* 5月 - 黄色 (1058/1417 ≈ 75%) */
.growth-items li:nth-child(1)::before {
    width: calc(75% - 110px);
    background-color: #FFC107;
}

/* 6月 - 红色 (726/1417 ≈ 51%) */
.growth-items li:nth-child(2)::before {
    width: calc(51% - 110px);
    background-color: #FF5252;
}

/* 7月 - 青色 (1417/1417 = 100%) */
.growth-items li:nth-child(3)::before {
    width: calc(100% - 110px);
    background-color: #00BCD4;
}

/* 区域图表容器 */
.area-chart-container {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    /* border-radius: 8px; */
    padding: 20px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); */
    margin-bottom: 30px;
}

.area-chart-container .chart-container {
    height: 400px;
    margin-bottom: 0;
}

/* 列表数据展示 */
.data-table-container {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 30px;
    height: 440px; /* 与图表容器高度一致 */
    overflow: hidden;
}

.data-table-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto;
}

.data-table {
    width: 100%;
    min-width: 1024px;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f5f5f5;
}

.data-table th {
    padding: 12px 16px;
    text-align: center;
    font-weight: bold;
    color: #333;
    border: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    white-space: nowrap;
}

.data-table td {
    padding: 10px 16px;
    text-align: center;
    border: 1px solid #e0e0e0;
    color: #666;
}

.data-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.data-table tbody tr:hover {
    background-color: #f0f7ff;
}

/* 数据开放 */
.data-open-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 26px;
    color: #333;
    margin-bottom: 14px;
    /* padding-bottom: 6px; */
    border-bottom: 1px solid #e3e3e3;
    /* font-family: 'GovWF_FZ', "Microsoft YaHei", "SimHei", Arial, sans-serif; */
}

.data-open-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap:0 15px;
}

.data-open-item {
    background-color: #fff;
    /* border: 1px solid #e0e0e0; */
    border-radius: 4px;
    padding: 9px 0;
    transition: all 0.3s ease;
}

.data-open-item:hover {
    border-color: #115A94;
}

.data-open-item a {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    display: block;
    transition: color 0.3s;
}

.data-open-item:hover a {
    color: #115A94;
}

/* 统计数据 */
.statistics-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px 0;
    border-bottom: 1px solid #e3e3e3;
}
.section-header .section-title{
    margin-bottom: 0;
    border: none;
}
.statistics-tabs,
.analysis-tabs,
.freight-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}
.data-tabs-title{
    font-size: 26px;
    color: #333;
    line-height: 2.2;
}
.stat-tab,
.analysis-tab,
.freight-tab {
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: all 0.3s;
    /* font-family: 'GovWF_FZ', "Microsoft YaHei", "SimHei", Arial, sans-serif; */
    margin-bottom: -2px;
    white-space: nowrap;
    margin-left: 50px;
}

.stat-tab:hover,
.analysis-tab:hover,
.freight-tab:hover {
    color: #115A94;
}

.stat-tab.active,
.analysis-tab.active,
.freight-tab.active {
    color: #115A94;
    border-bottom-color: #115A94;
    /* font-weight: bold; */
}

/* .statistics-content,
.analysis-content,
.freight-content {
    min-height: 200px;
} */

.statistics-list,
.analysis-list,
.freight-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap:0 15px;
}

.stat-item,
.analysis-item,
.freight-item {
    background-color: #fff;
    /* border: 1px solid #e0e0e0; */
    /* border-radius: 4px; */
    padding: 12px 0;
    transition: all 0.3s ease;
}

.stat-item:hover,
.analysis-item:hover,
.freight-item:hover {
    border-color: #115A94;
}

.stat-item a,
.analysis-item a,
.freight-item a {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    display: block;
    line-height: 1.6;
    transition: color 0.3s;
}

.stat-item:hover a,
.analysis-item:hover a,
.freight-item:hover a {
    color: #115A94;
}

/* 分析公报 */
.analysis-section {
    margin-bottom: 50px;
}

/* 运价指数 */
.freight-index-section {
    margin-bottom: 0;
}

/* 响应式设计 - 平板 */
@media screen and (max-width: 1024px) {
    .data-tab{
        font-size: 20px;
    }
    .data-charts-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .data-open-grid,
    .statistics-list,
    .analysis-list,
    .freight-list {
        grid-template-columns: 1fr;
    }
    .stat-tab,.analysis-tab,.freight-tab{
        margin-left: 20px;
        font-size: 20px;
    }
    .statistics-list, .analysis-list, .freight-list{
        gap: 0;
    }
    .stat-item a, .analysis-item a, .freight-item a{
        font-size: 18px;
    }
    
    .data-table-container {
        height: 340px;
    }
}

/* 响应式设计 - 移动端 */
@media screen and (max-width: 768px) {
    .data-page {
        padding: 20px 0 20px;
    }

    .data-tabs {
        flex-wrap: wrap;
    }

    .data-tab {
        padding: 10px 15px;
        font-size: 14px;
    }

    .chart-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .view-toggle-wrap {
        justify-content: flex-start;
    }

    .chart-container {
        height: 180px;
    }

    .area-chart-container .chart-container {
        height: 300px;
    }
    
    .data-table-container {
        height: 320px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .statistics-tabs,
    .analysis-tabs,
    .freight-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stat-tab,
    .analysis-tab,
    .freight-tab {
        flex-shrink: 0;
        margin-left: 10px;
        font-size: 18px;
    }
    .data-open-section,
    .statistics-section,
    .analysis-section {
        margin-bottom: 20px;
    }
    .section-header{
        gap: 0 0;
        margin-bottom: 15px;
    }
    .data-open-item,.stat-item, .analysis-item, .freight-item{
        padding: 6px 0;
    }
    .data-open-item a{
        font-size: 18px;
    }
}

