/* 买家决策路径 */
.bd-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;
}

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

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

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

.bd-title i { color: #059669; }

.bd-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

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

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

.bd-btn:hover { border-color: #059669; color: #059669; }

.bd-btn-primary {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: transparent;
    color: #fff !important;
}

.bd-btn-primary:hover { opacity: 0.92; color: #fff !important; }

.bd-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: 400px;
}

.bd-board {
    max-width: 1280px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    padding: 18px 14px 14px;
    overflow: hidden;
}

.bd-map-header { margin-bottom: 10px; padding: 0 4px; }

.bd-map-title {
    margin: 0 0 4px;
    font-size: 1.12rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    outline: none;
    border-radius: 4px;
    padding: 2px 4px;
}

.bd-map-title:focus {
    background: rgba(5, 150, 105, 0.06);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}

.bd-map-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    outline: none;
    border-radius: 4px;
    padding: 2px 4px;
}

.bd-map-subtitle:focus {
    background: rgba(5, 150, 105, 0.05);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.18);
}

.bd-funnel-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 4px;
    margin: 0 4px 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #166534;
}

.bd-funnel-hint i {
    font-size: 0.9rem;
    color: #22c55e;
    opacity: 0.85;
}

/* 7 列：角 + 6 阶段；6 行：5 维度 + 表头行已在阶段头 */
.bd-grid {
    display: grid;
    grid-template-columns: 80px repeat(6, minmax(0, 1fr));
    grid-template-rows: auto repeat(5, minmax(84px, auto));
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.bd-corner {
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.bd-stage-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    background: linear-gradient(180deg, #d1fae5, #ecfdf5);
    border-right: 1px solid #a7f3d0;
    border-bottom: 1px solid #a7f3d0;
    text-align: center;
    min-height: 58px;
}

.bd-stage-head:last-of-type { border-right: none; }

.bd-stage-head i { font-size: 1.05rem; color: #047857; }

.bd-stage-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: #14532d;
    outline: none;
    border-radius: 3px;
    padding: 1px 3px;
    line-height: 1.25;
}

.bd-stage-name:focus {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.2);
}

.bd-row-head {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    background: #ede9fe;
    border-right: 1px solid #ddd6fe;
    border-bottom: 1px solid #ddd6fe;
    text-align: center;
}

.bd-row-head span {
    font-size: 0.74rem;
    font-weight: 700;
    color: #5b21b6;
    line-height: 1.3;
    outline: none;
    border-radius: 3px;
    padding: 2px 3px;
}

.bd-row-head span:focus {
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 2px rgba(91, 33, 182, 0.18);
}

.bd-cell {
    position: relative;
    padding: 6px 6px 26px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    min-height: 84px;
}

.bd-cell:nth-child(7n) { border-right: none; }

.bd-notes {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 36px;
}

.bd-note {
    font-size: 0.72rem;
    line-height: 1.42;
    padding: 5px 7px;
    border-radius: 5px;
    outline: none;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.bd-note:focus { box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.28); }

.bd-note-default {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.bd-note-barrier {
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #713f12;
}

.bd-note-action {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
    font-weight: 500;
}

.bd-note-kpi {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e3a8a;
    font-weight: 500;
}

.bd-btn-add-note {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, border-color 0.15s, color 0.15s;
}

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

.bd-btn-add-note:hover {
    border-color: #059669;
    color: #059669;
    background: rgba(5, 150, 105, 0.06);
}

@media (max-width: 960px) {
    .bd-grid {
        grid-template-columns: 68px repeat(6, minmax(108px, 1fr));
        min-width: 780px;
    }

    .bd-canvas-wrap { overflow-x: auto; }
}
