/* Employee directory and profile editor follow the shared LTN control scale. */
.staff-workspace-main{min-height:0;gap:0}
.staff-workspace-main>.page-heading{margin-bottom:10px}
.staff-workspace-main>.workforce-tabs{margin-bottom:12px;gap:5px;flex-wrap:wrap}
#main-content.staff-workspace-main>.staff-workspace{flex:1 1 0;min-height:340px}
.staff-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;min-width:0;padding-bottom:0}
.staff-filters{background:#fff;border:1px solid var(--border);border-radius:8px 8px 0 0;padding:16px;display:flex;flex-direction:column;gap:12px;overflow:auto;min-height:0}
.staff-filters h2{font-size:16px;line-height:1.4;font-weight:700;letter-spacing:0}
.staff-filters h3{margin-top:6px;font-size:14px;font-weight:600}
.staff-filters>.field,.staff-filter-dictionary{margin-top:6px;display:grid;gap:7px;min-width:0}
.staff-filters .check-field{margin:0;font-size:14px;gap:8px}
.staff-help{font-size:12px;color:var(--muted);line-height:1.5;margin:0}
.staff-list-panel{display:flex;flex-direction:column;min-height:0;min-width:0}
.staff-list-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.staff-search{display:flex;align-items:center;position:relative;width:360px;max-width:100%;min-width:220px;color:var(--muted)}
.staff-search>svg{position:absolute;left:10px;pointer-events:none}
.staff-search input{width:100%;padding-left:33px!important;height:34px}
.staff-footer-spacer{flex:1}
.staff-selection-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}
.staff-selection-actions:empty{display:none}
.staff-directory-scroll{flex:1;min-height:0;overflow:auto;border:1px solid var(--border);border-radius:8px 8px 0 0;background:white;scrollbar-gutter:stable}
.staff-directory-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;min-width:1000px}
.staff-directory-table th{background:#e5f0ff;font-size:12px;font-weight:600;height:38px;padding:8px 10px;border-bottom:1px solid #b8d6ff;position:sticky;top:0;z-index:2;text-align:left;white-space:nowrap}
.staff-directory-table th:first-child{width:36px}
.staff-directory-table th:nth-child(2){width:150px}
.staff-directory-table th:nth-child(3){width:115px}
.staff-directory-table th:nth-child(4){width:205px}
.staff-directory-table th:nth-child(5){width:135px}
.staff-directory-table th:nth-child(6){width:140px}
.staff-directory-table th:nth-child(7){width:145px;text-align:right}
.staff-directory-table th:nth-child(8){width:160px}
.staff-directory-row>td{padding:11px 10px;height:50px;border-bottom:1px solid var(--border);font-size:14px;line-height:1.5;vertical-align:middle;overflow-wrap:anywhere}
.staff-directory-row{cursor:pointer;outline-offset:-2px}
.staff-directory-row:hover{background:#f4f8ff}
.staff-directory-row.expanded{background:#eaf3ff}
.staff-directory-row.expanded>td{border-top:1px solid #0070f4}
.staff-code{display:flex;align-items:center;gap:9px;white-space:nowrap;font-size:12px}
.staff-avatar{width:28px;height:28px;flex:none;display:grid;place-items:center;color:#3986fa;background:#e6f0ff;border-radius:50%;overflow:hidden}
.staff-avatar>img{width:100%;height:100%;object-fit:cover}
.staff-avatar.large{height:58px;width:58px}
.staff-name{font-weight:500}
.staff-directory-row>.staff-note-cell{font-size:12px;color:var(--muted)}
.staff-empty{height:260px;text-align:center;color:var(--muted);padding:40px!important}
.staff-empty>svg{margin:0 auto 16px;color:#75a5f5}
.staff-empty>strong,.staff-empty>span{display:block;margin-top:8px}
.staff-list-footer{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#fff;border:1px solid var(--border);border-top:0;padding:10px 12px;font-size:12px;min-height:49px}
.staff-list-footer select{width:90px;min-height:30px;height:30px;padding:3px 8px}
.staff-list-footer .button{min-width:28px;min-height:28px;padding:4px}
.staff-detail-row>td{padding:0;border-bottom:2px solid #0070f4;white-space:normal}
.staff-inline-details{min-width:0;background:white}
.staff-detail-tabs,.staff-editor-tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--border);padding:0 12px;overflow:auto;flex:none}
.button.staff-detail-tab,.button.staff-editor-tab{border:0;border-radius:0;background:transparent;min-height:42px;border-bottom:2px solid transparent;padding:10px 12px;color:var(--muted);font-weight:500;box-shadow:none}
.button.staff-detail-tab.active,.button.staff-editor-tab.active{color:#0070f4;border-bottom-color:#0070f4}
.staff-detail-body{padding:20px;min-height:180px}
.staff-detail-identity{display:flex;gap:12px;align-items:center;margin-bottom:20px}
.staff-detail-identity strong{font-size:16px}
.staff-detail-identity .staff-state{margin-left:auto}
.staff-state{font-size:12px;border-radius:4px;padding:4px 8px;background:#f0f3f8;color:var(--muted)}
.staff-state.active{background:#e8f8ef;color:#00825d}
.staff-facts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 24px}
.staff-fact{min-width:0;border-bottom:1px solid #e4e9f0;padding-bottom:10px}
.staff-fact small{display:block;font-size:12px;line-height:1.5;color:var(--muted);margin-bottom:6px}
.staff-fact div{font-size:14px;line-height:1.5;min-height:21px;overflow-wrap:anywhere}
.staff-detail-note{font-size:14px;white-space:pre-wrap;margin-top:18px;overflow-wrap:anywhere}
.staff-detail-footer{display:flex;align-items:center;gap:8px;border-top:1px solid var(--border);padding:10px 16px}
.staff-detail-table-scroll{overflow:auto;margin-bottom:14px}
.staff-detail-table{border-collapse:collapse;width:100%;table-layout:auto;min-width:600px}
.staff-detail-table th,.staff-detail-table td{position:static;padding:10px 12px;border-bottom:1px solid var(--border);font-size:14px;text-align:left;width:auto!important}
.staff-detail-table th{font-size:12px;background:#f5f7fa;height:36px}
.staff-detail-empty{height:100px;text-align:center!important;color:var(--muted)}
.staff-field-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:500;min-height:20px;font-size:14px}
.button.staff-text-button{font-weight:500;border:0;box-shadow:none;background:transparent;color:#0070f4;padding:0;min-height:22px;font-size:12px;white-space:nowrap}
.staff-branch-picker{display:grid;gap:6px;min-width:0}
.staff-branch-picker select{width:100%;min-width:0}
.staff-branch-chips{display:flex;flex-wrap:wrap;gap:5px;min-width:0}
.staff-branch-chips:empty{display:none}
.staff-branch-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;font-size:12px;line-height:1.5;border-radius:4px;background:#e8f1ff;color:#175dc0;padding:3px 5px;overflow-wrap:anywhere}
.staff-branch-chip .button{border:0;min-height:16px;min-width:16px;padding:0;background:transparent;color:inherit}
dialog.staff-employee-dialog{width:min(1000px,calc(100vw - 32px));height:min(840px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden}
.staff-employee-dialog #dialog-content{height:100%;display:flex;flex-direction:column;min-height:0}
.staff-employee-dialog>.dialog-header,.staff-employee-dialog .dialog-header{flex:none;min-height:62px;padding:14px 20px}
.staff-employee-dialog .dialog-header h2{font-size:20px;line-height:1.3}
.staff-employee-dialog .dialog-header h2 small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:4px}
.staff-employee-dialog #dialog-content>.dialog-body{flex:1;min-height:0;overflow:hidden;padding:0;display:flex}
.staff-editor-form{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;gap:0!important}
.staff-editor-tabs{padding:0 16px;background:white}
.staff-editor-scroll{flex:1;min-height:0;overflow:auto;padding:14px 16px;background:#f3f5f8;scrollbar-gutter:stable}
.staff-editor-info,.staff-salary-editor{display:grid;gap:12px}
.staff-editor-card{background:white;border:1px solid #e3e7ee;border-radius:8px;padding:16px;min-width:0}
.staff-editor-card>h3{margin-bottom:18px;font-size:14px;font-weight:600}
.staff-initial-layout{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:20px;align-items:start}
.staff-editor-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;min-width:0}
.staff-editor-two>.field,.staff-editor-two .field{min-width:0}
.staff-span-two{grid-column:1/-1;min-width:0}
.staff-editor-card :is(input:not([type=checkbox],[type=radio],[type=file]),select){width:100%;min-width:0;min-height:34px;height:34px}
.staff-editor-card .field{display:grid;gap:6px}
.staff-editor-card .field>span{font-weight:500;font-size:14px;line-height:20px}
.staff-editor-card .field>small{font-size:12px;line-height:1.5;font-weight:400;color:var(--muted)}
.staff-labeled-field{display:grid;gap:6px;align-content:start}
.staff-photo-area{text-align:center;display:grid;justify-items:center;gap:8px;padding-top:8px}
.staff-photo-circle{border:1px dashed #ccd8e8;background:#f3f6fa;border-radius:50%;width:140px;height:140px;position:relative;display:grid;place-content:center;color:#81aff8;overflow:hidden}
.staff-photo-circle>img{height:140px;width:140px;position:absolute;inset:0;object-fit:cover}
.staff-photo-circle>.ltn-icon{margin:auto auto 8px}
.staff-photo-circle .staff-photo-button{position:relative;z-index:1;font-size:12px;min-height:30px;padding:5px 10px}
.staff-collapsible{padding:0}
.staff-collapsible>summary{font-size:14px;font-weight:600;padding:15px 16px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;list-style:none}
.staff-collapsible>summary::-webkit-details-marker{display:none}
.staff-collapsible>summary:after{content:'⌄';color:var(--muted);font-size:18px;line-height:1}
.staff-collapsible[open]>summary:after{transform:rotate(180deg)}
.staff-collapsible-body{padding:3px 16px 16px}
.staff-read-field{min-height:34px;padding:7px 0;font-size:12px;line-height:20px;color:var(--muted);overflow-wrap:anywhere}
.staff-account-field{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-height:34px;font-size:12px}
.staff-account-chip{font-size:14px;padding:5px 8px;border-radius:4px;background:#f1f5fc}
.staff-editor-footer{display:flex;gap:8px;align-items:center;padding:12px 20px;border-top:1px solid var(--border);background:white;flex:none;order:10}
.staff-editor-form>.form-error{order:9;margin:0;padding:8px 16px;flex:none;max-height:80px;overflow:auto}
.staff-editor-section-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:14px}
.staff-editor-section-heading h3{font-size:14px;font-weight:600;margin:0}
.staff-editor-section-heading p{font-size:12px;color:var(--muted);line-height:1.5;margin-top:5px}
.staff-editor-section-heading:has(+[hidden]){margin-bottom:0}
.staff-editor-card input[role=switch]{appearance:none;width:34px!important;height:20px!important;min-height:20px!important;border:0!important;border-radius:15px!important;background:#b8c3d2;position:relative;flex:none;cursor:pointer;margin:0}
.staff-editor-card input[role=switch]:checked{background:#0070f4}
.staff-editor-card input[role=switch]:after{content:'';position:absolute;width:16px;height:16px;border-radius:50%;background:white;left:2px;top:2px;box-shadow:0 1px 3px #0002}
.staff-editor-card input[role=switch]:checked:after{left:16px}
.staff-pay-base{display:grid;grid-template-columns:200px minmax(200px,350px);gap:20px;align-items:start}
.staff-pay-rate{position:relative}
.staff-pay-rate>input{padding-right:78px!important;text-align:right}
.staff-pay-unit{position:absolute;right:10px;top:9px;font-size:12px;color:var(--muted);pointer-events:none}
.staff-pay-section-body,.staff-bonus-variable,.staff-pay-extras{display:grid;gap:14px}
.staff-pay-section-body>.field{max-width:360px}
.staff-pay-table-scroll{overflow:auto;border-radius:5px;border:1px solid var(--border)}
.staff-pay-table{width:100%;border-collapse:collapse;min-width:540px}
.staff-pay-table th{padding:9px 12px;background:#f1f3f6;font-size:12px;font-weight:600;text-align:left}
.staff-pay-table td{padding:8px 12px;border-top:1px solid var(--border)}
.staff-pay-table th:last-child{width:50px}
.staff-tier-reward{display:flex;align-items:center;gap:8px}
.staff-tier-reward>select{width:140px;flex:none}
.staff-tier-reward>input{width:140px;max-width:100%}
.staff-extra-rows,.staff-commission-rows{display:grid;gap:10px}
.staff-extra-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,.5fr) auto;gap:10px}
.staff-commission-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start}
.staff-commission-row .staff-help{display:block;margin-top:4px}
.staff-pay-extras>strong{font-size:12px;color:var(--muted);font-weight:500}
.staff-salary-editor .staff-help{margin-top:0}
.staff-template-header{display:grid;grid-template-columns:1fr 180px;gap:20px;margin-bottom:14px}
dialog.staff-salary-template-dialog{width:min(900px,calc(100vw - 32px))}
.staff-child-dialog{width:min(440px,calc(100vw - 32px));border:1px solid var(--border);border-radius:10px;padding:0;max-height:calc(100dvh - 32px);box-shadow:0 18px 70px #182b4c33}
.staff-child-dialog::backdrop{background:#15233b40}
.staff-child-dialog>.dialog-header{padding:14px 18px}
.staff-child-dialog h2{font-size:18px}
.staff-child-dialog>.dialog-body{padding:18px}
.staff-child-dialog form{display:grid;gap:14px}
.staff-child-dialog p{line-height:1.6}
.staff-child-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
:is(.staff-editor-form,.staff-salary-editor,.staff-child-dialog) [hidden]{display:none!important}
@media(min-width:901px){.layout>.main-column>#main-content.staff-workspace-main{overflow:hidden;min-height:0}.staff-workspace-main>.workforce-tabs .tag-tab{padding:6px 9px;min-height:32px}}
@media(max-width:1100px){.staff-workspace{grid-template-columns:190px minmax(0,1fr);gap:10px}.staff-filters{padding:12px}.staff-list-toolbar>.staff-search{width:100%}.staff-list-toolbar>.staff-footer-spacer{display:none}.staff-facts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.staff-workspace{grid-template-columns:1fr}.staff-filters{max-height:260px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.staff-filters>h2,.staff-filters>.staff-help,.staff-filters>h3{grid-column:1/-1}.staff-directory-scroll{max-height:65dvh;min-height:300px}.staff-initial-layout{grid-template-columns:1fr 110px;gap:12px}.staff-photo-circle,.staff-photo-circle>img{width:100px;height:100px}.staff-initial-layout>.staff-editor-two{grid-template-columns:1fr}.staff-editor-two{gap:12px}.staff-pay-base{grid-template-columns:1fr}.staff-editor-card{padding:12px}.staff-collapsible{padding:0}.staff-editor-footer{padding:10px 12px}.staff-editor-footer>.button:first-child{max-width:160px;white-space:normal;font-size:12px}.staff-template-header{grid-template-columns:1fr}.staff-extra-row{grid-template-columns:minmax(0,1fr) 110px auto}.staff-list-footer{gap:8px}.staff-detail-body{padding:14px}}
@media(max-width:460px){.staff-editor-two,.staff-facts-grid{grid-template-columns:1fr}.staff-span-two{grid-column:1}.staff-editor-scroll{padding:10px}.staff-editor-footer{gap:6px}.staff-editor-tabs{padding:0 6px}}

/* Keep text centered in the compact controls, including shared currency wrappers. */
:root body :is(.staff-editor-card,.staff-filters,.staff-child-dialog,.staff-template-header) :is(input:not([type=checkbox],[type=radio],[type=file],[type=hidden]),select){height:34px;min-height:34px;padding:6px 10px;line-height:20px;border:1px solid var(--ltn-control-border,#cdd3dc);border-radius:6px;background-color:#fff;box-shadow:none}
:root body :is(.staff-editor-card,.staff-filters,.staff-child-dialog) select{padding-right:28px}
:root body .staff-search>input{height:34px;min-height:34px;line-height:20px;padding:6px 10px 6px 33px!important;appearance:none;border:1px solid var(--ltn-control-border,#cdd3dc);border-radius:6px;box-shadow:none;background:#fff}
:root body .staff-pay-rate>.currency-control input:not([type=hidden]){padding-right:82px}
.staff-pay-rate>.currency-control{width:100%;min-width:0}
.staff-tier-reward>.currency-control{width:140px;flex:1;min-width:80px}
:root body .staff-tier-reward>select{width:140px;flex:none}
:root body .staff-directory-table .staff-pay-table td{background:#fff}
