/* 工具网站流量分析模块 */
.traffic-analytics-module {
    margin: 48px 0 24px;
    --traffic-bottom-content-height: 308px;
}
.traffic-analytics-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}
.traffic-analytics-title {
    margin: 0 !important;
    color: #0f172a;
    font-size: 22px !important;
    font-weight: 700;
    letter-spacing: 0;
}
.traffic-analytics-period {
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    margin-top: 8px;
    padding-left: 38px;
}
.traffic-analytics-source-link {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}
.traffic-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.traffic-metric-card,
.traffic-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 15px -10px rgba(15, 23, 42, 0.12);
}
.traffic-metric-card {
    display: flex;
    min-height: 112px;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}
.traffic-metric-label {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
}
.traffic-metric-value {
    color: #0f172a;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}
.traffic-metric-value.is-primary {
    color: #4f46e5;
}
.traffic-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
    align-items: stretch;
    gap: 32px;
    margin-bottom: 32px;
}
.traffic-two-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 32px;
    margin-bottom: 32px;
}
.traffic-ai-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 24px;
}
.traffic-panel {
    margin-bottom: 0;
    overflow: hidden;
    padding: 32px;
}
.traffic-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--traffic-bottom-content-height);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.traffic-all-empty-panel {
    min-height: 180px;
}
.traffic-all-empty-state {
    min-height: 180px;
    color: #64748b;
    font-size: 15px;
}
.traffic-chart-panel,
.traffic-geo-panel {
    display: flex;
    flex-direction: column;
}
.traffic-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}
.traffic-panel-title h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
}
.traffic-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 8px;
    white-space: nowrap;
}
.traffic-chart-wrap {
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
}
.traffic-chart-wrap svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
}
.traffic-axis-text {
    fill: #64748b;
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
}
.traffic-y-axis-text {
    fill: #64748b;
    font-size: 11px;
    font-weight: 500;
    text-anchor: end;
}
.traffic-chart-guide {
    display: none;
    stroke: #cbd5e1;
    stroke-dasharray: 4 4;
    stroke-width: 1;
    pointer-events: none;
}
.traffic-chart-guide.is-active {
    display: block;
}
.traffic-chart-dot {
    transition: fill 0.15s ease, r 0.15s ease, stroke 0.15s ease;
}
.traffic-chart-dot.is-active {
    r: 7px;
    fill: #5b5ff4;
    stroke: #5b5ff4;
}
.traffic-chart-hit {
    fill: transparent;
    cursor: pointer;
    pointer-events: all;
}
.traffic-geo-layout {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}
.traffic-pie-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
}
.traffic-pie {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: var(--traffic-pie-bg, #e5e7eb);
    cursor: pointer;
}
.traffic-pie::after {
    content: "";
    position: absolute;
    inset: 42px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}
.traffic-pie-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: none;
}
.traffic-pie-center span {
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}
.traffic-pie-center small {
    margin-top: 2px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}
