/* One record per row, one shared set of column headers. */
.finance-access-notice { padding:10px 14px; margin:10px 0; border:1px solid #c4d8cb; border-radius:8px; background:#edf5ef; color:#2b5039; font-size:12px; font-weight:700; }
.finance-readonly .sheet-toolbar [data-action=add],.finance-readonly .sheet-toolbar [data-action=all],.finance-readonly .ledger-actions button,.finance-readonly [data-fund-action],.finance-readonly .capital-mutation,.finance-readonly #fundForm,.finance-readonly #capitalEntryForm,.finance-readonly #initialCapitalForm button,.finance-readonly button[onclick^="openCreate"],.finance-readonly button[onclick^="editFinanceRow"],.finance-readonly button[onclick^="delete"] { display:none!important; }
.finance-readonly .excel-ledger input,.finance-readonly #revenueWallets input { color:#445b4c; background:#f6f8f6; cursor:default; }
#financeTotalPane { color:#284735; }#financeTotalPane h2 { font-size:20px;font-weight:800; }#financeTotalPane h3,.monthly-total-box h3 { font-size:15px;font-weight:800; margin:10px 0; }
#financeTotalPane p,.monthly-total-box p { font-size:12px; color:#586b5f; margin:8px 0; }
.total-form { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin:14px 0; padding:12px; background:#f3f7f4; border:1px solid #d0dfd4; border-radius:8px; }
.total-form label,.total-filters label { display:flex; flex-direction:column; gap:5px; font-size:12px; min-width:130px; flex:1 1 160px; }
.total-form input,.total-form select,.total-form textarea,.total-filters input,.total-filters select { border:1px solid #bdcfc3; border-radius:6px; padding:8px; min-width:0; width:100%; background:white; }
.total-form button,.total-entry-row button { padding:8px 12px; background:#246344; color:white; border-radius:6px; font-size:12px; font-weight:700; }
.total-form span[role=status] { font-size:12px; flex-basis:100%; color:#476751; }
.total-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin:12px 0; }
.total-cards article { padding:14px; border:1px solid #cbded1; border-radius:8px; background:white; }.total-cards span { display:block;font-size:12px;color:#526c5d; }.total-cards strong { display:block; margin-top:8px; font-size:19px; color:#245e3d; }.total-cards .total-negative { color:#b52f23; }
.total-formula,.monthly-total-box { background:#edf6f0; border:1px solid #ccdfd2; border-radius:8px; padding:13px; margin:10px 0; font-size:13px; }
.total-entry-box { border-top:1px solid #d5e3da; margin-top:18px; padding-top:12px; }.total-groups,.total-filters { display:flex;flex-wrap:wrap;gap:10px;margin:12px 0; }.total-groups button { display:flex;flex-direction:column;gap:5px;text-align:left;border:1px solid #ccdfd2;background:white;padding:10px;border-radius:7px;font-size:12px; }
.total-entry-row { display:grid;grid-template-columns:1fr 1.5fr 1fr 1fr;gap:8px;border-bottom:1px solid #d8e4db;padding:12px 0;font-size:12px;overflow-wrap:anywhere; }.total-entry-row small { grid-column:span 2; }.total-entry-row button { margin-right:5px; padding:5px 9px; }
@media(max-width:600px){.total-entry-row{grid-template-columns:1fr 1fr}.total-cards{grid-template-columns:1fr 1fr}.total-cards strong{font-size:16px}}
.finance-day-button { padding:6px 10px!important; border:1px solid #b8cdbf!important; border-radius:7px; background:white!important; color:#31543e!important; font-size:12px; font-weight:700; white-space:nowrap; }
.finance-day-button.finance-day-active { background:#246344!important; color:white!important; border-color:#246344!important; }
.finance-view-day { padding:5px 7px; min-width:0; max-width:150px; border:1px solid #bccfc2; border-radius:6px; background:white; font-size:12px; }
.finance-viewing-day { font-size:12px; color:#305940; font-weight:700; padding:5px; }
.wallet-panel { border:1px solid #bbd2c3; padding:14px; border-radius:10px; background:#f2f8f4; margin-bottom:14px; }
.wallet-panel h3 { font-size:15px; font-weight:800; color:#244d35; }
.wallet-panel p { font-size:12px; color:#52685b; margin:7px 0; }
.wallet-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:12px 0; }
.wallet-card { display:flex; flex-direction:column; gap:7px; min-width:0; padding:12px; background:white; border:1px solid #cadccf; border-radius:8px; }
.wallet-card strong { font-size:12px; color:#254b36; }
.wallet-card input { width:100%; min-width:0; padding:10px; border:1px solid #b1cbb9; border-radius:6px; font-size:18px; font-weight:700; color:#185b35; }
.wallet-card span { font-size:13px; font-weight:600; }.wallet-card small { font-size:11px; color:#536b5c; overflow-wrap:anywhere; }
@media(max-width:640px){.wallet-grid{grid-template-columns:1fr}}
.finance-accounts { margin:12px; padding:16px; background:#f8fbf9; border:1px solid #cbded1; border-radius:12px; color:#244735; }
.finance-accounts h3 { font-weight:800; font-size:16px; }
.finance-accounts p { font-size:12px; margin:6px 0 12px; color:#526a5c; }
.fund-form,.account-report-filters,.account-choices { display:flex; flex-wrap:wrap; align-items:end; gap:8px; margin:10px 0; }
.finance-accounts label { display:flex; flex-direction:column; font-size:12px; gap:4px; }
.finance-accounts input,.finance-accounts select,.finance-accounts button { border:1px solid #c4d5c9; background:white; padding:7px; border-radius:6px; font-size:12px; max-width:100%; }
.finance-accounts button[type=submit] { background:#226342; color:white; font-weight:700; }
.account-balances { display:flex; flex-wrap:wrap; gap:10px; }
.account-balances article { display:flex; flex:1 1 240px; flex-direction:column; gap:5px; border:1px solid #d0ddd4; border-radius:8px; padding:12px; background:white; font-size:12px; }
.account-balances b { color:#17613c; font-size:17px; }
.account-balances .balance-negative { color:#b42318; }
.account-balances p { flex-basis:100%; }
.finance-choice { position:relative; font-size:12px; min-width:140px; max-width:100%; }
.finance-choice summary { cursor:pointer; padding:8px; border:1px solid #bccfc2; border-radius:6px; background:white; font-weight:600; }
.choice-options { position:absolute; top:100%; left:0; z-index:35; min-width:220px; max-width:80vw; max-height:240px; overflow:auto; background:white; border:1px solid #afc5b6; border-radius:6px; box-shadow:0 5px 18px #183e2520; padding:8px; }
.choice-options label { display:flex!important; flex-direction:row!important; align-items:center; gap:8px; padding:5px; overflow-wrap:anywhere; }
.choice-options input { width:15px!important; height:15px!important; min-height:0!important; flex:none; }
.account-transactions { max-height:320px; overflow-y:auto; margin-top:10px; }
.account-transactions>div { display:grid; grid-template-columns:1.2fr 2fr 1fr auto; gap:8px; padding:8px; border-bottom:1px solid #dbe5df; font-size:12px; overflow-wrap:anywhere; }
@media(max-width:600px){.account-transactions>div{grid-template-columns:1fr 1fr}.fund-form label{flex:1 1 130px;min-width:0}.account-report-filters label{flex:1 1 130px;min-width:0}}
#paneFinance .ledger-frame { width:100%; min-width:0; border:1px solid #c7d7cc; background:white; }
#paneFinance table.excel-ledger { display:table!important; width:100%!important; table-layout:fixed!important; border-collapse:collapse; min-width:0!important; }
#paneFinance .excel-ledger thead { display:table-header-group!important; position:sticky; top:70px; z-index:8; }
#paneFinance .excel-ledger tbody { display:table-row-group!important; }
#paneFinance .excel-ledger tr { display:table-row!important; border-radius:0; margin:0; padding:0; }
#paneFinance .excel-ledger th,#paneFinance .excel-ledger td { display:table-cell!important; width:auto; padding:0!important; min-width:0!important; border:1px solid #dae4de; vertical-align:middle; overflow:hidden; }
#paneFinance .excel-ledger td::before,#paneFinance .excel-ledger tbody th::before { display:none!important; }
#paneFinance .excel-ledger thead th { padding:5px 3px!important; text-align:center; color:#294c38; background:#e8f1eb; font-size:11px; line-height:1.3; }
#paneFinance .excel-ledger .excel-letters th { padding:2px!important; font-size:10px; color:#667a6c; background:#f0f4f1; }
#paneFinance .excel-ledger tbody th { text-align:center; background:#f2f5f3; color:#77867d; font-size:10px; font-weight:500; }
#paneFinance .excel-ledger input,#paneFinance .excel-ledger select { display:block; width:100%; min-width:0; max-width:100%; height:31px; min-height:31px; padding:3px; margin:0; border:0; border-radius:0; background:transparent; font-size:11px; color:#263d30; box-shadow:none; }
#paneFinance .excel-ledger input[type=number] { appearance:textfield; -moz-appearance:textfield; text-align:right; }
#paneFinance .excel-ledger input::-webkit-inner-spin-button,#paneFinance .excel-ledger input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
#paneFinance .excel-ledger select { padding-right:0; }
#paneFinance .excel-ledger input:focus,#paneFinance .excel-ledger select:focus { background:#f2fbf3; outline:2px solid #328658; outline-offset:-2px; }
#paneFinance .excel-ledger .sheet-row { background:white; }
#paneFinance .excel-ledger .sheet-row:nth-child(even) { background:#fcfdfc; }
#paneFinance .excel-ledger .sheet-row.is-dirty { background:#fffcf0; }
#paneFinance .excel-ledger .sheet-row-total { padding:3px!important; text-align:right; font-size:11px; font-variant-numeric:tabular-nums; color:#235c3c; }
#paneFinance .excel-ledger .ledger-actions { text-align:center; }
#paneFinance .excel-ledger .ledger-actions button { min-height:22px; height:22px; padding:0 3px; font-size:10px; border:0; background:transparent; color:#185a43; }
#paneFinance .excel-ledger .sheet-row-status { display:block; min-width:0; font-size:9px; line-height:1; color:#896618; }
#paneFinance .excel-ledger .ledger-error td { padding:6px!important; background:#fff1ed; color:#a42d21; font-size:12px; }
#appSection.sheet-workspace { --sidebar-width:0px; }
#appSection.sheet-workspace #appSidebar { transform:translateX(-100%); width:264px; }
#appSection.sheet-workspace.sidebar-open #appSidebar { transform:translateX(0); }
#appSection.sheet-workspace #sidebarToggle { display:block; }
#appSection.sheet-workspace.sidebar-open #sidebarBackdrop { display:block; position:fixed; inset:0; background:#0a211c80; z-index:44; }
#appSection.sheet-workspace #appMain { padding-inline:12px; }
#paneFinance [id^=financeSubPane_] { padding:10px; }
#paneFinance .sheet-toolbar { padding:9px 12px; }
@media(max-width:640px) { #paneFinance .excel-ledger input,#paneFinance .excel-ledger select { font-size:10px; padding:2px; }#paneFinance .excel-ledger thead th { font-size:9px; }#paneFinance .excel-ledger .sheet-row-total { font-size:9px; } }
