/* EX-11 预算分析驾驶舱 · Enhanced Analytics */

.ex11-page { padding: clamp(12px, 1.5vw, 24px); }
.ex11-page .container { max-width: 1760px; }

.ex11-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--eh-space-4);
    padding: var(--eh-space-5);
    margin-bottom: var(--eh-space-4);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, rgba(21, 128, 61, 0.06) 100%);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-xl);
    box-shadow: var(--eh-shadow-xs);
}

.ex11-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--eh-font-mono);
    color: var(--eh-success);
    background: var(--eh-success-subtle, rgba(21, 128, 61, 0.08));
    border: 1px solid rgba(21, 128, 61, 0.2);
    border-radius: var(--eh-radius-sm);
    padding: 3px 10px;
    margin-bottom: 8px;
}

.ex11-hero .title {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--eh-text-primary);
    line-height: 1.2;
}

.ex11-hero .title .highlight { color: var(--eh-success); }

.ex11-hero .sub {
    margin-top: 6px;
    font-size: var(--eh-text-sm);
    color: var(--eh-text-secondary);
}

.ex11-hero .sub-en {
    font-size: var(--eh-text-xs);
    color: var(--eh-text-muted);
    margin-top: 4px;
}

.ex11-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ex11-hero-meta .meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    color: var(--eh-text-secondary);
}

.ex11-hero-meta .meta-chip.live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--eh-success);
    animation: ex11-pulse 2s infinite;
}

@keyframes ex11-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ex11-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--eh-space-2);
}

.ex11-hero-actions .btn-primary {
    background: var(--eh-success);
    border-color: var(--eh-success);
    color: #fff;
}

.ex11-hero-actions .btn-primary:hover {
    background: #166534;
    color: #fff;
}

.ex11-hero-actions .spinning i {
    animation: ex11-spin 0.6s linear infinite;
}

@keyframes ex11-spin { to { transform: rotate(360deg); } }

.ex11-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--eh-space-4);
    padding: 12px 16px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
}

.ex11-toolbar label {
    font-size: 11px;
    font-weight: 700;
    color: var(--eh-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ex11-toolbar .region-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ex11-toolbar .region-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    background: var(--eh-surface-solid);
    color: var(--eh-text-secondary);
    cursor: pointer;
    transition: all var(--eh-duration);
}

.ex11-toolbar .region-btn:hover {
    border-color: var(--eh-success);
    color: var(--eh-success);
}

.ex11-toolbar .region-btn.active {
    background: var(--eh-success);
    border-color: var(--eh-success);
    color: #fff;
}

.ex11-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--eh-space-3);
    margin-bottom: var(--eh-space-4);
}

.ex11-insight {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
    border-left-width: 3px;
}

.ex11-insight.success { border-left-color: var(--eh-success); }
.ex11-insight.warning { border-left-color: var(--eh-warning); }
.ex11-insight.info { border-left-color: var(--eh-brand); }

.ex11-insight .insight-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-md);
    font-size: 14px;
    flex-shrink: 0;
}

.ex11-insight.success .insight-icon { background: rgba(21, 128, 61, 0.1); color: var(--eh-success); }
.ex11-insight.warning .insight-icon { background: rgba(180, 83, 9, 0.1); color: var(--eh-warning); }
.ex11-insight.info .insight-icon { background: rgba(37, 99, 235, 0.1); color: var(--eh-brand); }

.ex11-insight .insight-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--eh-text-primary);
}

.ex11-insight .insight-val {
    color: var(--eh-success);
    margin-left: 4px;
}

.ex11-insight.warning .insight-val { color: var(--eh-warning); }

.ex11-insight .insight-desc {
    font-size: 11px;
    color: var(--eh-text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

.ex11-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--eh-space-3);
    margin-bottom: var(--eh-space-4);
}

.ex11-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
    box-shadow: var(--eh-shadow-xs);
}

