/* Compact lists/forms; object cards and image galleries retain their layout. */
.compact-view .pagehead{margin-bottom:16px;gap:12px}
.compact-view .toolbar{margin-bottom:12px;gap:8px}
.compact-view .panelhead{padding:12px 16px}
.compact-view .panelbody{padding:16px}
.compact-view .compact-table th{padding:9px 12px;font-size:11px}
.compact-view .compact-table td{padding:7px 12px;vertical-align:middle;line-height:1.4;overflow-wrap:anywhere}
.compact-view .compact-table td small{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.compact-view .compact-table .button{padding:5px 9px;min-height:30px;font-size:12px}
.compact-view .compact-table td:last-child{width:1%;white-space:nowrap;text-align:right}
.compact-view .compact-table td .actions{gap:5px;min-width:0;justify-content:flex-end;flex-wrap:nowrap}
.compact-view .compact-table .deletion-footer{margin-top:2px;gap:3px}
.compact-view .compact-table .deletion-button{min-height:26px;padding:2px 6px;font-size:11px}
.compact-view .compact-table .deletion-controls{gap:3px}
.compact-notes{font-size:12px;margin:3px 0 0;max-width:44em;white-space:normal}
.compact-notes summary{cursor:pointer;color:#547360;list-style-position:inside}
.compact-notes p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.compact-calculation-note{padding:10px 14px;margin-bottom:12px;font-size:12px}
.compact-view .grid:has(> .entity-list){display:block}
.compact-dialog .modal-head{padding:14px 20px}
.compact-dialog .modal-head h2{font-size:18px}
.compact-dialog .modal-body{padding:16px 20px}
.compact-dialog .formgrid{column-gap:14px}
.compact-dialog label{margin-bottom:4px}
.compact-dialog .field{margin-bottom:10px}
.compact-dialog input:not([type=checkbox]):not([type=radio]):not([type=file]),.compact-dialog select,.compact-dialog textarea{padding:8px 10px;min-height:36px;margin-bottom:0}
.compact-dialog textarea{min-height:66px;height:76px;resize:vertical}
.compact-dialog .form-actions{padding-top:12px;margin-top:10px;gap:8px}
.compact-dialog .note{padding:10px 12px}
.compact-dialog .panelbody{padding:14px}
.compact-dialog .facts{gap:10px}
.compact-dialog .assignment-fields{padding:10px 12px;margin-bottom:10px}
.compact-dialog .assignment-flags{gap:8px}
.compact-dialog .muted{font-size:12px}
#modal.compact-dialog details{margin:8px 0}
@media(max-width:700px){
 .compact-view .tablewrap:has(> .compact-table){overflow:visible}
 .compact-view .compact-table,.compact-view .compact-table>tbody{display:block;width:100%;min-width:0}
 .compact-view .compact-table>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .compact-view .compact-table>tbody>tr{display:block;padding:10px 12px;border-bottom:1px solid #e3e8df}
 .compact-view .compact-table>tbody>tr:last-child{border-bottom:0}
 .compact-view .compact-table>tbody>tr>td{display:block;width:100%;padding:3px 0;border:0;white-space:normal;text-align:left}
 .compact-view .compact-table>tbody>tr>td[data-label]:not(:first-child):not(:last-child)::before{content:attr(data-label) ': ';font-size:11px;color:var(--muted)}
 .compact-view .compact-table>tbody>tr>td:first-child{font-size:14px}
 .compact-view .compact-table>tbody>tr>td:last-child{display:flex;width:100%;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin-top:4px}
 .compact-view .compact-table td:last-child>.deletion-footer{width:auto;margin:0}
 .compact-view .compact-table .button,.compact-view .compact-table .deletion-button{min-height:44px;padding:9px 10px;font-size:12px}
 .compact-view .compact-table td .actions{flex-wrap:wrap}
 .compact-dialog .modal-head,.compact-dialog .modal-body{padding:14px}
 .compact-dialog input:not([type=checkbox]):not([type=radio]):not([type=file]),.compact-dialog select,.compact-dialog textarea{font-size:16px;min-height:44px}
 .compact-dialog .button{min-height:44px}
}

/* Keep record deletion beside the other row actions in every list. */
#main .tablewrap > table > tbody > tr > td > .deletion-footer{
 display:inline-flex;width:auto;margin:0 0 0 6px;vertical-align:middle;
}
#main .tablewrap > table > tbody > tr > td:has(> .deletion-footer) > .actions{
 display:inline-flex;vertical-align:middle;
}
#main .tablewrap > table > tbody > tr > td:has(> .deletion-footer) > .button{
 display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;
}
#main .tablewrap > table > tbody > tr > td > .deletion-footer .deletion-button{
 display:inline-flex;align-items:center;justify-content:center;min-height:30px;
}
@media(max-width:700px){
 #main .tablewrap > table > tbody > tr > td > .deletion-footer{margin:0}
 #main .tablewrap > table > tbody > tr > td > .deletion-footer .deletion-button{min-height:44px}
}
