/* ============================================
   阳光数据 - 全局样式重置与基础定义
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.5;
    min-width: 320px;
}

/* ============================================
   页面布局
   ============================================ */
.page-wrapper {
    width: 100%;
    background-color: #ffffff;
}

.main-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================
   大标题区域
   ============================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 24px;
}

.header-title {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #333333;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

.header-decoration {
    display: flex;
    align-items: center;
    width: 309px;
    height: 11px;
    position: relative;
}

.deco-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(270deg, #1f6de8 0%, rgba(31, 109, 232, 0) 100%);
}

.header-decoration.right .deco-line {
    background: linear-gradient(90deg, #1f6de8 0%, rgba(31, 109, 232, 0) 100%);
}

.deco-arrow {
    width: 19px;
    height: 7px;
    flex-shrink: 0;
}

/* ============================================
   数据区块
   ============================================ */
.data-section {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-content {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* ============================================
   Tab 栏
   ============================================ */
.tab-bar {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
}

.tab-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 4px 12px;
    border-radius: 48px;
    border: 1px solid transparent;
    background-color: #f7f7f7;
    color: #666666;
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 14px;
    font-weight: normal;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    outline: none;
}

.tab-item:hover {
    background-color: #e8f0fe;
    color: #1f6de8;
}

.tab-item.active {
    background-color: #1f6de8;
    color: #ffffff;
    font-weight: 700;
    border-color: #1f6de8;
}

/* ============================================
   数据卡片（左侧）
   ============================================ */
.data-card {
    width: 230px;
    min-width: 230px;
    height: 425px;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.gradient-card {
    background: linear-gradient(180deg, rgba(97, 179, 255, 0.9) 0%, rgba(65, 111, 227, 0.9) 100%), url('../images/image-import-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-header-bar {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(180deg, rgba(94, 176, 254, 0) 29.69%, #9ed1ff 100%);
}

.card-header-bar.tall {
    height: 54px;
}

.card-title {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1;
}

.header-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.header-value .num {
    font-family: "OPPOSans H", "Source Han Sans CN", sans-serif;
    font-size: 24px;
    font-weight: normal;
    color: #ffffff;
}

.header-value .unit {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #ffffff;
}

/* 数据列表 - 垂直布局 */
.card-data-list.vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    height: 371px;
}

/* 数据列表 - 2列网格布局 */
.card-data-list.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    padding: 14px;
    height: 371px;
    gap: 0;
}

.data-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.card-data-list.grid-2 .data-item {
    gap: 6px;
}

.data-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.data-value .num {
    font-family: "OPPOSans H", "Source Han Sans CN", sans-serif;
    font-size: 20px;
    font-weight: normal;
    color: #ffffff;
    line-height: 1;
}

.data-value .unit {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #ffffff;
    line-height: 1;
}

.data-label {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 16px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
}

/* 数据分隔线 */
.data-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 71px;
    height: 32px;
}

.divider-line {
    width: 3px;
    height: 32px;
    background: linear-gradient(180deg, rgba(240, 240, 241, 0) 0%, #ffffff 100%);
    opacity: 0.8;
    border-radius: 1.5px;
}

.divider-line.left {
    transform: rotate(90deg);
}

.divider-line.right {
    transform: rotate(-90deg);
    background: linear-gradient(180deg, rgba(240, 240, 241, 0) 0%, #ffffff 100%);
}

.divider-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

/* ============================================
   图表面板（右侧）
   ============================================ */
.chart-panel {
    flex: 1;
    min-width: 0;
    height: 425px;
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-header {
    height: 46px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e6e6e6;
    position: relative;
}

.chart-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: #1f6de8;
}

.chart-title {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1f6de8;
    line-height: 1;
}

.chart-body {
    flex: 1;
    padding: 8px 16px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ============================================
   图表图例
   ============================================ */
.chart-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.chart-legend.center {
    justify-content: center;
}

.chart-legend.with-units {
    justify-content: space-between;
    padding: 0 5px;
}

.chart-legend.with-units .legend-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.legend-group {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.legend-units {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
    margin-left: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: default;
}

.legend-icon {
    display: inline-block;
    flex-shrink: 0;
}

.legend-icon.rect {
    width: 12px;
    height: 8px;
    border-radius: 2px;
}

.legend-icon.line {
    width: 18px;
    height: 2px;
    border-radius: 1px;
    position: relative;
}

.legend-icon.line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background-color: inherit;
}

.legend-text {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #666666;
    line-height: 1;
}

/* ============================================
   单位标注
   ============================================ */
.chart-units {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding: 0 5px;
}

.unit-left,
.unit-right {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: #999999;
    line-height: 1;
    flex-shrink: 0;
}

.chart-legend .unit-left,
.chart-legend .unit-right {
    margin-top: 0;
}

/* ============================================
   图表绘制区
   ============================================ */
.chart-area {
    flex: 1;
    display: flex;
    position: relative;
    min-height: 0;
}

.y-axis {
    width: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 8px;
    padding-bottom: 23px;
}

.y-axis-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    align-items: flex-start;
    padding-right: 0;
    padding-left: 8px;
}

.y-label {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: #999999;
    line-height: 1;
}

.grid-lines {
    position: absolute;
    left: 40px;
    right: 40px;
    top: 0;
    bottom: 23px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.grid-line {
    width: 100%;
    height: 1px;
    background-color: #f0f0f0;
}

.chart-plot {
    flex: 1;
    position: relative;
    margin-left: 0;
    margin-bottom: 23px;
}

.bars-container {
    position: absolute;
    left: -15px;
    right: 25px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 10px;
    z-index: 4;
    pointer-events: none;
}

.bar-group {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
    flex: 1;
    justify-content: center;
    position: relative;
}

.bar {
    width: 8px;
    border-radius: 2px 2px 0 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    pointer-events: all;
}

.bar:hover {
    opacity: 0.85;
}

.line-chart {
    position: absolute;
    left: -15px;
    right: 29px;
    top: 0;
    bottom: 0;
    width: auto;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.line-chart .line-point {
    cursor: pointer;
    pointer-events: all;
}

.x-axis {
    position: absolute;
    bottom: 0;
    left: 40px;
    right: 40px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
}

.x-label {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: #999999;
    line-height: 1;
    text-align: center;
    flex: 1;
}

/* ============================================
   Tooltip
   ============================================ */
.chart-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.65);
    border-radius: 4px;
    padding: 10px 14px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
    pointer-events: none;
    min-width: 123px;
}

.chart-tooltip.show {
    display: flex;
}

.tooltip-title {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.tooltip-content {
    font-family: "Source Han Sans CN", sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: #ffffff;
    line-height: 1.5;
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 1440px) {
    .main-container {
        padding: 32px 120px;
    }
}

@media (max-width: 1200px) {
    .main-container {
        padding: 24px 40px;
    }

    .section-content {
        flex-direction: column;
    }

    .data-card {
        width: 100%;
        height: auto;
        min-width: auto;
    }

    .card-data-list.vertical {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        gap: 16px;
        padding: 20px;
    }

    .card-data-list.vertical .data-item {
        flex: 1 1 calc(50% - 16px);
    }

    .data-divider {
        display: none;
    }

    .chart-panel {
        width: 100%;
        height: 380px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 16px;
        gap: 16px;
    }

    .page-header {
        gap: 12px;
    }

    .header-title {
        font-size: 22px;
    }

    .header-decoration {
        width: 60px;
    }

    .tab-list {
        gap: 4px;
    }

    .tab-item {
        height: 28px;
        padding: 3px 10px;
        font-size: 12px;
    }

    .card-data-list.grid-2 {
        grid-template-columns: 1fr 1fr;
        height: auto;
        gap: 12px;
        padding: 16px;
    }

    .chart-header {
        padding: 0 12px;
    }

    .chart-title {
        font-size: 16px;
    }

    .chart-body {
        padding: 8px 12px 16px;
    }

    .chart-legend {
        gap: 16px;
    }

    .legend-group {
        gap: 16px;
    }

    .chart-panel {
        height: 320px;
    }

    .y-axis {
        width: 32px;
        padding-right: 4px;
    }

    .y-label {
        font-size: 10px;
    }

    .x-label {
        font-size: 10px;
    }

    .grid-lines {
        left: 32px;
        right: 32px;
    }

    .x-axis {
        left: 32px;
        right: 32px;
    }

    .bars-container {
        right: 32px;
    }

    .line-chart {
        right: 32px;
    }
}

@media (max-width: 480px) {
    .header-decoration {
        display: none;
    }

    .card-data-list.vertical .data-item {
        flex: 1 1 100%;
    }

    .card-data-list.grid-2 {
        grid-template-columns: 1fr;
    }

    .chart-legend {
        justify-content: center;
    }

    .legend-group {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   Title Section
   ======================================== */
.title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    height: 43px;
}

.title-decoration {
    position: relative;
    width: 309px;
    height: 11px;
    display: flex;
    align-items: flex-end;
}

.deco-line {
    width: 306px;
    height: 1px;
    background: linear-gradient(90deg, rgba(31, 109, 232, 0) 0%, #1f6de8 100%);
    position: absolute;
    bottom: 0;
    left: 0;
}

.deco-chevron {
    position: absolute;
    width: 19px;
    height: 7px;
    background-color: #1f6de8;
    clip-path: polygon(21% 0%, 100% 0%, 79% 100%, 0% 100%);
}

.title-decoration-left .chevron-1 {
    right: 4px;
    bottom: 2px;
    opacity: 0.36;
}

.title-decoration-left .chevron-2 {
    right: -1px;
}

.title-decoration-right {
    transform: scaleX(-1);
}

.title-decoration-right .chevron-1 {
    right: 4px;
    bottom: 2px;
    opacity: 0.36;
}

.title-decoration-right .chevron-2 {
    right: -1px;
}

.title-text {
    font-size: 30px;
    font-weight: 700;
    color: #333333;
    line-height: 1;
    text-align: center;
    letter-spacing: 0;
}