@charset "UTF-8";

/* 左侧侧边栏 */
.sidebar {
    width: 280px;
    min-width: 280px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
    padding: 30px 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar_title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 0 24px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.chain_count_text {
    font-size: 14px;
    color: #666;
    padding: 0 24px;
    margin: 0 0 24px;
}

.chain_count_text span {
    color: #0041b3;
    font-weight: 600;
    margin-right: 4px;
}

.sidebar_toggle_btn,
.sidebar_expand_btn {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #0041b3;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
}

.sidebar_toggle_btn {
    display: none;
    position: absolute;
    top: 74px;
    right: 24px;
    padding: 4px 10px;
}

.sidebar_toggle_btn:hover {
    background: #f5f8ff;
}

.sidebar_expand_btn {
    display: none;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 40;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 10px 6px;
    width: 30px;
    min-height: 90px;
    line-height: 1.1;
    writing-mode: vertical-rl;
    letter-spacing: 1px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar_expand_btn:hover {
    background: #f5f8ff;
    color: #00358a;
}

/* 产业链菜单 */
.chain_list {
    width: 255px;
    min-width: 255px;
    background-color: #fff;
    padding-top: 95px;
    overflow: hidden;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

.chain_list .title {
    font-size: 24px;
    color: #333;
    line-height: 24px;
    margin-bottom: 10px;
    padding-left: 45px;
}

.chain_list p {
    padding-left: 45px;
    font-size: 18px;
    line-height: 20px;
    margin-bottom: 26px;
    color: rgba(51, 51, 51, 1);
}

.chain_list .chain_count {
    color: rgba(0, 47, 167, 1);
}

.chain_list .chain_item {
    width: 100%;
    text-align: left;
    height: 48px;
    padding-left: 50px;
    line-height: 48px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 4px;
    position: relative;
    transition: 0.3s;
    padding-right: 10px;
}

.chain_list .chain_text {
    color: rgba(113, 128, 150, 1);
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    -moz-text-overflow: ellipsis;
    -ms-text-overflow: ellipsis;
    -webkit-text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    display: block;
}

.chain_item .s_menu {
    position: absolute;
    right: -7px;
    top: 0;
    transform: translateX(100%);
    background: #fff;
    min-width: 100px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 3px 0 16px 2px rgba(0, 0, 0, 0.11);
    overflow: hidden;
}

.chain_item .area_item {
    color: rgba(113, 128, 150, 1);
    padding: 0 20px;
    white-space: nowrap;
    transition: 0.3s;
    max-width: 245px;
    -moz-text-overflow: ellipsis;
    -ms-text-overflow: ellipsis;
    -webkit-text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    cursor: pointer;
}

.chain_item .area_item.active,
.chain_item .area_item:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(0, 47, 167, 1);
    transition: 0.3s;
}

.chain_list .chain_item:hover,
.chain_list .chain_item.active {
    background: rgba(0, 47, 167, 1);
    overflow: visible;
    transition: 0.3s;
}

.chain_list .chain_item:hover a,
.chain_list .chain_item.active a {
    color: #fff !important;
    text-decoration: unset !important;
    transition: 0.3s;
}

.chain_menu {
    list-style: none;
    padding: 0 0 16px;
    margin: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.graph_wrap.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
    box-shadow: none;
}

.graph_wrap.sidebar-collapsed .sidebar .sidebar_title,
.graph_wrap.sidebar-collapsed .sidebar .chain_count_text,
.graph_wrap.sidebar-collapsed .sidebar .sidebar_toggle_btn,
.graph_wrap.sidebar-collapsed .sidebar .chain_menu {
    opacity: 0;
    pointer-events: none;
}

.graph_wrap.sidebar-collapsed .sidebar_expand_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chain_menu_item {
    position: relative;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chain_menu_item:hover .chain_text,
.chain_menu_item.active .chain_text {
    background: #0351C0;
    color: #fff;
}

.chain_menu_item.active .s_menu,
.chain_menu_item:hover .s_menu {
    max-height: 420px;
    opacity: 1;
    visibility: visible;
    transition: max-height 1s;
}

.chain_menu_item .s_menu {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.chain_menu_item .chain_text {
    padding: 14px 20px 14px 24px;
    color: #333;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chain_menu_link {
    display: flex;
    align-items: center;
    padding: 14px 20px 14px 24px;
    color: #333;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s;
}

.chain_menu_item:hover .chain_menu_link,
.chain_menu_item.active .chain_menu_link {
    color: #0041b3;
}

.chain_menu_item:hover .chain_icon svg,
.chain_menu_item.active .chain_icon svg {
    fill: #0041b3;
}

.chain_text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chain_menu_icon_svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #798391;
    transition: color 0.25s ease;
}

.chain_menu_icon_svg * {
    fill: currentColor !important;
}

.chain_menu_item:hover .chain_menu_icon_svg,
.chain_menu_item.active .chain_menu_icon_svg {
    color: #ffffff;
}

.chain_arrow {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.chain_arrow svg {
    width: 12px;
    height: 12px;
    fill: #999;
}

.chain_menu_item.has_submenu:hover .chain_arrow svg,
.chain_menu_item.active .chain_arrow svg {
    fill: #0041b3;
}

.submenu_item {
    padding: 0;
}

.area_item {
    display: block;
    padding: 10px 20px 10px 56px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submenu_item:hover .area_item,
.submenu_item.active .area_item {
    color: #0041b3 !important;
    background: #e6f0ff;
}

.submenu_text {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (max-width: 1440px) {
    .sidebar {
        width: 260px;
        min-width: 260px;
    }

    .sidebar_title {
        font-size: 22px;
    }
}

@media screen and (max-width: 768px) {
    .graph_wrap {
        position: relative;
    }

    .sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        height: auto;
        width: 280px;
        min-width: 0;
        max-width: calc(100vw - 48px);
        z-index: 30;
        transition: transform 0.26s ease, opacity 0.2s ease;
    }

    .sidebar_toggle_btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        top: 56px;
        right: 16px;
    }

    .chain_menu_item {
        width: 100%;
    }

    .graph_wrap.sidebar-collapsed .sidebar {
        width: 280px;
        min-width: 0;
        padding: 30px 0;
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
        box-shadow: none;
    }

    .graph_wrap:not(.sidebar-collapsed) .sidebar {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .graph_wrap.sidebar-collapsed .sidebar_expand_btn {
        top: 50%;
        min-height: 78px;
        font-size: 11px;
    }
}

/* 企业列表面板（与菜单统一到同一文件）
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.26);
    z-index: 1090;
    display: none;
}

.modal-overlay.active {
    display: block;
} */

.side-panel-wrapper {
    position: fixed;
    top: 140px;
    right: -500px;
    width: 460px;
    height: 80%;
    background: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transition: right 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
    display: flex;
    flex-direction: column;
}

.side-panel-wrapper.active {
    right: 60px;
}

.panel-header {
    padding: 24px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.panel-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-count {
    font-size: 14px;
    color: #777;
    padding: 0 5px;
    background-color: #f8f8f8;
    border-radius: 3px;
}

.panel-close {
    cursor: pointer;
    color: #999;
    font-size: 24px;
    transition: color 0.2s;
}

.panel-close:hover {
    color: #333;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.enterprise-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.enterprise-logo {
    width: 48px;
    height: 48px;
    background: #f5f7fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #eee;
    font-size: 18px;
    text-align: center;
}

.enterprise-info {
    flex: 1;
    min-width: 0;
}

.enterprise-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.enterprise-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 2px;
}

.badge-blue {
    background: #eef4ff;
    color: #4a8df8;
}

.badge-orange {
    background: #fff7e6;
    color: #fa8c16;
}

.enterprise-score-wrap {
    position: relative;
    text-align: center;
    margin-left: 12px;
    padding: 8px;
    background: linear-gradient(180deg, #fcfcfd 0%, #f4f6f9 100%);
    border-radius: 8px;
}

.score-metrics {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.score-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-col + .score-col {
    padding-left: 10px;
    border-left: 1px solid #dce3eb;
}

.score-num {
    font-size: 22px;
    font-weight: bold;
    color: #f5222d;
    display: block;
    letter-spacing: 0.3px;
    line-height: 1;
}

.score-label {
    font-size: 12px;
    color: #5f6b7a;
    display: block;
    margin-top: 8px;
    line-height: 1.2;
}

.score-grade-label {
    font-size: 12px;
    color: #5f6b7a;
    display: block;
    margin-top: 8px;
    line-height: 1.2;
}

.score-help-wrap-mini {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    top: -4px;
    right: -8px;
    z-index: 2;
}

.score-help-trigger-mini {
    width: 16px;
    height: 16px;
    border: 1px solid #c6ced8;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #8c97a6;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.score-help-trigger-mini:hover {
    color: #4b5868;
    border-color: #93a0ae;
    background: #fff;
}

/* 企业列表说明：打开时挂到 body，关闭后从 DOM 移除，避免每条列表重复占用节点 */
.enterprise-score-help-root {
    position: fixed;
    inset: 0;
    z-index: 12050;
    pointer-events: none;
}

.enterprise-score-help-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

.enterprise-score-help-panel {
    position: fixed;
    box-sizing: border-box;
    overflow: auto;
    pointer-events: auto;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
    color: #374151;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    white-space: pre-line;
    max-height: 240px;
    width: min(300px, calc(100vw - 24px));
    max-width: min(300px, calc(100vw - 24px));
    z-index: 2;
}

.enterprise-score-help-panel p {
    margin: 0 0 6px;
}

.enterprise-score-help-panel p:last-child {
    margin-bottom: 0;
}

.enterprise-score-help-panel .score-help-concept-title-mini {
    margin-top: 8px;
    margin-bottom: 6px;
    font-weight: 700;
    color: #0f172a;
}

.enterprise-score-help-panel .score-help-section-mini {
    margin-top: 8px;
}

.enterprise-score-help-panel .score-help-section-mini:first-of-type {
    margin-top: 10px;
}

.enterprise-score-help-panel .score-help-section-mini strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
    color: #0f172a;
}

.enterprise-score-help-panel::before {
    content: "";
    position: absolute;
    right: 10px;
    bottom: -6px;
    width: 10px;
    height: 10px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    transform: rotate(45deg);
}

.enterprise-score-help-panel.enterprise-score-help-panel--arrow-top::before {
    bottom: auto;
    top: -6px;
    transform: rotate(225deg);
}

@media screen and (min-width: 769px) {
    .enterprise-score-help-overlay {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .enterprise-score-help-panel {
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        top: auto;
        width: auto;
        max-width: none;
        max-height: min(62vh, 480px);
        border-radius: 12px;
    }

    .enterprise-score-help-panel::before {
        display: none;
    }
}

.score-grade {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff5f5;
    color: #f5222d;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1;
}

.panel-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #000;
    flex-wrap: wrap;
}

.page-item {
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #000;
}

.page-item:hover,
.page-item.active {
    background: #e4e6eb;
}

.page-item.disabled {
    color: #bbb;
    cursor: not-allowed;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.page-input {
    width: 40px;
    height: 28px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    text-align: center;
    outline: none;
}

@media screen and (max-width: 1200px) {
    .side-panel-wrapper {
        top: 100px;
        right: -420px;
        width: 400px;
        height: calc(100% - 120px);
    }

    .side-panel-wrapper.active {
        right: 16px;
    }
}

@media screen and (max-width: 768px) {
    .side-panel-wrapper {
        top: 0;
        right: -100vw;
        width: 100vw;
        max-width: 100vw;
        height: 100%;
        border-radius: 0;
    }

    .side-panel-wrapper.active {
        right: 0;
    }

    .panel-header {
        padding: 16px 14px 12px;
    }

    .panel-title {
        font-size: 18px;
    }

    .panel-count {
        font-size: 12px;
    }

    .panel-body {
        padding: 0 14px;
    }

    .enterprise-item {
        padding: 12px 0;
    }

    .enterprise-logo {
        width: 42px;
        height: 42px;
        font-size: 14px;
        margin-right: 10px;
    }

    .enterprise-name {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .badge {
        font-size: 10px;
        padding: 2px 4px;
    }

    .enterprise-score-wrap {
        margin-left: 8px;
        min-width: 168px;
        padding: 8px;
        border-radius: 7px;
    }

    .score-metrics {
        gap: 8px;
    }

    .score-col + .score-col {
        padding-left: 8px;
    }

    .score-num {
        font-size: 22px;
    }

    .score-grade {
        font-size: 14px;
        min-width: 52px;
        height: 26px;
        margin-top: 6px;
    }

    .score-label,
    .score-grade-label {
        font-size: 11px;
        margin-top: 6px;
    }

    .score-help-wrap-mini {
        top: 6px;
        right: 6px;
    }

    .panel-footer {
        padding: 12px 10px;
    }

    .pagination {
        justify-content: flex-start;
        gap: 6px;
    }

    .page-item {
        min-width: 26px;
        height: 26px;
    }

    .page-jump {
        margin-left: 0;
    }
}
