/* 平衡计分卡工具面板 */
.bsc-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;
}

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

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

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

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

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

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

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

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

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

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

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

.bsc-board {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

/* ─── 四象限容器 ─── */
.bsc-quadrant {
    display: flex;
    justify-content: center;
}

.bsc-quadrant-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bsc-q-top .bsc-quadrant-inner,
.bsc-q-bottom .bsc-quadrant-inner {
    max-width: 700px;
}

.bsc-q-left .bsc-quadrant-inner,
.bsc-q-right .bsc-quadrant-inner {
    max-width: 100%;
    gap: 12px;
}

.bsc-q-top,
.bsc-q-bottom {
    width: 100%;
}

.bsc-middle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px 20px;
    align-items: center;
}

.bsc-q-left,
.bsc-q-right {
    min-width: 0;
}

/* ─── 中心枢纽 ─── */
.bsc-hub-zone {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bsc-hub {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    border: 3px solid #93c5fd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.35;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    z-index: 2;
    outline: none;
}

.bsc-hub:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35), 0 4px 16px rgba(59, 130, 246, 0.2);
}

.bsc-hub small {
    font-size: 0.62rem;
    font-weight: 500;
    color: #3b82f6;
    margin-top: 2px;
}

.bsc-arrow {
    position: absolute;
    background: #93c5fd;
    z-index: 1;
}

.bsc-arrow-up,
.bsc-arrow-down {
    width: 6px;
    height: 28px;
    left: 50%;
    transform: translateX(-50%);
}

.bsc-arrow-up { top: -8px; }
.bsc-arrow-down { bottom: -8px; }

.bsc-arrow-left,
.bsc-arrow-right {
    width: 28px;
    height: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.bsc-arrow-left { left: -8px; }
.bsc-arrow-right { right: -8px; }

/* ─── 表格卡片 ─── */
.bsc-table-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.bsc-q-top .bsc-table-card,
.bsc-q-bottom .bsc-table-card {
    max-width: 680px;
}

.bsc-table-title {
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.bsc-table-title em {
    font-size: 0.68rem;
    font-weight: 500;
    font-style: normal;
    opacity: 0.85;
}

.bsc-head-purple { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }
.bsc-head-blue   { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.bsc-head-cyan   { background: linear-gradient(90deg, #0891b2, #06b6d4); }
.bsc-head-pink   { background: linear-gradient(90deg, #db2777, #ec4899); }

.bsc-table-head {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
}

.bsc-table-head span {
    padding: 6px 10px;
    border-right: 1px solid #e2e8f0;
}

.bsc-table-head span:last-child { border-right: none; }

.bsc-table-body {
    display: grid;
    grid-template-columns: 1.1fr 2fr;
    min-height: 140px;
}

.bsc-cell {
    padding: 8px 10px;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #334155;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    outline: none;
    min-height: 32px;
}

.bsc-cell:focus {
    background: #fef9c3;
}

.bsc-cell-obj {
    grid-row: 1 / -1;
    display: flex;
    align-items: center;
    font-weight: 500;
    background: #fafafa;
    border-bottom: none;
}

.bsc-pairs {
    display: flex;
    flex-direction: column;
}

.bsc-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
}

.bsc-pair .bsc-cell {
    border-right: 1px solid #e2e8f0;
}

.bsc-pair .bsc-cell:last-child { border-right: none; }
.bsc-pair:last-child .bsc-cell { border-bottom: none; }

/* ─── 引导便签（独立占位，不覆盖表格） ─── */
.bsc-sticky {
    flex-shrink: 0;
    max-width: 168px;
    padding: 8px 10px;
    font-size: 0.68rem;
    line-height: 1.45;
    color: #78350f;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.08);
    outline: none;
    cursor: text;
}

.bsc-sticky:focus {
    background: #fde68a;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 2px 3px 8px rgba(0, 0, 0, 0.08);
}

/* 上：便签在表格上方偏右 */
.bsc-q-top .bsc-quadrant-inner {
    align-items: stretch;
}

.bsc-q-top .bsc-sticky-hint {
    align-self: flex-end;
    margin-right: 8px;
}

.bsc-q-top .bsc-table-card {
    width: 100%;
}

/* 左：便签在表格左侧 */
.bsc-q-left .bsc-quadrant-inner {
    flex-direction: row;
    align-items: flex-start;
}

.bsc-q-left .bsc-sticky-hint {
    width: 132px;
    max-width: 132px;
    margin-top: 36px;
}

.bsc-q-left .bsc-table-card {
    flex: 1;
    min-width: 0;
}

/* 右：便签在表格右侧 */
.bsc-q-right .bsc-quadrant-inner {
    flex-direction: row;
    align-items: flex-start;
}

.bsc-q-right .bsc-sticky-hint {
    width: 132px;
    max-width: 132px;
    margin-top: 36px;
}

.bsc-q-right .bsc-table-card {
    flex: 1;
    min-width: 0;
}

/* 下：便签在表格下方居中 */
.bsc-q-bottom .bsc-sticky-hint {
    align-self: center;
    max-width: 280px;
    text-align: center;
}

.bsc-q-bottom .bsc-table-card {
    width: 100%;
}
@media (max-width: 900px) {
    .bsc-middle {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
    }

    .bsc-hub-zone {
        order: -1;
        margin-bottom: 8px;
    }

    .bsc-q-left .bsc-quadrant-inner,
    .bsc-q-right .bsc-quadrant-inner {
        flex-direction: column;
        align-items: center;
    }

    .bsc-q-left .bsc-sticky-hint,
    .bsc-q-right .bsc-sticky-hint {
        width: auto;
        max-width: 100%;
        margin-top: 0;
        order: -1;
    }

    .bsc-sticky-hint {
        max-width: 100%;
        width: 100%;
    }

    .bsc-q-top .bsc-sticky-hint {
        align-self: stretch;
        margin-right: 0;
    }
}
