/* ===================== 年终奖个税计算器 ===================== */

.btn-block { width: 100%; margin-top: 8px; }

.bt-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.bt-title { font-size: 20px; font-weight: 800; margin: 0; }
.bt-download-btn { flex-shrink: 0; margin: 0; }

.bt-layout { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.bt-card {
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 16px;
    padding: 22px;
}
.bt-block-title { font-size: 15px; font-weight: 800; color: var(--c-text, #0f172a); margin: 0 0 14px; }

.bt-field { margin-bottom: 16px; }
.bt-field > label { display: block; font-size: 13px; font-weight: 700; color: var(--c-text-sub, #334155); margin-bottom: 7px; }
.bt-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 10px;
    background: var(--c-surface, #fff);
    color: var(--c-text, #0f172a);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.bt-input:focus { border-color: var(--c-primary, #0066ff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary, #0066ff) 15%, transparent); }
.bt-help { font-size: 12px; color: var(--c-text-muted, #94a3b8); margin: 6px 0 0; line-height: 1.7; }

.bt-result-empty { text-align: center; padding: 60px 20px; color: var(--c-text-muted, #94a3b8); }
.bt-result-empty .emoji { font-size: 40px; margin-bottom: 10px; }
.bt-result-empty p { font-size: 14px; margin: 0; }

/* 推荐结论 */
.bt-best {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 16px;
}
.bt-best .big { font-size: 20px; font-weight: 900; }

/* 双方案对比 */
.bt-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bt-plan {
    padding: 16px 14px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 12px;
    background: var(--c-surface-soft, #f8fafc);
}
.bt-plan.best { border-color: #10b981; background: color-mix(in srgb, #10b981 8%, var(--c-surface, #fff)); }
.bt-plan-name { font-size: 13px; font-weight: 800; color: var(--c-text-sub, #334155); margin-bottom: 10px; }
.bt-plan-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--c-text-muted, #64748b); margin-bottom: 6px; }
.bt-plan-row .v { font-weight: 800; color: var(--c-text, #0f172a); font-variant-numeric: tabular-nums; }
.bt-plan-tax { font-size: 24px; font-weight: 900; color: var(--c-text, #0f172a); font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.bt-plan.best .bt-plan-tax { color: #047857; }

/* 临界点提醒 */
.bt-trap {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 13px;
    line-height: 1.75;
}
.bt-trap b { color: #b45309; }

/* 明细表 */
.bt-sub-title { font-size: 14px; font-weight: 800; color: var(--c-text, #0f172a); margin: 18px 0 10px; }
.bt-table-wrap { overflow-x: auto; border: 1px solid var(--c-border, #e2e8f0); border-radius: 10px; }
.bt-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.bt-table th, .bt-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--c-border, #e2e8f0); }
.bt-table th { background: var(--c-surface-soft, #f8fafc); font-weight: 800; color: var(--c-text-sub, #334155); font-size: 12px; }
.bt-table th:first-child, .bt-table td:first-child { text-align: left; }
.bt-table tr:last-child td { border-bottom: none; }
.bt-table td { color: var(--c-text-sub, #334155); font-variant-numeric: tabular-nums; }
.bt-table td.hl { color: #047857; font-weight: 800; }

.bt-note { font-size: 12px; color: var(--c-text-muted, #94a3b8); line-height: 1.8; margin-top: 14px; }

[data-theme="dark"] .bt-best { background: color-mix(in srgb, #10b981 18%, #131c31); border-color: #065f46; color: #34d399; }
[data-theme="dark"] .bt-trap { background: color-mix(in srgb, #f59e0b 16%, #131c31); border-color: #78350f; color: #fbbf24; }
[data-theme="dark"] .bt-trap b { color: #fcd34d; }

/* ---- 税负可视化对比条 ---- */
.bt-bars { margin: 16px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.bt-bar-row { display: grid; grid-template-columns: 96px 1fr 104px; align-items: center; gap: 10px; }
.bt-bar-label { font-size: 12px; font-weight: 700; color: var(--c-text-sub, #334155); }
.bt-bar { height: 16px; border-radius: 99px; background: var(--c-surface-soft, #f1f5f9); overflow: hidden; }
.bt-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .45s ease; }
.bt-bar-row:not(.is-best) .bt-bar > span { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.bt-bar-row.is-best .bt-bar > span { background: linear-gradient(90deg, #10b981, #34d399); }
.bt-bar-val { text-align: right; font-size: 12px; font-weight: 800; color: var(--c-text, #0f172a); font-variant-numeric: tabular-nums; }
.bt-bar-row.is-best .bt-bar-val { color: #047857; }

/* ---- 临界点速查表 ---- */
.bt-table--peaks { min-width: 880px; }
.bt-table--peaks th:last-child, .bt-table--peaks td:last-child { white-space: nowrap; text-align: left; }
.bt-table td.warn { color: #dc2626; font-weight: 800; }
.bt-table tr.peak td:first-child { font-weight: 800; color: var(--c-text, #0f172a); }

[data-theme="dark"] .bt-plan.best .bt-plan-tax,
[data-theme="dark"] .bt-table td.hl { color: #34d399; }
[data-theme="dark"] .bt-table td.warn { color: #fca5a5; }
[data-theme="dark"] .bt-bar { background: #1e293b; }
[data-theme="dark"] .bt-bar-row.is-best .bt-bar-val { color: #34d399; }
[data-theme="dark"] .bt-bar-row:not(.is-best) .bt-bar > span { background: linear-gradient(90deg, #475569, #64748b); }

@media (max-width: 900px) {
    .bt-layout { grid-template-columns: 1fr; }
    .bt-compare { grid-template-columns: 1fr; }
}
