/* 商业画布（Business Model Canvas）工具面板 */
.bmc-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;
}

.bmc-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;
}

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

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

.bmc-title i { color: #6366f1; }

.bmc-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

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

.bmc-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;
}

.bmc-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.bmc-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff !important;
}

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

.bmc-canvas-wrap {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background-color: #f1f5f9;
    background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 520px;
}

/* 标准九宫格布局：5 列 × 3 行 */
.bmc-board {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr 1fr 1fr;
    grid-template-rows: minmax(130px, 1fr) minmax(130px, 1fr) minmax(110px, 0.85fr);
    gap: 3px;
    min-width: 860px;
    max-width: 1200px;
    margin: 0 auto;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.bmc-cell {
    position: relative;
    background: #fff;
    padding: 10px 12px 30px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 区块定位 */
.bmc-cell-partners      { grid-column: 1; grid-row: 1 / 3; background: #f0fdf4; }
.bmc-cell-activities    { grid-column: 2; grid-row: 1; background: #f0fdf4; }
.bmc-cell-resources     { grid-column: 2; grid-row: 2; background: #f0fdf4; }
.bmc-cell-value         { grid-column: 3; grid-row: 1 / 3; background: #fdf2f8; }
.bmc-cell-relationships { grid-column: 4; grid-row: 1; background: #ecfeff; }
.bmc-cell-channels      { grid-column: 4; grid-row: 2; background: #ecfeff; }
.bmc-cell-segments      { grid-column: 5; grid-row: 1 / 3; background: #ecfeff; }
.bmc-cell-cost          { grid-column: 1 / 4; grid-row: 3; background: #faf5ff; }
.bmc-cell-revenue       { grid-column: 4 / 6; grid-row: 3; background: #fefce8; }

.bmc-cell-head {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
    flex-shrink: 0;
    line-height: 1.3;
}

.bmc-cell-head i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.bmc-head-en {
    font-weight: 500;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-left: 2px;
}

.bmc-head-green  { color: #059669; }
.bmc-head-pink   { color: #db2777; }
.bmc-head-blue   { color: #0891b2; }
.bmc-head-purple { color: #7c3aed; }
.bmc-head-yellow { color: #ca8a04; }

/* 便签区 */
.bmc-notes {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.bmc-notes-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
}

.bmc-notes-row .bmc-note {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
}

.bmc-note {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    outline: none;
    cursor: text;
    word-break: break-word;
}

.bmc-note:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.bmc-note:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.bmc-note-green  { background: #dcfce7; border: 1px solid #bbf7d0; }
.bmc-note-pink   { background: #fce7f3; border: 1px solid #fbcfe8; }
.bmc-note-blue   { background: #cffafe; border: 1px solid #a5f3fc; }
.bmc-note-purple { background: #ede9fe; border: 1px solid #ddd6fe; }
.bmc-note-yellow { background: #fef9c3; border: 1px solid #fde047; }

.bmc-btn-add-note {
    position: absolute;
    right: 8px;
    bottom: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.85);
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.bmc-cell:hover .bmc-btn-add-note { opacity: 1; }

.bmc-btn-add-note:hover {
    border-color: #6366f1;
    color: #6366f1;
}
@media (max-width: 768px) {
    .bmc-board {
        min-width: 720px;
    }

    .bmc-cell-head {
        font-size: 0.76rem;
    }

    .bmc-head-en {
        display: none;
    }
}
