.btl-roi-calculator {
    border: 1px solid #ddd;
    padding: 16px;
    margin: 24px 0;
    background: #fafafa;
    font-size: 14px;
    color: #43454b;
    font-family: inherit;
}

.btl-roi-calculator h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
}

.btl-roi-calculator h4 {
    color: #333;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 16px;
}

.btl-roi-calculator h5 {
    color: #333;
    margin: 12px 0 6px;
    font-size: 14px;
}

.btl-roi-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btl-roi-section {
    flex: 1 1 320px;
    min-width: 0;
}

.btl-roi-inputs,
.btl-roi-results {
    box-sizing: border-box;
}

/* Results hidden until first calculation */
.btl-roi-results--hidden {
    display: none;
}

.btl-roi-field {
    margin-bottom: 10px;
}

.btl-roi-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.btl-label-inline {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.btl-sub-label {
    font-weight: 400;
    font-size: 12px;
    color: #43454b;
}

.btl-radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.btl-radio-group input {
    margin-right: 4px;
}

.btl-roi-field input,
.btl-roi-field select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    color: #43454b;
    background: #fff;
}

.btl-roi-field input:focus,
.btl-roi-field select:focus {
    border-color: #0069B4;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 105, 180, 0.15);
}

.btl-roi-btn {
    margin-top: 12px;
    padding: 10px 20px;
    background: #e6007e;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    font-size: 13px;
}

.btl-roi-btn:hover {
    background: #c00069;
}

.btl-roi-note {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.btl-required {
    color: #e6007e;
    font-weight: 700;
}

.btl-optional {
    color: #666;
    font-weight: 400;
    font-size: 12px;
}

/* Error state */
.btl-roi-field.btl-error input,
.btl-roi-field.btl-error select {
    border-color: #e6007e;
}

.btl-roi-field.btl-error label {
    color: #e6007e;
}

/* P&L Summary Table */
.btl-roi-pnl-table {
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
}

.btl-roi-pnl-table table {
    width: 100%;
    margin: 0;
}

.btl-roi-pnl-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e1e1e1;
}

.btl-roi-pnl-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.btl-pnl-income td {
    font-weight: 600;
    color: #0069B4;
}

.btl-pnl-net td {
    font-weight: 700;
    color: #e6007e;
    font-size: 16px;
}

.btl-pnl-divider {
    height: 8px;
    background: linear-gradient(to right, transparent, #e1e1e1, transparent);
}

/* Metrics row */
.btl-roi-metrics {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 4px;
}

.btl-metric {
    flex: 1;
    text-align: center;
}

.btl-metric-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.btl-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Assumptions strip */
.btl-roi-assumptions {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

.btl-roi-assumptions h5 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #333;
}

.btl-roi-assumptions ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 12px;
}

.btl-roi-assumptions li {
    color: #43454b;
}

/* Charts & tables – simplified stable layout */
.btl-roi-charts {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.btl-roi-chart-block {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 12px;
    box-sizing: border-box;
}

.btl-roi-chart-block h5 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Canvas: fixed, reasonable height so legend fits below */
.btl-roi-chart-block canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 220px !important;
    margin-bottom: 8px;
}

/* Tables under charts */
.btl-roi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.btl-roi-table th,
.btl-roi-table td {
    padding: 4px 6px;
    border-top: 1px solid #f0f0f0;
    vertical-align: top;
    line-height: 1.3;
}

.btl-roi-table th {
    text-align: left;
    color: #333;
    font-weight: 600;
    width: 60%;
}

.btl-roi-table td {
    text-align: right;
    color: #43454b;
}

.btl-table-total th {
    font-weight: 700;
    color: #e6007e;
}

.btl-table-total td {
    font-weight: 700;
    color: #e6007e;
}

/* Responsive */
@media (max-width: 768px) {
    .btl-roi-grid {
        flex-direction: column;
    }

    .btl-roi-metrics {
        flex-direction: column;
        gap: 12px;
    }

    .btl-roi-pnl-table td,
    .btl-roi-pnl-table th {
        padding: 8px 12px;
    }

    .btl-roi-charts {
        grid-template-columns: 1fr;
    }
}
