/* 数据驾驶舱 · 动态展示（.ent-cockpit-fx-page）— 配色与宣传馆青绿 ESG 卡片体系统一 */

.ent-cockpit-fx-page .dashboard-main.ent-cockpit-fx-root {
    position: relative;
    isolation: isolate;
}

/* 背景：与宣传馆主区一致的青绿氛围 + 轻微动效 */
.ent-cockpit-fx-page .dashboard-main.ent-cockpit-fx-root::before {
    content: '';
    position: fixed;
    inset: 0;
    left: var(--sidebar-offset, 0);
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 80% at 8% 18%, rgba(45, 212, 191, 0.14) 0%, transparent 52%),
        radial-gradient(ellipse 100% 65% at 92% 75%, rgba(13, 148, 136, 0.09) 0%, transparent 48%),
        radial-gradient(ellipse 85% 50% at 50% 100%, rgba(13, 148, 136, 0.07) 0%, transparent 42%),
        linear-gradient(180deg, #eef2f6 0%, #f8fafc 30%, #f8fafc 100%);
    background-size: 200% 200%, 200% 200%, 100% 100%, 100% 100%;
    animation: entFxBgDrift 22s ease-in-out infinite alternate;
}

@keyframes entFxBgDrift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 0 0;
    }
    100% {
        background-position: 100% 40%, 0% 60%, 50% 50%, 0 0;
    }
}

.ent-cockpit-fx-page .dashboard-wrap .dashboard-main.ent-cockpit-fx-root::after {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    background-image: linear-gradient(rgba(13, 148, 136, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, black 0%, transparent 85%);
}

/* 顶栏：实时脉冲（青绿主色，与宣传馆 eyebrow 同系） */
.ent-cockpit-fx-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--ent-accent-deep, #0f766e);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(13, 148, 136, 0.3);
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.15);
    animation: entFxLiveGlow 3s ease-in-out infinite;
}

.ent-cockpit-fx-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
    animation: entFxLiveDot 1.8s ease-out infinite;
}

@keyframes entFxLiveDot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes entFxLiveGlow {
    0%,
    100% {
        box-shadow: 0 0 14px rgba(45, 212, 191, 0.12);
    }
    50% {
        box-shadow: 0 0 22px rgba(13, 148, 136, 0.22);
    }
}

/* KPI 卡片：入场 + 扫光 */
.ent-cockpit-fx-page .ent-cockpit-fx-kpi {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    animation: entFxKpiEnter 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ent-cockpit-fx-page .ent-cockpit-fx-kpi::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-18deg);
    animation: entFxKpiShine 4.5s ease-in-out infinite;
    pointer-events: none;
}

