/* Users table only: preserve full text on each existing information line. */
html body #content .user-access-table{overflow-x:auto!important;max-width:100%;-webkit-overflow-scrolling:touch}
html body #content .user-access-table table{table-layout:auto!important;width:100%!important;min-width:1440px}
html body #content .user-access-table :is(th,td,td *){white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;text-overflow:clip!important;max-width:none!important}
html body #content .user-access-table :is(th,td){width:auto!important;overflow:visible!important}
html body #content .user-access-table .module-tags{display:flex;flex-wrap:wrap!important;width:auto;min-width:360px;max-width:900px!important;gap:6px;justify-content:center}
html body #content .user-access-table .user-security-actions{display:table-cell!important;width:auto!important;min-width:310px;max-width:none!important;white-space:normal!important}
html body #content .user-access-table :is(.module-tags span,.user-security-actions button){flex-shrink:0}
/* Separate access and editing controls inside each module card. */
.module-permission-grid .module-permission-item{border:1px solid #dbe6df;border-radius:9px;background:#fff;min-width:0;padding:10px}
.module-permission-grid .module-permission-item:has(.module-access-toggle input:checked){border-color:#148451;background:#edf8f1}
.module-permission-grid .module-permission-item label{border:0!important;background:transparent!important;padding:3px 0!important;border-radius:0;cursor:pointer}
.module-permission-grid .module-edit-toggle{margin-top:8px;font-size:.72rem;font-weight:650;line-height:1.4}
.module-permission-grid .module-edit-toggle:has(input:disabled){opacity:.6}
.module-permission-grid .module-edit-toggle input{flex:0 0 18px}
/* Keep the user editor actions visible while only the fields scroll. */
html body #full-user-modal{padding:0!important;overflow:hidden!important}
html body #full-user-modal #full-user-form{display:flex;flex-direction:column;height:min(860px,calc(92dvh - 2px));max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:0;margin:0}
html body #full-user-modal .modal-head{flex:0 0 auto}
html body #full-user-modal .full-user-grid{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html body #full-user-modal .modal-actions{flex:0 0 auto;position:relative;background:#fff;border-top:1px solid #d7e3dc;z-index:1;margin:0}
html body #full-user-modal #save-full-user{min-height:44px;white-space:nowrap}

/* Listing separators and centered content; action cells retain table layout. */
html body #content .user-access-table{border:1px solid #b8cdc1;border-radius:12px}
html body #content .user-access-table table{border-collapse:separate!important;border-spacing:0}
html body #content .user-access-table :is(th,td){border:0;border-right:0!important;border-bottom:1px solid #b8cdc1!important;padding:12px 14px!important;height:auto!important;text-align:center!important}
html body #content .user-access-table :is(th,td):last-child{border-right:0!important}
html body #content .user-access-table tbody tr:last-child td{border-bottom:0!important}
html body #content .user-access-table thead th{background:#edf5f0!important}
html body #content .user-access-table tbody tr:nth-child(odd){background:#fff}
html body #content .user-access-table tbody tr:nth-child(even){background:#f3f8f5}
html body #content .user-access-table tbody td{background-color:inherit!important;vertical-align:middle}
html body #content .user-access-table td:nth-child(5){min-width:360px!important;width:45%!important}
html body #content .user-access-table td:nth-child(6){min-width:310px!important}
html body #content .user-access-table .module-tags span{display:inline-flex;align-items:center;min-height:26px;padding:4px 8px;border:1px solid #b8cdc1;border-radius:999px;background:#eaf4ed;color:#185e40;line-height:1.25}
html body #content .user-access-table .user-security-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:5px 8px;line-height:1.25;margin:3px}

html body #content .user-access-table td :is(strong,small,span,button){text-align:center!important}
/* Override the general unit-name justification only in the Users listing. */
html body #content .user-access-table table > tbody > tr > td[data-unit-name-column="true"]{text-align:center!important;text-align-last:center!important;text-justify:auto}
html body #content .user-access-table :is(th,td,td strong,td small,td span){text-align-last:center!important}
html body #content .user-access-table .module-tags{margin-inline:auto}
