/* G4-FN1 (the Owner 2026-10-02/03) — the function of the expenses: the window, the bar above the income statement by function, the buttons in the
   details and on the classification page. Structure and behaviour only; the colours come from the site's tokens. */
.fn1-dialog{width:min(820px,calc(100% - 24px));max-height:calc(100vh - 24px);overflow:auto;padding:20px}
.fn1-dialog h2{margin:0 0 4px;font-size:17px}
.fn1-close{float:inline-end;min-width:40px;min-height:40px;border:1px solid var(--line);border-radius:9px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.fn1-context{margin:0 0 6px;font-size:12.5px;color:var(--muted)}
.fn1-help{margin:0 0 10px;font-size:12.5px;line-height:1.7;color:var(--muted)}
.fn1-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 8px}
.fn1-tools button,.fn1-actions button{min-height:38px;padding:0 14px}
.fn1-only{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;white-space:nowrap}
.fn1-list{max-height:min(56vh,560px);overflow:auto;border:1px solid var(--line);border-radius:10px}
.fn1-table{width:100%;border-collapse:collapse;font-size:12.5px}
.fn1-table thead th{position:sticky;top:0;background:var(--panel,var(--bg,#fff));z-index:1}
.fn1-table th,.fn1-table td{padding:6px 8px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top}
.fn1-table td:nth-child(3){white-space:nowrap}
.fn1-table select{min-height:36px;max-width:100%;padding:0 8px;border:1px solid var(--line);border-radius:9px;background:transparent;color:inherit;font:inherit}
.fn1-table tr.fn1-missing td:first-child{border-inline-start:3px solid #b7791f}
.fn1-table tr.fn1-changed td:first-child{border-inline-start:3px solid #2f855a}
.fn1-code{color:var(--muted);margin-inline-end:4px}
.fn1-suggest{display:block;margin-top:4px;color:var(--muted);cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.fn1-actions{display:flex;gap:8px;margin:10px 0 0}
.fn1-message{margin:8px 0 0;font-size:12.5px;line-height:1.6}
.fn1-muted{margin:8px;color:var(--muted);font-size:12.5px}
.fn1-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin:0 0 10px;padding:8px 12px;border:1px solid var(--line);border-inline-start:4px solid #2f855a;border-radius:10px;font-size:13px}
.fn1-bar[data-fn1-bar="missing"]{border-inline-start-color:#b7791f}
.fn1-bar[data-fn1-bar="switch"]{border-inline-start-color:var(--accent,#43c9ff)}
.fn1-bar button{min-height:36px;padding:0 12px}
.fn1-drill{font:inherit;font-size:13px;cursor:pointer;border-radius:999px;border:1px solid var(--accent,#43c9ff);background:transparent;color:inherit;padding:4px 12px;min-height:34px}
.fn1-tool{min-height:36px}
@media (max-width:760px){
 .fn1-dialog{padding:14px}
 .fn1-list{max-height:60vh}
 .fn1-table thead{display:none}
 .fn1-table tr{display:grid;grid-template-columns:1fr auto;gap:4px 8px;padding:6px 4px;border-bottom:1px solid var(--line)}
 .fn1-table td{border-bottom:0;padding:0 2px;overflow-wrap:anywhere}
 .fn1-table td:nth-child(4){grid-column:1/-1}
 .fn1-table select,.fn1-tools button,.fn1-actions button,.fn1-bar button{min-height:44px;width:100%}
}
/* G4-FN2 (the Owner 2026-10-09): one filter line (search + the tree groups), the mixed account's chip, and its split editor. Structure only; the
   colours come from the site's tokens. */
.fn2-filter{display:flex;flex:1 1 320px;align-items:center;gap:6px;min-width:0}
.fn2-filter input[type="search"]{flex:1 1 160px;min-width:0;min-height:36px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:transparent;color:inherit;font:inherit;font-size:12.5px}
.fn2-filter select{flex:0 1 150px;min-width:0;min-height:36px;padding:0 8px;border:1px solid var(--line);border-radius:9px;background:transparent;color:inherit;font:inherit;font-size:12.5px}
.fn2-chip{display:block;margin-top:4px;font-size:11.5px;color:var(--muted)}
.fn2-chip.fn2-pending{color:#b7791f;font-weight:600}
.fn2-edit{margin-top:4px;min-height:30px;padding:0 10px;border:1px solid var(--accent,#43c9ff);border-radius:999px;background:transparent;color:inherit;font:inherit;font-size:12px;cursor:pointer}
.fn1-table tr.fn2-editor td{padding:0;background:var(--panel-soft,rgba(127,127,127,.06))}
.fn2-box{padding:12px 14px;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0}
.fn2-title{margin:0;font-weight:600}
.fn2-hint{margin:0;font-size:12px;line-height:1.7;color:var(--muted)}
.fn2-box p,.fn2-box label span{white-space:normal;overflow-wrap:anywhere}
.fn2-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:8px}
.fn2-part{display:grid;grid-template-columns:1fr 84px;align-items:center;gap:4px 8px;padding:8px;border:1px solid var(--line);border-radius:9px;font-size:12.5px}
.fn2-part input{min-height:34px;width:100%;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:center}
.fn2-part output{grid-column:1 / -1;color:var(--muted);font-size:11.5px;direction:ltr;text-align:end}
.fn2-total{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:6px 10px}
.fn2-total progress{width:100%;height:10px}
.fn2-total small{grid-column:1 / -1}
.fn2-ok{color:#2f855a}
.fn2-warn{color:#b7791f}
.fn2-more{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:8px}
.fn2-more label{display:grid;gap:4px;font-size:12px;color:var(--muted)}
.fn2-more select,.fn2-more input{min-height:34px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;font:inherit}
.fn2-note{grid-column:1 / -1}
.fn2-actions{display:flex;flex-wrap:wrap;gap:8px}
.fn2-actions button{min-height:36px;padding:0 12px}
@media (max-width:760px){.fn2-filter{flex-basis:100%}.fn1-table,.fn1-table tbody{display:block;width:100%;max-width:100%}.fn2-grid>*,.fn2-more>*,.fn2-part input,.fn2-more select,.fn2-more input{min-width:0;max-width:100%}.fn1-table tr.fn2-editor{display:block;padding:0}.fn1-table tr.fn2-editor td{display:block;width:100%;min-width:0}.fn2-box{padding:10px;min-width:0}.fn2-title{overflow-wrap:anywhere}.fn2-grid{grid-template-columns:1fr 1fr}.fn2-part{grid-template-columns:1fr;min-width:0}.fn2-part input{width:100%}.fn2-more{grid-template-columns:1fr}.fn2-total{grid-template-columns:1fr auto}.fn2-total progress{grid-column:1 / -1}}
