/* Compact ledgers: keep every value readable; overflow remains inside the table. */
@media screen{
div[class^="ledger-"] .table-scroll{max-width:100%;overflow-x:auto}
div[class^="ledger-"] table{font-size:12.5px;table-layout:auto}
div[class^="ledger-"] th{min-width:0;padding:8px 6px;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:normal}
div[class^="ledger-"] td{padding:7px 6px;line-height:1.35;vertical-align:middle}
#rows-form th{max-width:120px}
#rows-form th:has(input[type=checkbox]),#rows-form td:has(input[type=checkbox]){width:28px;min-width:28px;padding:5px}
#rows-form .field-money,#rows-form .field-percent,#rows-form .field-date,#rows-form .field-int,#rows-form .field-year,#rows-form .field-bool{width:1%;font-variant-numeric:tabular-nums}
#rows-form td.field-money,#rows-form td.field-percent,#rows-form td.field-date{white-space:nowrap}
#rows-form .field-text,#rows-form .field-category,#rows-form .field-select{min-width:90px;max-width:170px;white-space:normal;overflow-wrap:anywhere}
#rows-form .note-cell{min-width:60px;max-width:150px;white-space:normal;overflow-wrap:anywhere}
#rows-form .document-cell{width:70px;min-width:64px;max-width:100px;padding:5px}
#rows-form .document-actions{gap:2px;flex-wrap:wrap;white-space:normal}
#rows-form td:last-child{min-width:72px;max-width:100px;white-space:normal;line-height:1.4}
#rows-form tfoot td{white-space:normal;font-size:12px}
#rows-form tfoot td:not(:first-child){font-variant-numeric:tabular-nums}
@media(min-width:1100px){main{padding-left:24px;padding-right:24px}div[class^="ledger-"] .card{padding:18px}}
}
@media screen{#rows-form table{width:auto;max-width:100%}#rows-form .field-money,#rows-form .field-percent,#rows-form .field-date,#rows-form .field-int,#rows-form .field-year,#rows-form .field-bool{width:auto}}
@media screen{
#rows-form th.row-actions,#rows-form td.row-actions{width:auto;min-width:162px;max-width:none;white-space:nowrap;line-height:1.3;padding-left:9px;padding-right:9px}
#rows-form td.row-actions a{white-space:nowrap;font-size:12px}
#rows-form td{padding-top:5px;padding-bottom:5px}
#rows-form .column-number,#rows-form .column-line,#rows-form .column-tax_id,#rows-form .field-cost_mode{min-width:0;white-space:nowrap;overflow-wrap:normal;max-width:none}
#rows-form .column-party{min-width:135px;max-width:180px;overflow-wrap:normal;word-break:normal}
#rows-form .column-description{min-width:200px;max-width:260px;overflow-wrap:normal;word-break:normal}
#rows-form .column-cost_category{min-width:120px;max-width:170px;overflow-wrap:normal;word-break:normal}
#rows-form td.note-cell{min-width:90px;max-width:180px;overflow-wrap:break-word}
.ledger-costi #rows-form table{max-width:none}
.ledger-costi #rows-form th{min-width:0;max-width:110px;padding-top:7px;padding-bottom:7px;line-height:1.25;word-break:normal}
.ledger-costi #rows-form td{line-height:1.3;vertical-align:middle}
#rows-form .document-actions{align-items:center}
}
@media screen{
#rows-form th[class]{white-space:normal;overflow-wrap:normal}
#rows-form td.column-description{min-width:235px;max-width:280px}
#rows-form td.column-cost_category{min-width:140px;max-width:180px}
#rows-form td.column-party{min-width:150px;max-width:190px}
#rows-form td.note-cell{min-width:145px;max-width:200px}
}

@media screen{
#rows-form th.column-number,#rows-form td.column-number{width:105px;min-width:75px;max-width:115px;white-space:normal;overflow-wrap:anywhere}
#rows-form th.column-description,#rows-form td.column-description{width:175px;min-width:150px;max-width:190px;white-space:normal;overflow-wrap:anywhere}
.table-scroll-top{height:20px;overflow-x:scroll;overflow-y:hidden;max-width:100%;margin:4px 0 5px;scrollbar-color:#638c7b #edf3f0}
.table-scroll-top>div{height:1px;pointer-events:none}
.table-scroll-top[hidden]{display:none}
}
@media print{.table-scroll-top{display:none!important}}

@media screen{.ledger-costi #rows-form tbody tr:not(:has(.empty)){height:64px}.ledger-costi #rows-form tbody td{height:64px;box-sizing:border-box}.ledger-costi #rows-form .cost-cell-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;line-height:16px;max-height:48px;overflow-wrap:anywhere}}
