/* 价值链（Porter Value Chain）工具面板 */
.vc-tool-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 0;
}

.vc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-muted, #f9fafb);
    flex-shrink: 0;
}

.vc-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.vc-title i { color: #0d9488; }

.vc-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(13, 148, 136, 0.1);
    color: #0d9488;
}

.vc-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vc-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.vc-btn:hover {
    border-color: #0d9488;
    color: #0d9488;
}

.vc-btn-primary {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    border-color: transparent;
    color: #fff !important;
}

.vc-btn-primary:hover {
    opacity: 0.88;
    border-color: transparent !important;
}

.vc-canvas-wrap {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background-color: #eef1f5;
    background-image: radial-gradient(circle, #c5cdd8 1px, transparent 1px);
    background-size: 18px 18px;
    min-height: 560px;
}

.vc-board {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

/* ─── 标题 ─── */
.vc-header {
    padding: 16px 20px 8px;
    border-bottom: 1px solid #f1f5f9;
}

.vc-header-title span {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.vc-header-title em {
    display: block;
    font-style: normal;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* ─── 主体布局 ─── */
.vc-body {
    display: grid;
    grid-template-columns: 1fr 56px;
    min-height: 480px;
}

.vc-main {
    display: flex;
    flex-direction: column;
    padding: 12px 0 12px 12px;
    gap: 10px;
}

/* ─── 区块通用 ─── */
.vc-section {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 8px;
    align-items: stretch;
}

/* ─── 左侧括号标签 ─── */
.vc-bracket {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 6px;
    padding: 8px 4px;
    position: relative;
}

.vc-bracket::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: 0;
    width: 3px;
    border-radius: 2px;
}

.vc-bracket span {
    transform: rotate(180deg);
}

.vc-bracket small {
    transform: rotate(180deg);
    font-size: 0.58rem;
    font-weight: 500;
    opacity: 0.75;
    margin-top: 6px;
}

.vc-bracket-support {
    color: #15803d;
    background: rgba(34, 197, 94, 0.08);
}

.vc-bracket-support::before {
    background: #22c55e;
}

.vc-bracket-primary {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.08);
}

.vc-bracket-primary::before {
    background: #3b82f6;
}

/* ─── 支持性活动（行） ─── */
.vc-support-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vc-support-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px;
    align-items: stretch;
}

.vc-row-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 10px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 8px;
}

.vc-row-label span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #166534;
    line-height: 1.35;
}

.vc-row-label em {
    font-style: normal;
    font-size: 0.62rem;
    color: #4ade80;
    margin-top: 3px;
    line-height: 1.3;
}

.vc-row-content {
    padding: 10px 14px;
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 8px;
    font-size: 0.76rem;
    line-height: 1.65;
    color: #334155;
    min-height: 52px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.vc-row-content:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

/* ─── 基础活动（列） ─── */
.vc-primary-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    align-items: stretch;
}

.vc-primary-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vc-col-head {
    padding: 8px 8px 6px;
    text-align: center;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.vc-col-head span {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.35;
}

.vc-col-head em {
    display: block;
    font-style: normal;
    font-size: 0.58rem;
    color: #60a5fa;
    margin-top: 2px;
    line-height: 1.3;
}

.vc-col-content {
    flex: 1;
    padding: 10px 10px;
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 0 0 8px 8px;
    font-size: 0.72rem;
    line-height: 1.65;
    color: #334155;
    min-height: 120px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.vc-col-content:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* ─── 利润箭头 ─── */
.vc-profit-arrow {
    display: flex;
    align-items: stretch;
    padding: 12px 8px 12px 0;
}

.vc-profit-shape {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%);
    border-radius: 0 6px 6px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    min-height: 100%;
}

.vc-profit-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.15em;
    outline: none;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.15s;
}

.vc-profit-text:focus {
    background: rgba(255, 255, 255, 0.15);
}

/* ─── 可编辑通用 ─── */
[contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}
/* ─── 响应式 ─── */
@media (max-width: 900px) {
    .vc-body {
        grid-template-columns: 1fr;
    }

    .vc-profit-arrow {
        padding: 0 12px 12px;
        min-height: 48px;
    }

    .vc-profit-shape {
        clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%);
        flex-direction: row;
        justify-content: center;
        gap: 24px;
        min-height: 48px;
    }

    .vc-profit-text {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        letter-spacing: 0.3em;
    }

    .vc-primary-cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .vc-support-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .vc-primary-cols {
        grid-template-columns: 1fr;
    }
}
