/* Presentation only. Do not hide text, controls, or alter financial state. */
.shell{grid-template-columns:240px minmax(0,1fr)}
main,#app,.heading>div,.filters,.metric,.card{min-width:0}
main{max-width:1600px;padding:26px 32px 48px}
#app{max-width:none}
main>header{gap:16px;flex-wrap:wrap;padding-bottom:14px;margin-bottom:18px}
main>header #title{font-size:24px;line-height:1.3}
.viewer{display:flex;flex-wrap:wrap;align-items:center;gap:8px;line-height:1.5}
#app>.heading:first-child{padding:14px 16px;margin-bottom:14px;gap:12px}
#app>.heading:first-child>div:first-child{min-width:0;flex:1 1 240px}
#app>.heading:first-child>div:last-child:has(button,select,input){flex:0 1 auto;max-width:100%;margin-left:auto}
.heading{gap:12px;align-items:center;margin:22px 0 10px}
.heading h2{font-size:18px;line-height:1.4}
.heading p{font-size:13px;line-height:1.5;max-width:none}
.heading>div:has(>button),.heading>div:has(>select){display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;padding:12px 14px}
.filters>label,.filters>.field{min-width:0}
.filters label,.field>label,.cq-main>label,.cq-advanced-fields>label{line-height:1.4;word-break:keep-all}
.filters label:has(>input:not([type=checkbox])),.filters label:has(>select){display:grid;gap:5px;margin:0}
.filters input:not([type=checkbox]):not([type=radio]),.filters select,.filters button,
.cq-main input,.cq-main select,.cq-main button,.cq-advanced-fields input,.cq-advanced-fields select,
.heading input:not([type=checkbox]),.heading select,.heading button{min-height:38px;box-sizing:border-box;font-size:13px}
.filters input:not([type=checkbox]):not([type=radio]),.filters select{border:1px solid #cfdacf;border-radius:8px;padding:7px 10px;background:white;max-width:100%}
.filters label:has(>[type=checkbox]){display:flex;align-items:center;gap:6px;min-height:38px;white-space:nowrap}
.filters button,.heading button,.uq-status button{white-space:nowrap}
.filters .multi-client-filter{min-height:38px}
.filters .multi-client-filter>summary{min-height:40px;display:flex;align-items:center;padding-top:8px;padding-bottom:8px}
.filters .multi-client-filter>summary::before{content:'▸';margin-right:6px}
.filters .multi-client-filter[open]>summary::before{content:'▾'}
.compact-query .cq-main{align-items:center}
.compact-query .cq-main>label{display:flex!important;flex-wrap:nowrap;white-space:nowrap;gap:8px}
.compact-query .cq-client{flex:0 1 220px}.compact-query .cq-search{flex:1 1 230px}
.metrics{gap:12px;margin-bottom:14px}
.metric{padding:14px 16px}
.metric .number{font-size:24px;margin-top:6px;line-height:1.25}
.metric .sub{margin-top:5px;line-height:1.5}
.notice{padding:10px 13px;font-size:13px;line-height:1.5;margin-bottom:14px;overflow-wrap:anywhere}
.accountant-section-tabs{grid-template-columns:repeat(5,minmax(0,1fr))!important;align-items:stretch;gap:8px!important}
.accountant-section-tabs button{min-width:0;min-height:44px!important;gap:6px!important;padding:9px 10px!important;font-size:13px;line-height:1.4}
.accountant-section-tabs button strong{word-break:keep-all}
.accountant-section-tabs button span{white-space:nowrap}
#app:has([data-accountant-section]) > .compact-metrics{width:auto;gap:0}
#app:has([data-accountant-section]) > .compact-metrics .metric{flex:0 1 auto;flex-wrap:wrap;column-gap:8px;row-gap:3px;align-items:baseline;padding:10px 14px}
#app:has([data-accountant-section]) > .compact-metrics .metric .sub{display:block;flex:0 0 100%;font-size:12px;line-height:1.4}
.layout-table-container{max-width:100%;min-width:0;overflow:auto;overscroll-behavior-x:contain}
table.layout-aligned-table{font-size:13px}
table.layout-aligned-table th,table.layout-aligned-table td{padding:10px 12px;vertical-align:middle;line-height:1.5}
table.layout-aligned-table th{white-space:nowrap!important}
table.layout-aligned-table th.layout-col-long{white-space:nowrap!important}
table.layout-aligned-table .layout-col-money{text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}
table.layout-aligned-table .layout-col-date,table.layout-aligned-table .layout-col-name,table.layout-aligned-table .layout-col-status{white-space:nowrap!important;word-break:keep-all!important}
table.layout-aligned-table .layout-col-id{white-space:nowrap!important;word-break:keep-all!important}
table.accountant-business-table{min-width:1240px}
table.accountant-business-table th:nth-child(4),table.accountant-business-table td:nth-child(4){width:160px!important;min-width:140px!important;max-width:220px!important}
table.layout-aligned-table .layout-col-status{text-align:center}
table.layout-aligned-table .layout-col-long{white-space:normal!important;word-break:normal;overflow-wrap:anywhere}
.ledger-compact-main .ledger-compact-table .cl-cell{padding:10px 12px!important}
.ledger-compact-main .ledger-compact-table .cl-date,.ledger-compact-main .ledger-compact-table .cl-paid-date{width:110px!important}
.ledger-compact-main .ledger-compact-table .cl-project{width:160px!important}
.ledger-compact-main .ledger-compact-table{min-width:1040px!important}
.ledger-compact-main .ledger-compact-table .cl-company{width:200px!important;min-width:160px!important}
.ledger-compact-main .ledger-compact-table .cl-company strong,.ledger-compact-main .ledger-compact-table .cl-money strong{font-size:14px!important}
.ledger-compact-main .cl-project span,.ledger-compact-main .cl-company strong{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
.date-sort-toolbar label{display:flex;align-items:center;gap:8px;white-space:nowrap}
.fields{gap:12px;align-items:start}
.field input,.field select{min-height:40px;font-size:14px}
.field textarea{font-size:14px;line-height:1.5}
#dialog.batch-project-dialog .batch-project-grid{align-items:start!important}
.batch-project-grid>label{display:flex;flex-direction:column;gap:6px;min-width:0}
.batch-project-grid>label input,.batch-project-grid>label select{height:42px;min-height:42px;box-sizing:border-box;margin:0}
@media(min-width:1200px){.accountant-section-tabs button strong{white-space:nowrap}}
@media(max-width:1100px){
 main{padding:24px 20px 40px}
 .accountant-section-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .filters.accountant-unified-filters .tax-month-filter{min-width:160px}
}
@media(max-width:800px){
 .shell{grid-template-columns:minmax(0,1fr)}
 main{padding:20px 16px 36px}
 main>header #title{font-size:22px}
 #nav{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px 8px}
 #nav .nav-group{flex:1 1 100px;margin:0;min-width:0}
 #nav .nav-group summary{white-space:nowrap;padding:9px 6px;font-size:13px}
 #nav .nav-group[open]{flex-basis:100%;order:1}
 #nav .nav-group[open] summary{padding-bottom:5px}
 #nav .nav-group .nav{display:inline-block;width:auto;white-space:nowrap;padding:9px 10px;text-align:left;font-size:13px}
 main>header .viewer{max-width:100%;font-size:12px}
 #app>.heading:first-child>div:last-child:has(button,select,input){min-width:0;display:flex;flex-wrap:wrap}
 .heading input[type=search]{min-width:0}
 .accountant-section-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .filters>*{max-width:100%}
 .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
 .heading h2{font-size:17px}
 .filters{gap:10px}
 .filters>label,.filters>.field{flex:1 1 140px;width:auto!important}
 .filters.accountant-unified-filters .tax-month-filter{min-width:0}
 .compact-query .cq-main>label{flex:1 1 100%!important}
 .compact-query .cq-main .multi-month-control{flex:1 1 100%}
 .metrics{grid-template-columns:1fr}
 #app:has([data-accountant-section]) > .compact-metrics .metric{flex:1 1 145px;padding:10px}
 .accountant-section-tabs button{padding:9px!important;font-size:13px}
 #dialog .batch-expense-grid,#dialog.batch-project-dialog .batch-project-grid{grid-template-columns:minmax(0,1fr)!important}
 .batch-expense-toolbar,.batch-project-toolbar{flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:10px}
 .batch-expense-toolbar>div:first-child,.batch-project-toolbar>div:first-child{flex:1 1 100%;min-width:0}
 #dialog .modal-head{gap:10px;align-items:flex-start}
 #dialog .modal-head h2{font-size:20px;line-height:1.4;min-width:0;word-break:keep-all;overflow-wrap:anywhere}
 #dialog .modal-head>button{flex-shrink:0}
 #dialog .modal-actions{display:flex;flex-wrap:wrap;gap:8px}
 #dialog .modal-actions button{flex:1 1 auto;min-width:0;max-width:100%;font-size:13px;white-space:normal;word-break:keep-all}
}