.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(1) {
    animation-delay: 0.05s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(2) {
    animation-delay: 0.1s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(3) {
    animation-delay: 0.15s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(4) {
    animation-delay: 0.2s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(5) {
    animation-delay: 0.25s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(6) {
    animation-delay: 0.3s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(7) {
    animation-delay: 0.35s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(8) {
    animation-delay: 0.4s;
}
.ent-cockpit-fx-page .ent-cockpit-fx-kpi:nth-child(9) {
    animation-delay: 0.45s;
}

@keyframes entFxKpiEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes entFxKpiShine {
    0%,
    40% {
        left: -60%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    60%,
    100% {
        left: 140%;
        opacity: 0;
    }
}

.ent-cockpit-fx-page .ent-cockpit-fx-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(13, 148, 136, 0.14);
    border-color: rgba(13, 148, 136, 0.35);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.25s ease;
}

.ent-cockpit-fx-page .ent-admin-kpi-value {
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.ent-cockpit-fx-page .ent-cockpit-fx-kpi--accent .ent-admin-kpi-value.ent-fx-count-active {
    color: #0f766e;
    text-shadow: 0 0 22px rgba(45, 212, 191, 0.35);
}

/* 待审核 · 与其他 KPI 并列卡片上的数字强调 */
.ent-cockpit-fx-page .ent-cockpit-kpi-pending .ent-admin-kpi-value {
    display: inline-block;
    animation: entFxNumPulse 2.2s ease-in-out infinite;
}

.ent-cockpit-fx-page .ent-cockpit-kpi-pending {
    border-color: rgba(180, 83, 9, 0.22);
    background: linear-gradient(165deg, #fff 0%, rgba(255, 251, 235, 0.55) 100%);
}

@keyframes entFxNumPulse {
    0%,
    100% {
        transform: scale(1);
        color: #0f766e;
    }
    50% {
        transform: scale(1.06);
        color: #0d9488;
    }
}

@keyframes entFxFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 地图容器：呼吸光晕（青绿） */
.ent-cockpit-fx-page .ent-cockpit-map-stage {
    box-shadow:
        0 8px 32px rgba(10, 36, 99, 0.06),
        0 0 0 1px rgba(13, 148, 136, 0.14),
        0 0 48px rgba(45, 212, 191, 0.1);
    animation: entFxMapHalo 5s ease-in-out infinite;
}

@keyframes entFxMapHalo {
    0%,
    100% {
        box-shadow:
            0 8px 32px rgba(10, 36, 99, 0.06),
            0 0 0 1px rgba(13, 148, 136, 0.12),
            0 0 40px rgba(45, 212, 191, 0.08);
    }
    50% {
        box-shadow:
            0 12px 40px rgba(10, 36, 99, 0.08),
            0 0 0 1px rgba(13, 148, 136, 0.24),
            0 0 64px rgba(45, 212, 191, 0.16);
    }
}

.ent-cockpit-fx-page .ent-china-map-chart {
    background: radial-gradient(ellipse at 50% 45%, rgba(240, 253, 250, 0.92) 0%, rgba(248, 250, 252, 0.55) 100%);
}

/* 侧栏卡片 */
.ent-cockpit-fx-page .ent-cockpit-fx-side {
    opacity: 0;
    transform: translateX(14px);
    animation: entFxSideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ent-cockpit-fx-page .ent-cockpit-side-stack .ent-cockpit-fx-side:nth-child(1) {
    animation-delay: 0.2s;
}
.ent-cockpit-fx-page .ent-cockpit-side-stack .ent-cockpit-fx-side:nth-child(2) {
    animation-delay: 0.32s;
}
.ent-cockpit-fx-page .ent-cockpit-side-stack .ent-cockpit-fx-side:nth-child(3) {
    animation-delay: 0.44s;
}

@keyframes entFxSideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ent-cockpit-fx-page .ent-cockpit-side-card {
    position: relative;
    overflow: hidden;
}

.ent-cockpit-fx-page .ent-cockpit-side-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(45, 212, 191, 0.07) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: entFxCardSweep 6s linear infinite;
    pointer-events: none;
}

@keyframes entFxCardSweep {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.ent-cockpit-fx-page .ent-cockpit-metric-item strong {
    transition: transform 0.25s ease, color 0.25s ease;
}

.ent-cockpit-fx-page .ent-cockpit-metric-item:hover strong {
    transform: scale(1.04);
    color: #0d9488;
}

/* 分省表区块 */
.ent-cockpit-fx-page .ent-cockpit-fx-section {
    opacity: 0;
    transform: translateY(20px);
    animation: entFxFadeUp 0.75s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ent-cockpit-fx-page .ent-cockpit-fx-section--bars {
    animation-delay: 0.62s;
}

.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row {
    opacity: 0;
    animation: entFxRowIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(1) {
    animation-delay: 0.05s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(2) {
    animation-delay: 0.09s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(3) {
    animation-delay: 0.13s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(4) {
    animation-delay: 0.17s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(5) {
    animation-delay: 0.21s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(6) {
    animation-delay: 0.25s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(7) {
    animation-delay: 0.29s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(8) {
    animation-delay: 0.33s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(9) {
    animation-delay: 0.37s;
}
.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(10) {
    animation-delay: 0.41s;
}

.ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row:nth-child(n + 11) {
    animation-delay: 0.48s;
}

@keyframes entFxRowIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 条形图：流光填充（青绿渐变） */
.ent-cockpit-fx-page .ent-fx-bar .ent-admin-bar-track {
    background: rgba(15, 23, 42, 0.06);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ent-cockpit-fx-page .ent-fx-bar .ent-admin-bar-fill {
    position: relative;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    background: linear-gradient(90deg, #2dd4bf 0%, #0d9488 45%, #14b8a6 100%);
    background-size: 200% 100%;
    animation: entFxBarFlow 3s linear infinite;
    box-shadow: 0 0 12px rgba(13, 148, 136, 0.32);
}

@keyframes entFxBarFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* 顶栏标题光晕（与宣传馆标题色一致） */
.ent-cockpit-fx-page .mentor-dashboard-header h1 {
    color: #0f2f66;
    animation: entFxTitleGlow 7s ease-in-out infinite;
}

@keyframes entFxTitleGlow {
    0%,
    100% {
        text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8), 0 0 28px rgba(45, 212, 191, 0.18);
    }
    50% {
        text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8), 0 0 42px rgba(13, 148, 136, 0.28);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ent-cockpit-fx-page .ent-cockpit-fx-kpi,
    .ent-cockpit-fx-page .ent-cockpit-fx-kpi::after,
    .ent-cockpit-fx-page .ent-cockpit-map-stage,
    .ent-cockpit-fx-page .ent-cockpit-fx-side,
    .ent-cockpit-fx-page .ent-cockpit-fx-section,
    .ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row,
    .ent-cockpit-fx-page .ent-fx-bar .ent-admin-bar-fill,
    .ent-cockpit-fx-page .dashboard-main.ent-cockpit-fx-root::before,
    .ent-cockpit-fx-page .mentor-dashboard-header h1 {
        animation: none !important;
        text-shadow: none;
    }
    .ent-cockpit-fx-page .ent-cockpit-fx-kpi {
        opacity: 1;
        transform: none;
    }
    .ent-cockpit-fx-page .ent-cockpit-fx-side {
        opacity: 1;
        transform: none;
    }
    .ent-cockpit-fx-page .ent-cockpit-fx-section {
        opacity: 1;
        transform: none;
    }
    .ent-cockpit-fx-page .ent-admin-table tbody tr.ent-cockpit-region-row {
        opacity: 1;
        transform: none;
    }
    .ent-cockpit-fx-page .ent-cockpit-kpi-pending .ent-admin-kpi-value {
        animation: none;
    }
}
