/* Scoped to employee management; other case, fee and master-data tables are unchanged. */
.personnel-removal-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:26px;border:1px solid #dce3ed;border-radius:14px;color:#263750;background:#fff}
.personnel-removal-dialog::backdrop{background:#15263b88}
.personnel-removal-dialog h2{margin:0 0 16px;font-size:21px;line-height:1.5;overflow-wrap:anywhere}
.personnel-removal-intro,.personnel-removal-help,.personnel-removal-dialog [role=status]{font-size:13px;line-height:1.8;color:#64748b}
.personnel-removal-field{display:grid;gap:8px;margin:20px 0;font-size:14px;font-weight:700}
.personnel-removal-field input{box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}
.personnel-removal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.personnel-removal-actions button{min-height:44px}
@media(max-width:600px){
 #employees .employee-table table,#employees .employee-table tbody{display:block;min-width:0;width:100%}
 #employees .employee-table thead{display:none}
 #employees .employee-table tr{display:block;padding:14px 12px;border-bottom:1px solid #e5eaf1}
 #employees .employee-table td{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px;border:0;padding:6px 0;white-space:normal;overflow-wrap:anywhere}
 #employees .employee-table td::before{content:attr(data-label);font-size:12px;font-weight:600;color:#64748b}
 #employees .employee-table td[colspan]{display:block;padding:12px 0}
 #employees .employee-table td[colspan]::before{display:none}
 #employees .employee-actions{gap:7px;align-items:stretch}
 #employees .employee-actions .btn{min-height:44px;white-space:normal;flex:1 1 100px}
 .personnel-removal-dialog{padding:20px}
 .personnel-removal-actions{flex-direction:column-reverse}
 .personnel-removal-actions button{width:100%}
}
/* One same-page management dialog. Styles intentionally do not target legacy case tables. */
.personnel-management-dialog{box-sizing:border-box;width:min(880px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce3ed;border-radius:16px;color:#263750;background:#fff;overflow:auto;overscroll-behavior:contain}
.personnel-management-dialog::backdrop{background:#15263b88}
.personnel-management-dialog *{box-sizing:border-box;min-width:0}
.personnel-management-dialog [hidden]{display:none!important}
.personnel-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:24px 26px 16px}
.personnel-dialog-head h2{font-size:21px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.personnel-dialog-head p{font-size:13px;line-height:1.7;margin:7px 0 0;color:#64748b;overflow-wrap:anywhere}
.personnel-dialog-head>button{flex:0 0 auto;min-height:44px}
.personnel-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:0 26px 14px;border-bottom:1px solid #e5eaf1}
.personnel-tabs button{min-height:44px;padding:8px;border:1px solid #dce3ed;border-radius:8px;background:white;color:#52627a;font:inherit;font-size:13px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.personnel-tabs button[aria-selected=true]{background:#edf2ff;border-color:#9eb3e7;color:#284aa4;font-weight:700}
.personnel-tabs button:focus-visible,.personnel-management-dialog .btn:focus-visible{outline:3px solid #9baeff;outline-offset:2px}
.personnel-dialog-body{padding:18px 26px 26px}
.personnel-dialog-body h3{font-size:15px;line-height:1.6;margin:10px 0}
.personnel-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;margin:0 0 22px}
.personnel-fields>div{padding:12px 0;border-bottom:1px solid #eef1f5}
.personnel-fields dt{font-size:12px;font-weight:600;line-height:1.6;color:#718096}
.personnel-fields dd{margin:5px 0 0;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.personnel-help,.personnel-empty,.personnel-management-dialog [role=status],.personnel-management-dialog [role=alert]{font-size:13px;line-height:1.8;color:#64748b;overflow-wrap:anywhere}
.personnel-empty{padding:14px 0}
.personnel-warning{padding:14px;border:1px solid #f0d4c7;background:#fff8f2;color:#8c4b28;border-radius:9px;font-size:13px;line-height:1.8;overflow-wrap:anywhere}
.personnel-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}
.personnel-management-dialog .btn{min-height:44px;white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.6}
.personnel-files{display:grid;gap:10px}
.personnel-files article{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;border:1px solid #e3e9f2;border-radius:10px}
.personnel-files h3{margin:0}.personnel-files p{font-size:12px;color:#718096;margin:5px 0 0;overflow-wrap:anywhere}.personnel-files button{flex-shrink:0}
[data-personnel-preview]{border-top:1px solid #e3e9f2;margin-top:22px;padding-top:16px}
[data-personnel-preview] iframe{display:block;width:100%;height:55vh;min-height:280px;margin-top:14px;border:1px solid #e3e9f2;border-radius:8px}
[data-personnel-preview] img{display:block;max-width:100%;height:auto;margin:14px auto}
.personnel-management-dialog [role=status]:empty{display:none}
@media(max-width:600px){
 .personnel-management-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:12px}
 .personnel-dialog-head{padding:18px 16px 12px;gap:8px}.personnel-dialog-head h2{font-size:18px}.personnel-dialog-head>button{padding:8px 10px}
 .personnel-tabs{padding:0 12px 12px;gap:4px}.personnel-tabs button{padding:9px 3px;font-size:12px}
 .personnel-dialog-body{padding:12px 16px 20px}.personnel-fields{grid-template-columns:minmax(0,1fr);gap:0}
 .personnel-actions{flex-direction:column;align-items:stretch}.personnel-files article{align-items:stretch;flex-direction:column;padding:14px}.personnel-files button{width:100%}
 .personnel-removal-dialog input[type=date]{max-width:100%}
}

#employees .card-head{flex-wrap:wrap;gap:8px}
#employees .card-head>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){#employees .card-head{align-items:flex-start}#employees #employeeCount{flex-basis:100%;line-height:1.8}#employeeDlg .mf,#bulkTransferDlg .mf{min-width:0}#employeeDlg input,#employeeDlg select,#bulkTransferDlg input,#bulkTransferDlg select{min-width:0;max-width:100%}}

/* Shared role ordering for the two roster lists; mobile tables hide headers. */
#employees .personnel-role-sort{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;margin-left:6px;padding:4px 8px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#3453a2;font:inherit;cursor:pointer;vertical-align:middle}
#employees .personnel-role-sort:focus-visible{outline:3px solid #9baeff;outline-offset:2px}
#employees .personnel-role-sort-mobile{display:none}
@media(max-width:600px){#employees .personnel-role-sort-mobile{display:flex;justify-content:flex-end;margin:0 0 12px}#employees .personnel-role-sort-mobile .personnel-role-sort{min-height:44px;margin:0}}

/* Current-role transition is distinct from retained contract terms. */
.personnel-role-transition{border-top:1px solid #e5eaf1;padding-top:16px;margin:18px 0;min-width:0}
.personnel-role-transition>label{display:grid;gap:8px;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.personnel-role-transition select{display:block;width:100%;max-width:100%;min-width:0;min-height:44px;padding:10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;background:#fff}
.personnel-role-transition .personnel-role-confirm{display:flex;align-items:flex-start;gap:10px;margin:14px 0}
.personnel-role-confirm input{width:18px;height:18px;flex:0 0 18px;margin-top:3px}
.personnel-role-transition>button{max-width:100%}
