/*
 * Budget → Church Budget and Budget Accounts (templates/budget/), "bu-". The page header and
 * buttons come from members.css ("mb-"). Accounts indent by depth (--d).
 */
.bu-years { display: inline-flex; border: 1px solid #d5dbe3; border-radius: 9px; overflow: hidden; }
.bu-years a { padding: 7px 13px; color: #334155; text-decoration: none; font-weight: 600; font-size: 14px; }
.bu-years a + a { border-left: 1px solid #d5dbe3; }
.bu-years a.current { background: #1d5fc4; color: #fff; }
.bu-year-add { position: relative; }
.bu-year-add > summary { list-style: none; cursor: pointer; }
.bu-year-add > summary::-webkit-details-marker { display: none; }
.bu-year-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 220px; display: grid; gap: 8px; padding: 12px; background: #fff; border: 1px solid #d5dbe3; border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
.bu-year-form label { font-size: 13px; font-weight: 600; color: #334155; }

.bu-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bu-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.bu-kpi span { color: #64748b; font-size: 13px; }
.bu-kpi b { font-size: 20px; font-variant-numeric: tabular-nums; }
.bu-kpi em { font-style: normal; color: #64748b; font-size: 13px; }
.bu-kpi.total { background: #eef5fc; border-color: #cfe1f4; }
.bu-kpi.total b { font-size: 24px; color: #1d4f9c; }
a.bu-kpi:hover { border-color: #93b4e0; }

.bu-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border: 1px solid #cfe1f4; background: #f4f8fd; border-radius: 10px; }
.bu-notice.warn { border-color: #f1d79b; background: #fff9ec; }
.bu-empty { padding: 28px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #fff; text-align: center; }
.bu-empty h2 { font-size: 19px; }
.bu-empty p { color: #475569; max-width: 640px; margin: 6px auto 14px; }

.bu-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bu-table th, .bu-table td { padding: 7px 12px; border-bottom: 1px solid #edf1f5; vertical-align: top; }
.bu-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; background: #f8fafc; }
.bu-table td.bu-name { padding-left: calc(12px + var(--d, 0) * 22px); }
.bu-account td { font-weight: 600; }
.bu-d0 td { background: #f3f6fa; font-size: 16px; border-top: 2px solid #cbd5e1; }
.bu-d1 td { background: #fafbfd; }
.bu-line td { font-weight: 400; color: #334155; }
.bu-waiting td { color: #8a6d1f; font-style: italic; font-size: 13px; }
.bu-amount, .bu-share { text-align: right !important; white-space: nowrap; }
.bu-share { color: #64748b; width: 70px; }
.bu-num-col { width: 70px; white-space: nowrap; color: #475569; }
.bu-edit-col { width: 44px; }
.bu-table tfoot td { font-weight: 700; font-size: 16px; border-top: 2px solid #1e293b; border-bottom: none; }
.bu-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #eef2f7; color: #475569; font-size: 12px; font-weight: 500; }
.bu-tag.plan { background: #e7f5ec; color: #1f7a45; }
.bu-was { margin-left: 6px; color: #94a3b8; font-size: 12px; text-decoration: line-through; }
.bu-level { color: #64748b; }
.bu-actions-col { width: 200px; }
.bu-actions { display: flex; gap: 4px; }
.bu-actions form { margin: 0; }
.mb-icon-btn.danger { color: #b42318; }

.bu-form-h { font-size: 16px; margin: 20px 0 4px; }
.bu-lines { display: grid; gap: 8px; margin: 8px 0 4px; }
.bu-line-fields, .bu-plan-field { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; align-items: start; }
.bu-plan-field { padding: 10px 0; border-bottom: 1px solid #edf1f5; }
.bu-levels { margin-top: 18px; }
.bu-level-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }

@media (max-width: 640px) {
    .bu-line-fields, .bu-plan-field { grid-template-columns: 1fr; }
    .bu-table td.bu-name { padding-left: calc(8px + var(--d, 0) * 12px); }
}
