.bc-toolbar {
    display: flex; flex-wrap: wrap; align-items: end; gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.bc-field { display: flex; flex-direction: column; gap: 0.35rem; }
.bc-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.bc-input, .bc-select {
    padding: 0.5rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    min-width: 130px;
}
.bc-input:focus, .bc-select:focus { border-color: var(--accent); }
.bc-select option { background: #1a1a1a; color: var(--text); padding: 0.4rem; }
.bc-select option:checked, .bc-select option:hover { background: var(--accent); color: #fff; }

.bc-add-btn {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: 50px;
    padding: 0.55rem 1.2rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t);
}
.bc-add-btn:hover { background: var(--accent-hover); }

.bc-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.bc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.bc-table th {
    text-align: left;
    padding: 0.75rem 0.9rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    white-space: nowrap;
}
.bc-table th.right, .bc-table td.right { text-align: right; }
.bc-table td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.bc-table tr:last-child td { border-bottom: 0; }
.bc-table input.bc-cell {
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.bc-table input.bc-cell:focus { border-color: var(--accent); }
.bc-table .calc { color: var(--text-secondary); }
.bc-table .neg { color: var(--red); }
.bc-table .pos { color: var(--green); }

.bc-mini-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--t);
}
.bc-mini-btn:hover {
    color: var(--red);
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.08);
}
.bc-mini-btn svg { width: 12px; height: 12px; }

.bc-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.bc-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
}
.bc-result-card .label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.bc-result-card .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.bc-result-card .value.viable { color: var(--green); }
.bc-result-card .value.unviable { color: var(--red); }
.bc-result-card .sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.bc-chart-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.bc-chart-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
    margin-bottom: 0.75rem;
}
.bc-chart-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.bc-chart-legend {
    display: flex; gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.bc-chart-legend .dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}
.bc-chart-legend .dot.flow { background: var(--accent); }
.bc-chart-legend .dot.cum { background: var(--hl-pink); }

.bc-chart-svg { width: 100%; height: auto; display: block; }
.bc-chart-svg .bar.pos { fill: var(--accent); }
.bc-chart-svg .bar.neg { fill: var(--red); }
.bc-chart-svg .axis { stroke: rgba(255,255,255,0.2); stroke-width: 1; }
.bc-chart-svg .grid { stroke: rgba(255,255,255,0.06); stroke-width: 1; stroke-dasharray: 3 4; }
.bc-chart-svg .cum-line { fill: none; stroke: var(--hl-pink); stroke-width: 2.5; }
.bc-chart-svg .cum-dot { fill: var(--hl-pink); stroke: var(--bg); stroke-width: 2; }
.bc-chart-svg text {
    fill: var(--text-muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}

.bc-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    justify-content: flex-end;
    margin-bottom: 2rem;
}
.bc-action-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--t);
}
.bc-action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.bc-action-btn.danger:hover { color: var(--red); border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); }
.bc-action-btn svg { width: 14px; height: 14px; }

.bc-help {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: italic;
    margin-top: 0.5rem;
}

@media (max-width: 700px) {
    .bc-table-wrap { overflow-x: auto; }
    .bc-table { min-width: 600px; }
}