.ex11-kpi-ring {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.ex11-kpi-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ex11-kpi-ring .ring-bg { fill: none; stroke: var(--eh-border); stroke-width: 4; }
.ex11-kpi-ring .ring-fill {
    fill: none;
    stroke: var(--eh-brand);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 138;
    stroke-dashoffset: 138;
    transition: stroke-dashoffset 0.6s ease;
}

.ex11-kpi-ring .ring-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: var(--eh-text-secondary);
}

.ex11-kpi .kpi-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--eh-text-primary);
    line-height: 1.1;
}

.ex11-kpi .kpi-num.green { color: var(--eh-success); }
.ex11-kpi .kpi-num.yellow { color: var(--eh-warning); }

.ex11-kpi .kpi-label {
    font-size: 10px;
    color: var(--eh-text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.ex11-kpi .kpi-trend {
    font-size: 10px;
    font-weight: 600;
    color: var(--eh-success);
    margin-top: 2px;
}

.ex11-tabs-wrap { margin-bottom: var(--eh-space-4); }

.ex11-tabs-wrap .tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--eh-surface-muted, #f3f4f6);
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border);
    width: fit-content;
}

.ex11-tabs-wrap .tabs button {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: var(--eh-radius-md);
    background: transparent;
    color: var(--eh-text-muted);
    cursor: pointer;
}

.ex11-tabs-wrap .tabs button.active {
    background: var(--eh-surface-solid);
    color: var(--eh-text-primary);
    box-shadow: var(--eh-shadow-xs);
}

.ex11-page .tab-content { display: none; }
.ex11-page .tab-content.active { display: block; }

.ex11-bento {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--eh-space-4);
    margin-bottom: var(--eh-space-4);
}

.ex11-chart-box {
    position: relative;
    height: 280px;
}

.ex11-chart-box.chart-sm { height: 220px; }

.ex11-dim-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--eh-space-4);
}

.ex11-dim-card {
    padding: 16px;
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
}

.ex11-dim-card .dim-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--eh-text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ex11-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--eh-border-subtle, rgba(0,0,0,0.04));
    font-size: 12px;
}

.ex11-metric-row:last-child { border-bottom: none; }

.ex11-metric-row .metric-label { color: var(--eh-text-secondary); }

.ex11-metric-row .metric-val {
    font-weight: 700;
    color: var(--eh-text-primary);
}

.ex11-metric-row .metric-bar-wrap {
    flex: 1;
    margin: 0 12px;
    height: 6px;
    background: var(--eh-border);
    border-radius: 999px;
    overflow: hidden;
}

.ex11-metric-row .metric-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--eh-brand), var(--eh-success));
}

.ex11-variance-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: var(--eh-text-muted);
    margin-top: 8px;
}

.ex11-variance-legend span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.ex11-variance-legend .plan::before { background: rgba(37, 99, 235, 0.35); }
.ex11-variance-legend .actual::before { background: var(--eh-success); }
.ex11-variance-legend .var::before { background: var(--eh-warning); }

.ex11-page .region-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.ex11-page .region-tag.east { background: rgba(37, 99, 235, 0.1); color: var(--eh-brand); }
.ex11-page .region-tag.south { background: rgba(21, 128, 61, 0.1); color: var(--eh-success); }
.ex11-page .region-tag.north { background: rgba(180, 83, 9, 0.1); color: var(--eh-warning); }
.ex11-page .region-tag.west { background: rgba(185, 28, 28, 0.1); color: var(--eh-danger); }

.ex11-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 10px 20px;
    background: var(--eh-text-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--eh-radius-lg);
    box-shadow: var(--eh-shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.ex11-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 1200px) {
    .ex11-kpi-row { grid-template-columns: repeat(3, 1fr); }
    .ex11-insights { grid-template-columns: 1fr; }
    .ex11-bento { grid-template-columns: 1fr; }
    .ex11-dim-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .ex11-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* Linkage 业财联动 */
.ex11-link-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--eh-space-4);
    margin-bottom: var(--eh-space-4);
}