.traffic-legend-list {
    display: grid;
    width: 100%;
    gap: 10px;
}
.traffic-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}
.traffic-legend-row strong {
    min-width: 66px;
    color: #0f172a;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.traffic-legend-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 86px;
}
.traffic-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--traffic-dot-color, #94a3b8);
}
.traffic-sources-panel,
.traffic-keywords-panel {
    display: flex;
    flex-direction: column;
}
.traffic-sources-panel .traffic-panel-title,
.traffic-keywords-panel .traffic-panel-title {
    margin-bottom: 16px;
}
.traffic-source-list {
    display: grid;
    height: var(--traffic-bottom-content-height);
    flex: 0 0 var(--traffic-bottom-content-height);
    grid-template-rows: repeat(6, 1fr);
    gap: 0;
}
.traffic-source-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 16px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}
.traffic-source-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}
.traffic-source-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}
.traffic-source-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
}
.traffic-source-fill {
    width: var(--traffic-source-width, 0%);
    height: 100%;
    border-radius: 999px;
    background: var(--traffic-source-color, #6366f1);
}
.traffic-table-wrap {
    height: var(--traffic-bottom-content-height);
    flex: 0 0 var(--traffic-bottom-content-height);
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
}
.traffic-keywords-panel .traffic-table-wrap {
    display: flex;
    align-items: flex-start;
    overflow: hidden !important;
}
.traffic-keywords-panel .traffic-table {
    height: auto;
    align-self: flex-start;
}
.traffic-keywords-panel .traffic-table th,
.traffic-keywords-panel .traffic-table td {
    width: 33.3333%;
}
.traffic-keywords-panel .traffic-table th:nth-child(1),
.traffic-keywords-panel .traffic-table td:nth-child(1) {
    text-align: left;
}
.traffic-keywords-panel .traffic-table th:nth-child(2),
.traffic-keywords-panel .traffic-table td:nth-child(2) {
    text-align: center;
}
.traffic-keywords-panel .traffic-table th:nth-child(3),
.traffic-keywords-panel .traffic-table td:nth-child(3) {
    text-align: right;
}
.traffic-table {
    width: 100%;
    height: 100%;
    min-width: 0;
    border-collapse: collapse;
    border: 0;
    table-layout: fixed;
}
.traffic-table th,
.traffic-table td {
    padding: 14px 8px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}
.traffic-table th {
    background: rgba(248, 250, 252, 0.5);
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.traffic-keywords-panel .traffic-table thead tr {
    height: 56px;
}
.traffic-keywords-panel .traffic-table tbody tr {
    height: 50px;
}
.traffic-table th:first-child {
    border-top-left-radius: 8px;
}
.traffic-table th:last-child {
    border-top-right-radius: 8px;
}
.traffic-table tbody tr {
    transition: background-color 0.15s ease;
}
.traffic-table tbody tr:hover {
    background: #f8fafc;
}
.traffic-table tbody tr:last-child td {
    border-bottom: 0;
}
.traffic-table strong {
    color: #0f172a;
}
.traffic-keywords-panel {
}
.traffic-keyword-name {
    display: inline-flex;
    align-items: center;
    color: #0f172a;
    font-weight: 700;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.traffic-table-number,
.traffic-cpc {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.traffic-table-number {
    color: #475569 !important;
}
.traffic-cpc {
    color: #16a34a !important;
    font-weight: 600;
}
.traffic-ai-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
}
.traffic-ai-head h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
}
.traffic-ai-head p {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}
.traffic-ai-head div {
    color: #4f46e5;
    font-size: 36px;
    font-weight: 900;
    line-height: 1.1;
}
.traffic-ai-table {
    min-width: 600px;
}
.traffic-ai-table-wrap {
    height: auto;
    flex: initial;
    overflow-y: hidden;
}
.traffic-ai-table th,
.traffic-ai-table td {
    padding: 12px 16px;
    height: 72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.traffic-ai-table th:nth-child(1),
.traffic-ai-table td:nth-child(1) {
    width: 64px;
}
.traffic-ai-table th:nth-child(2),
.traffic-ai-table td:nth-child(2) {
    width: 220px;
}
.traffic-ai-table th:nth-child(3),
.traffic-ai-table td:nth-child(3) {
    width: 112px;
    padding-right: 64px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}
.traffic-ai-table th:nth-child(4),
.traffic-ai-table td:nth-child(4) {
    width: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.traffic-ai-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}
.traffic-ai-source span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.traffic-ai-source-link {
    color: #334155;
    text-decoration: none;
    transition: color 0.15s ease;
}
.traffic-ai-source-link:hover {
    color: var(--main_color, #2b5ff5);
}
.traffic-ai-source img {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 6px;
    background: #f1f5f9;
    object-fit: cover;
}
.traffic-align-right {
    text-align: right !important;
}
.traffic-value-primary {
    color: #4f46e5 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-weight: 700;
}
.traffic-muted {
    color: #cbd5e1 !important;
}
.traffic-tooltip {
    position: fixed;
    z-index: 9999;
    display: none;
    padding: 9px 11px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    font-size: 13px;
    font-weight: 800;
    pointer-events: none;
    white-space: nowrap;
}
.traffic-chart-tooltip {
    position: fixed;
    z-index: 9999;
    display: none;
    padding: 9px 12px;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #fff;
    background: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    font-size: 13px;
    pointer-events: none;
    white-space: nowrap;
}
.traffic-chart-tooltip strong,
.traffic-chart-tooltip span {
    display: block;
}
.traffic-chart-tooltip strong {
    margin-bottom: 4px;
    font-weight: 700;
}
.traffic-chart-tooltip span {
    color: #cbd5e1;
}
.traffic-chart-tooltip b {
    color: #fff;
}
@media (max-width: 1024px) {
    .traffic-analytics-module {
        --traffic-bottom-content-height: auto;
    }
    .traffic-empty-state {
        min-height: 180px;
    }
    .traffic-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .traffic-grid,
    .traffic-two-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .traffic-analytics-module {
        margin-top: 36px;
    }
    .traffic-analytics-head {
        margin-bottom: 24px;
    }
    .traffic-analytics-title {
        font-size: 20px !important;
    }
    .traffic-analytics-period {
        padding-left: 36px;
    }
    .traffic-metrics-grid {
        grid-template-columns: 1fr;
    }
    .traffic-panel {
        padding: 20px;
    }
    .traffic-chart-wrap,
    .traffic-geo-layout,
    .traffic-source-list,
    .traffic-table-wrap {
        height: auto;
        flex-basis: auto;
    }
    .traffic-table-wrap {
        margin: 0 -20px;
        padding: 0 20px;
    }
    .traffic-grid,
    .traffic-two-grid {
        gap: 20px;
        margin-bottom: 20px;
    }
    .traffic-source-row {
        grid-template-columns: 92px minmax(0, 1fr) 64px;
        gap: 10px;
    }
}
