.finance-sheet-page{--fs-blue:#264e73;--fs-line:#d4dfe9;--fs-paper:#fff;--fs-input:#eef6fd;--fs-result:#f9fafb;--fs-ink:#25374a;color:var(--fs-ink);padding-bottom:76px}
.finance-sheet-page .card{padding:14px 16px;margin-bottom:12px}
.finance-sheet-page .fs-controls{padding:12px 16px}
.fs-tabs,.fs-subtabs,.fs-toolbar,.fs-book-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fs-tabs{border-bottom:1px solid var(--fs-line);padding-bottom:12px;margin-bottom:10px}
.fs-tabs .btn{font-weight:600}
.fs-toolbar label{display:flex;align-items:center;gap:6px;font-size:13px;white-space:nowrap}
.fs-toolbar select{width:92px;min-height:34px;padding:5px 8px}
.fs-toolbar input{width:220px;min-height:34px}
.fs-toolbar .fs-mobile-month{display:none}
.fs-spacer{flex:1}
.fs-subtabs{gap:6px;margin-bottom:10px}
.fs-note,.fs-book-tools>span{font-size:13px;color:#526779;margin:8px 0 10px}
.fs-book-tools{margin:8px 0 12px}
.fs-book-tools strong{margin-right:12px}
.fs-book-tools label{display:flex;gap:6px;align-items:center}
.fs-book-tools input{width:150px}
.fs-book-tools select{width:220px}
.fs-scroll{overflow:auto;max-height:calc(100dvh - 330px);min-height:200px;overscroll-behavior:contain;scrollbar-color:#8d9fae #eef1f4;scrollbar-width:thin;position:relative;border:1px solid var(--fs-line);border-radius:4px}
.finance-sheet-page .fs-table{border-collapse:separate;border-spacing:0;min-width:100%;width:max-content;margin:0;font-size:13px;line-height:1.45;font-variant-numeric:tabular-nums}
.fs-table th,.fs-table td{padding:7px 9px;border-bottom:1px solid #e0e7ee;border-right:1px solid #e0e7ee;min-width:118px;max-width:260px;text-align:right;vertical-align:middle;background:var(--fs-paper);height:39px}
.fs-table thead th{position:sticky;top:0;z-index:4;background:#e7edf3;color:#314b62;font-weight:600;text-align:center}
.fs-table .fs-fixed{position:sticky;left:0;z-index:2;min-width:248px;max-width:300px;text-align:left;background:var(--fs-paper);font-weight:500;white-space:normal}
.fs-table thead .fs-fixed{z-index:6;background:#e7edf3}
.fs-table .fs-section th,.fs-table .fs-section td{background:#526b82;color:#fff;border-color:#526b82;min-height:38px;font-weight:600;text-align:left}
.fs-table .fs-section th{z-index:3}
.fs-section label{display:inline-flex;align-items:center;gap:4px;margin:0 8px 0 0;font-size:12px;font-weight:400}
.fs-section input,.fs-section select{max-width:200px;color:var(--fs-ink);background:#fff}
.fs-table .fs-input{background:var(--fs-input);padding:0}
.fs-table .fs-result{background:var(--fs-result);position:relative;color:#293d50}
.fs-table .fs-profit{background:#fff2d6;font-weight:650}
.fs-table input[data-cell],.fs-table select[data-cell]{width:100%;min-width:116px;max-width:280px;min-height:39px;border:0;border-radius:0;margin:0;background:transparent;text-align:right;padding:8px 9px;font:inherit;font-variant-numeric:tabular-nums;box-shadow:none;color:#1e4d76;caret-color:#1e4d76;outline-offset:-2px}
.fs-table select[data-cell],.fs-table input[type=text]{text-align:left}
.fs-table input:focus,.fs-table select:focus{outline:2px solid #3c739e;background:#fff}
.fs-table input::placeholder{color:#657b8e;font-size:12px}
.fs-table input[type=number]{appearance:textfield;-moz-appearance:textfield}
.fs-table input::-webkit-inner-spin-button{appearance:none}
.fs-table .fs-changed,.fs-table .fs-changed input{background:#fff1bf}
.fs-table small{display:block;font-size:11px;color:#566c7e;font-weight:400;margin-top:3px}
.fs-table .fs-actions{min-width:185px;white-space:normal;text-align:right}
.fs-actions .btn{margin:2px}
.fs-actions label{font-size:12px;display:flex;align-items:center}
.fs-actions label input{width:auto;margin-right:4px}
.fs-trace{font-size:10px;padding:0;border:0;border-radius:2px;background:transparent;color:#42698b;display:block;margin-left:auto;cursor:pointer}
.fs-trace:focus-visible{outline:2px solid #3c739e}
.fs-empty{text-align:center!important;color:#586e82;min-height:160px;padding:24px!important}
.fs-savebar{position:fixed;left:16px;right:16px;bottom:12px;z-index:20;display:flex;align-items:center;gap:10px;padding:10px 14px;background:#fff;border:1px solid #ccd8e2;border-radius:10px;box-shadow:0 4px 16px #263f551a}
.fs-savebar input{max-width:320px;min-width:160px;font-size:12px;padding:8px;height:36px}
.fs-savebar #fs-status{font-size:12px;flex:1;color:#36556f;min-width:120px}
.fs-savebar .btn{white-space:nowrap;min-height:36px}
.fs-legend{font-size:11px;white-space:nowrap;color:#4c6172}
.fs-legend i{display:inline-block;background:#eef6fd;border:1px solid #a8c1d6;width:10px;height:10px;margin:0 3px 0 8px}
.fs-legend i.formula{background:#f9fafb;border-color:#cbd5dc}
.fs-month-expenses{margin-top:12px;padding-top:10px;border-top:1px solid var(--fs-line)}
.fs-month-expenses summary{cursor:pointer;color:#355b7a;font-size:13px;margin-bottom:8px}
.fs-month-expenses .fs-scroll{min-height:0;max-height:240px}
.fs-details,.fs-guard{position:fixed;inset:0;background:#16273766;z-index:120;display:flex;align-items:center;justify-content:center;padding:20px}
.fs-details>section{width:min(1100px,100%);max-height:90dvh;display:flex;flex-direction:column;background:#fff;border-radius:12px;box-shadow:0 12px 38px #14273533;overflow:hidden}
.fs-details header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--fs-line);flex-shrink:0}
.fs-details main{padding:16px 18px;overflow:auto;min-height:0}
.fs-details .fs-scroll{max-height:50dvh;min-height:0}
.fs-details pre{white-space:pre-wrap;word-break:break-word;font-size:12px;max-width:100%}
.fs-details label{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
.fs-details textarea{width:100%;min-height:80px}
.fs-details input{max-width:240px}
.fs-guard{z-index:150}
.fs-guard section{background:#fff;border-radius:12px;width:min(480px,100%);padding:22px;box-shadow:0 12px 38px #14273533}
.fs-guard h3{margin:0 0 12px}.fs-guard p{margin-bottom:20px}.fs-guard section>div{display:flex;gap:10px;justify-content:flex-end}
.fs-ordinary .erp-rail,.fs-ordinary .erp-tabs,.fs-ordinary .erp-head,.fs-ordinary .erp-version,.fs-ordinary .erp-sr-only,.fs-ordinary [data-private-finance],.fs-ordinary [data-private-accounting]{display:none!important}
.fs-ordinary .erp-shell{display:block!important;min-height:0!important;border:0;background:transparent}
.fs-ordinary .erp-desk{display:block!important}.fs-ordinary .erp-main{padding:0!important}.fs-ordinary .erp-tools{margin:0 0 12px}
.fs-ordinary .card{box-shadow:none;padding:0!important;border-radius:4px}.fs-ordinary .erp-table{max-height:calc(100dvh - 320px)}
.finance-sheet-page ::selection{background:#c5ddf0;color:#173750}
.finance-sheet-page button:focus-visible{outline:2px solid #3c739e;outline-offset:2px}
.fs-receipt{max-width:650px;margin:16px auto;padding:20px;border:1px solid var(--fs-line);line-height:2}
.fs-receipt h3{text-align:center;margin:0 0 20px}.fs-receipt label{display:flex;gap:12px;align-items:center;margin:8px 0}.fs-receipt input{max-width:220px}
@media(max-width:1000px){.fs-legend{display:none}.fs-savebar{flex-wrap:wrap}.fs-savebar input{max-width:260px}.fs-scroll{max-height:calc(100dvh - 355px)}}
@media(max-width:700px){
 .finance-sheet-page{padding-bottom:146px}.finance-sheet-page .card{padding:10px;margin:8px 0}.fs-tabs{flex-wrap:nowrap;overflow:auto;padding-bottom:9px;gap:6px}.fs-tabs .btn{white-space:nowrap;flex-shrink:0;font-size:13px;padding:8px 10px}
 .fs-toolbar{gap:6px}.fs-toolbar .fs-mobile-month{display:flex}.fs-toolbar select{width:76px}.fs-toolbar input{width:100%}.fs-toolbar .btn{font-size:12px;min-height:32px;padding:6px 8px}.fs-spacer{display:none}
 .fs-subtabs{flex-wrap:nowrap;overflow:auto}.fs-subtabs .btn{white-space:nowrap;flex-shrink:0}.fs-book-tools{font-size:12px;gap:6px}.fs-book-tools>span{width:100%;margin:0}.fs-note{font-size:11px}
 .fs-scroll{max-height:calc(100dvh - 395px);min-height:170px}.finance-sheet-page .fs-table{font-size:12px}.fs-table .fs-fixed{min-width:180px;max-width:210px}.fs-table th,.fs-table td{min-width:105px}.fs-table input[data-cell]{min-width:100px}
 .fs-savebar{bottom:62px;left:8px;right:8px;gap:6px;padding:8px;border-radius:8px}.fs-savebar #fs-status{font-size:11px;min-width:100%;order:0}.fs-savebar input{width:100%;max-width:none;flex:1;min-width:100px;font-size:11px}.fs-savebar .btn{font-size:12px;padding:7px 8px}.fs-savebar #fs-discard{font-size:11px}
 .fs-details,.fs-guard{padding:8px}.fs-details>section{max-height:92dvh;border-radius:8px}.fs-details header,.fs-details main{padding:10px}.fs-details strong{font-size:14px}.fs-details .fs-table .fs-fixed{min-width:120px}.fs-guard section{padding:16px}
}
@media print{
 body:has(.finance-sheet-page) #app .topbar,body:has(.finance-sheet-page) #mobile-bottom,body:has(.finance-sheet-page) .mobile-page-title,body:has(.finance-sheet-page) .fs-controls,.fs-savebar,.fs-subtabs,.fs-book-tools,.fs-actions,.fs-trace,.fs-details header{display:none!important}
 .finance-sheet-page{padding:0!important}.finance-sheet-page .card{border:0!important;padding:0!important}.fs-scroll{overflow:visible!important;max-height:none!important;min-height:0!important;border:0!important}.fs-table{width:100%!important;min-width:0!important;font-size:9px!important}.fs-table th,.fs-table td{min-width:0!important;max-width:none!important;height:auto!important;padding:4px!important;position:static!important;color:#111!important}.fs-table thead{display:table-header-group!important}.fs-table tr{break-inside:avoid}.fs-table input[data-cell],.fs-table select[data-cell]{min-width:0!important;padding:0!important;min-height:0!important;font-size:9px!important;color:#111!important}
 body:has(.fs-details) .fs-book,body:has(.fs-details) .fs-month-expenses{display:none!important}.fs-details{position:static!important;background:none!important;padding:0!important;display:block!important}.fs-details>section{box-shadow:none!important;border-radius:0!important;max-height:none!important;width:100%!important}.fs-details main{overflow:visible!important;padding:0!important}.fs-details .btn{display:none!important}
 .fs-receipt input{border:0;background:none}.fs-receipt{border:0}.fs-table .fs-section td,.fs-table .fs-section th{background:#e8edf1!important;color:#111!important}
}

#fs-daily-grid.fs-line-grid .fs-fixed{min-width:64px;max-width:90px}
#fs-daily-grid.fs-expense-grid .fs-fixed{min-width:180px;max-width:240px}
#fs-daily-grid .fs-section .fs-fixed{white-space:normal;word-break:break-word}

#fs-grid.fs-single-month .fs-table{width:100%;table-layout:fixed;min-width:100%}
#fs-grid.fs-single-month th,#fs-grid.fs-single-month td{min-width:0;max-width:none;overflow-wrap:anywhere}
#fs-grid.fs-single-month .fs-fixed{width:58%;min-width:0;max-width:none}
#fs-grid.fs-single-month input[data-cell],#fs-grid.fs-single-month select[data-cell]{min-width:0;max-width:none}