.ex11-cross-card {
    padding: 12px 14px;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-md);
    margin-bottom: 10px;
    background: var(--eh-surface-muted, #f9fafb);
}

.ex11-cross-card:last-child { margin-bottom: 0; }

.ex11-cross-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ex11-cross-page {
    font-size: 10px;
    font-weight: 800;
    font-family: var(--eh-font-mono);
    color: var(--eh-success);
    background: rgba(21, 128, 61, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.ex11-cross-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--eh-brand);
    text-decoration: none;
}

.ex11-cross-title:hover { text-decoration: underline; }

.ex11-cross-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ex11-cross-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ex11-cross-metric .cm-label { font-size: 10px; color: var(--eh-text-muted); }
.ex11-cross-metric .cm-val { font-size: 13px; font-weight: 800; color: var(--eh-text-primary); }
.ex11-cross-metric .cm-note { font-size: 9px; color: var(--eh-text-muted); line-height: 1.3; }

.ex11-report-period {
    font-size: 13px;
    font-weight: 700;
    color: var(--eh-text-primary);
    margin-bottom: 8px;
}

.ex11-report-note {
    font-size: 11px;
    color: var(--eh-text-secondary);
    margin-bottom: 10px;
    padding: 8px 10px;
    background: rgba(37, 99, 235, 0.06);
    border-radius: var(--eh-radius-md);
}

.ex11-report-narrative {
    font-size: 12px;
    color: var(--eh-text-secondary);
    line-height: 1.6;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--eh-border);
}

.ex11-forecast-kpi {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 11px;
    color: var(--eh-text-secondary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--eh-border);
}

.ex11-forecast-kpi strong { color: var(--eh-text-primary); }

.ex11-adj-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--eh-border-subtle, rgba(0,0,0,0.04));
    font-size: 12px;
}

.ex11-adj-row:last-child { border-bottom: none; }

.ex11-adj-date { color: var(--eh-text-muted); font-family: var(--eh-font-mono); font-size: 11px; min-width: 88px; }
.ex11-adj-desc { flex: 1; color: var(--eh-text-secondary); }

.ex11-alert {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--eh-radius-md);
    margin-bottom: 8px;
    font-size: 12px;
}

.ex11-alert.warning { background: rgba(180, 83, 9, 0.08); border-left: 3px solid var(--eh-warning); }
.ex11-alert.info { background: rgba(37, 99, 235, 0.06); border-left: 3px solid var(--eh-brand); }
.ex11-alert.warning i { color: var(--eh-warning); }
.ex11-alert.info i { color: var(--eh-brand); }

.ex11-alert-title { font-weight: 700; color: var(--eh-text-primary); }
.ex11-alert-desc { font-size: 11px; color: var(--eh-text-muted); margin-top: 2px; }
.ex11-alert-action { font-size: 11px; color: var(--eh-brand); text-decoration: none; display: inline-block; margin-top: 4px; }

.ex11-improve-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--eh-text-muted);
    text-transform: uppercase;
    margin: 14px 0 8px;
    letter-spacing: 0.04em;
}

.ex11-imp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--eh-border-subtle, rgba(0,0,0,0.04));
    font-size: 12px;
}

.ex11-imp-title { font-weight: 700; color: var(--eh-text-primary); }
.ex11-imp-link { font-size: 10px; color: var(--eh-text-muted); font-weight: 600; margin-left: 4px; }
.ex11-imp-meta { font-size: 11px; color: var(--eh-text-muted); margin-top: 2px; }

.ex11-empty { font-size: 12px; color: var(--eh-text-muted); padding: 12px 0; }

.dept-en { font-size: 10px; color: var(--eh-text-muted); margin-left: 4px; }

@media (max-width: 1200px) {
    .ex11-link-grid { grid-template-columns: 1fr; }
    .ex11-cross-metrics { grid-template-columns: 1fr; }
}
