/* Staff directory, profile and grouped editor. Shared modal/permission rules remain authoritative. */
.staff-workspace,.staff-profile-workspace{min-width:0}
.staff-directory-filters{display:grid;grid-template-columns:minmax(220px,2.1fr) repeat(3,minmax(125px,1fr));gap:13px;align-items:end;margin:18px 0 12px}
.staff-directory-filters label{display:grid;gap:7px;min-width:0;font-size:12px;color:var(--muted)}
.staff-directory-filters input,.staff-directory-filters select{width:100%;min-width:0;background:var(--soft);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:11px 12px}
.staff-directory-scope,.staff-workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}
.staff-directory-scope{font-size:12px;color:var(--muted);margin-bottom:18px}
.staff-directory-scope p{margin:0}.staff-directory-scope button{font-size:12px}
.staff-workspace-heading small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:5px}
.staff-workspace-heading button{font-size:12px}
.staff-cost-disclosure{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:13px 0;margin-bottom:17px}
.staff-cost-disclosure .staff-workspace-heading>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.staff-cost-disclosure .staff-workspace-heading small{margin:0}
.staff-cost-disclosure .staff-salary-totals{margin-top:15px;margin-bottom:0;border:0;background:transparent;padding:0}
.staff-recorded-summary{display:flex;align-items:center;gap:15px;flex-wrap:wrap;padding:12px 15px;background:var(--soft);border:1px solid var(--line);border-radius:8px;margin-bottom:20px;font-size:12px;color:var(--muted)}
.staff-recorded-summary label{display:flex;align-items:center;gap:10px;min-width:0}
.staff-recorded-summary input{border:1px solid var(--line);border-radius:7px;background:var(--soft);color:var(--ink);padding:6px 9px;width:163px;min-width:0;max-width:100%;color-scheme:dark}
.staff-recorded-summary strong{color:var(--ink);font-variant-numeric:tabular-nums}
.staff-directory{border-top:1px solid var(--line);min-width:0}
.staff-directory-head,.staff-directory-row{display:grid;grid-template-columns:minmax(220px,2.2fr) minmax(135px,1.1fr) minmax(80px,.7fr) minmax(105px,.9fr) minmax(140px,1.15fr);align-items:center;gap:16px;min-width:0}
.staff-directory-head{font-size:10px;letter-spacing:.6px;text-transform:uppercase;color:var(--muted);padding:12px 10px}
.staff-directory-head>span:nth-last-child(-n+2){text-align:right}
.staff-directory-row{padding:18px 10px;border-bottom:1px solid var(--line)}
.staff-directory-row:hover{background:color-mix(in srgb,var(--soft) 65%,transparent)}
.staff-directory-no-attendance .staff-directory-head,.staff-directory-no-attendance .staff-directory-row{grid-template-columns:minmax(220px,2.2fr) minmax(140px,1.2fr) minmax(90px,.7fr) minmax(140px,1.15fr)}
.staff-directory-no-pay .staff-directory-head,.staff-directory-no-pay .staff-directory-row{grid-template-columns:minmax(220px,2.2fr) minmax(140px,1.2fr) minmax(90px,.7fr) minmax(110px,1fr)}
.staff-directory-no-pay.staff-directory-no-attendance .staff-directory-head,.staff-directory-no-pay.staff-directory-no-attendance .staff-directory-row{grid-template-columns:minmax(220px,2.2fr) minmax(140px,1.2fr) minmax(90px,.7fr)}
.staff-directory-person{display:flex;align-items:center;gap:12px;min-width:0}
.staff-directory-person>div{min-width:0}.staff-directory-person .text-button{white-space:normal;text-align:left;padding:0;overflow-wrap:anywhere;font-size:13px}
.staff-person-initial{display:grid;place-items:center;flex:none;width:34px;height:38px;border-radius:8px;background:var(--soft);color:var(--blue,#83b8ef);font-size:15px}
.staff-directory-row small{display:block;margin-top:4px;font-size:11px;color:var(--muted);overflow-wrap:anywhere;line-height:1.45}
.staff-directory-department,.staff-directory-work,.staff-directory-pay{font-size:12px;min-width:0;overflow-wrap:anywhere}
.staff-directory-work,.staff-directory-pay{text-align:right;font-variant-numeric:tabular-nums}
.staff-directory-work strong,.staff-directory-pay strong{font-weight:500}
.staff-rate-hint{font-size:10px!important}
.staff-state{display:inline-flex;gap:5px;align-items:center;white-space:normal;border-radius:5px;padding:4px 8px;font-size:11px;color:var(--muted);background:var(--soft)}
.staff-state-active{color:#8ad2ab;background:#223d32}
.staff-state-current{color:#9ac5ff;background:#243a56}
.staff-state-upcoming{color:#f2c778;background:#413722}
.staff-state-void{color:#c4a3a0;background:#382a2b}
.staff-profile-identity{display:flex;align-items:flex-start;gap:14px;min-width:0;margin-bottom:20px}
.staff-profile-identity .staff-person-initial{width:43px;height:45px;font-size:19px}
.staff-profile-name{flex:1;min-width:0}.staff-profile-name h3{font-size:20px;line-height:1.35;overflow-wrap:anywhere}
.staff-profile-name p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.staff-profile-identity>.staff-state{flex:none}
#dialog:has(.staff-profile-workspace),#dialog:has(.staff-editor-layout){width:1160px;max-width:calc(100vw - 36px)}
.staff-profile-workspace .staff-profile-controls{border-bottom:1px solid var(--line);padding-bottom:15px;gap:15px;align-items:center;margin-bottom:20px}
.staff-profile-workspace .staff-tabs{min-width:0}
.staff-profile-workspace .staff-tabs button{font-size:12px;min-height:40px;white-space:normal}
.staff-profile-workspace .staff-overview-grid{grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:11px;margin:16px 0}
.staff-profile-workspace .staff-overview-card{padding:16px;gap:8px}
.staff-profile-workspace .staff-overview-card strong{font-size:20px}
.staff-profile-fact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;min-width:0}
.staff-profile-section{background:var(--soft);border:1px solid var(--line);border-radius:9px;padding:18px;margin:0 0 18px;min-width:0}
.staff-profile-section h3{margin-bottom:14px}
.staff-profile-section>.staff-workspace-heading{margin-bottom:12px}
.staff-profile-section>.staff-workspace-heading h3{margin:0}
.staff-profile-section p{font-size:12px;line-height:1.6}.staff-profile-section>small{display:block;font-size:11px;color:var(--muted)}
.staff-profile-section dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 20px;margin:0}
.staff-profile-section dt{font-size:11px;color:var(--muted);margin-bottom:5px}
.staff-profile-section dd{font-size:13px;margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
.staff-original-notes{white-space:pre-wrap;overflow-wrap:anywhere}
.staff-history-list{min-width:0}
.staff-history-row{display:grid;grid-template-columns:minmax(170px,1.5fr) minmax(100px,.8fr) minmax(120px,1fr) auto;gap:16px;align-items:center;padding:15px 0;border-bottom:1px solid var(--line);font-size:12px;min-width:0}
.staff-history-row:last-child{border-bottom:0}.staff-history-row small{display:block;font-size:11px;color:var(--muted);line-height:1.5;margin-top:5px}
.staff-history-main,.staff-history-money,.staff-history-state,.staff-history-action{min-width:0;overflow-wrap:anywhere}
.staff-history-money{font-variant-numeric:tabular-nums}.staff-history-action{text-align:right}.staff-history-action button{font-size:12px;padding:8px 11px}
.staff-form-context{padding:12px 15px;background:var(--soft);border:1px solid var(--line);border-radius:8px;margin:0 0 18px;font-size:12px;display:flex;gap:8px 15px;flex-wrap:wrap;align-items:center}
.staff-form-context small{color:var(--muted)}
.staff-editor-layout{display:grid;grid-template-columns:170px minmax(0,1fr);gap:22px;min-width:0}
.staff-editor-nav{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.staff-editor-nav button{padding:11px 12px;text-align:left;white-space:normal;justify-content:flex-start;font-size:12px;background:transparent;border-color:transparent}
.staff-editor-nav button[aria-current="step"],.staff-editor-nav button.selected{background:var(--soft);color:var(--blue,#9ac5ff);border-color:var(--line)}
.staff-editor-content{min-width:0}
.staff-editor-section[hidden],[data-staff-editor-section][hidden]{display:none!important}
.staff-editor-content>[data-staff-editor-section]{min-width:0}
.staff-editor-section>.form-grid,.staff-editor-section.staff-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;min-width:0}
.staff-editor-section .wide{grid-column:1/-1}
.staff-editor-section h3{grid-column:1/-1;margin:0 0 10px}
.staff-editor-section label{min-width:0}
.staff-editor-section input,.staff-editor-section select,.staff-editor-section textarea{max-width:100%;min-width:0}
.staff-editor-layout .attendance-check{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:8px 10px}
.staff-editor-layout .attendance-check small{grid-column:2;line-height:1.5}
.staff-editor-section .staff-schedule-row{grid-template-columns:115px repeat(2,minmax(90px,1fr)) minmax(108px,1.1fr) minmax(90px,1fr);gap:10px}
.staff-editor-layout .staff-schedule-row{display:block;padding:11px 0}
.staff-schedule-day-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.staff-schedule-day-heading .staff-check{margin:0;min-width:115px}.staff-schedule-day-heading>span{flex:1;font-size:12px;color:var(--muted)}
.staff-schedule-day-heading button,.staff-schedule-copy{font-size:12px;padding:8px 11px}
.staff-day-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px 0 5px}
.staff-day-fields[hidden]{display:none!important}
.staff-editor-section .staff-initial-salary{margin-top:0;background:transparent}
.staff-editor-actions{position:sticky;bottom:-1px;z-index:2;display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);background:#1f2329;padding:15px 0 3px;margin-top:20px;font-size:12px}
.staff-editor-actions .form-actions{margin:0;padding:0;border:0;background:transparent}.staff-editor-actions small{color:var(--muted)}
.staff-editor-feedback{color:var(--warning,#f2c778);font-size:12px;margin:10px 0}
.staff-attention li{grid-template-columns:minmax(95px,.55fr) minmax(0,1.6fr) auto;align-items:start;gap:10px}
.staff-attention li>small{grid-column:2}.staff-attention li .form-actions{grid-column:3;grid-row:1/3;margin:0;gap:7px}.staff-attention li button{font-size:11px;padding:7px 9px}
.staff-record-details{min-width:0}.staff-record-details dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 22px;margin:18px 0}
.staff-record-details dt{font-size:11px;color:var(--muted);margin-bottom:5px}.staff-record-details dd{margin:0;overflow-wrap:anywhere;font-size:13px}
.staff-record-details .staff-detail-amount{font-size:27px;margin:13px 0;font-variant-numeric:tabular-nums}
.staff-record-details .staff-detail-note{white-space:pre-wrap;overflow-wrap:anywhere;padding:14px;background:var(--soft);border:1px solid var(--line);border-radius:8px;font-size:13px;line-height:1.6}
.staff-detail-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 22px;margin:18px 0}
.staff-detail-facts dt{font-size:11px;color:var(--muted);margin-bottom:5px}.staff-detail-facts dd{margin:0;overflow-wrap:anywhere;font-size:13px}
.staff-history-amount{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:26px;font-variant-numeric:tabular-nums;margin:15px 0}
.staff-history-amount .staff-history-state{font-size:12px;color:var(--muted)}
.staff-history-note,.staff-history-void{white-space:pre-wrap;overflow-wrap:anywhere;padding:14px;background:var(--soft);border:1px solid var(--line);border-radius:8px;font-size:13px;line-height:1.6;margin:15px 0}
.staff-history-void{border-color:color-mix(in srgb,#f2c778 38%,var(--line));color:var(--warning,#f2c778)}
.staff-history-source{font-size:12px;color:var(--muted);margin-top:15px}.staff-attention-actions{display:flex;flex-wrap:wrap;gap:7px}
@media(max-width:1120px){.staff-directory-head,.staff-directory-row{grid-template-columns:minmax(190px,1.7fr) minmax(115px,1fr) minmax(65px,.6fr) minmax(95px,.8fr) minmax(115px,.9fr);gap:11px}.staff-directory-person{gap:9px}.staff-person-initial{width:30px;height:35px}.staff-directory-row{padding:15px 6px}}
@media(max-width:850px){.staff-directory-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.staff-directory-search{grid-column:1/-1}.staff-directory-head{display:none}.staff-directory-row,.staff-directory-no-attendance .staff-directory-row,.staff-directory-no-pay .staff-directory-row,.staff-directory-no-pay.staff-directory-no-attendance .staff-directory-row{grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:17px 0}.staff-directory-person{grid-column:1;grid-row:1}.staff-directory-status{grid-column:2;grid-row:1}.staff-directory-department{grid-column:1;grid-row:2;padding-left:39px}.staff-directory-work{grid-column:1;grid-row:3;padding-left:39px;text-align:left}.staff-directory-pay{grid-column:2;grid-row:2/4;text-align:right;max-width:170px}.staff-directory-pay .staff-rate-hint{max-width:140px}.staff-profile-fact-grid{grid-template-columns:1fr;gap:0}.staff-editor-layout{grid-template-columns:1fr;gap:18px}.staff-editor-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.staff-editor-nav button{text-align:center;justify-content:center;padding:10px 7px}.staff-profile-workspace .staff-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-profile-workspace .staff-attention li{grid-template-columns:minmax(0,1fr) auto}.staff-profile-workspace .staff-attention li>span,.staff-profile-workspace .staff-attention li>small{grid-column:1}.staff-profile-workspace .staff-attention li .form-actions{grid-column:2;grid-row:1/4}}
@media(max-width:600px){#dialog:has(.staff-profile-workspace),#dialog:has(.staff-editor-layout){max-width:calc(100vw - 16px);width:calc(100vw - 16px)}.staff-directory-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.staff-directory-filters input,.staff-directory-filters select{font-size:16px}.staff-directory-person .text-button{font-size:13px}.staff-directory-row small{font-size:11px}.staff-recorded-summary{gap:10px;font-size:12px}.staff-recorded-summary label{flex-basis:100%}.staff-cost-disclosure .staff-workspace-heading>div{gap:5px}.staff-profile-identity{gap:10px}.staff-profile-name h3{font-size:19px}.staff-profile-identity .staff-person-initial{width:34px;height:39px}.staff-profile-identity .staff-state{max-width:75px}.staff-profile-controls>.staff-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px}.staff-profile-controls>.staff-tabs button{width:100%;min-width:0;flex:none;padding:10px 6px;font-size:12px}.staff-profile-controls>.staff-tabs button:last-child:nth-child(odd){grid-column:1/-1}.staff-profile-workspace .staff-overview-card{padding:12px;gap:7px}.staff-profile-workspace .staff-overview-card strong{font-size:18px}.staff-profile-workspace .staff-overview-card>span,.staff-profile-workspace .staff-overview-card small{font-size:11px}.staff-profile-section{padding:15px}.staff-profile-section dl,.staff-record-details dl{gap:16px 13px}.staff-history-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}.staff-history-money{grid-column:2;grid-row:1;text-align:right}.staff-history-state{grid-column:1;grid-row:2}.staff-history-action{grid-column:2;grid-row:2}.staff-editor-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.staff-editor-section>.form-grid,.staff-editor-section.staff-form{grid-template-columns:1fr}.staff-editor-section .staff-schedule-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.staff-editor-section .staff-schedule-row .staff-check{grid-column:1/-1}.staff-editor-section input,.staff-editor-section select,.staff-editor-section textarea{font-size:16px}.staff-editor-actions{bottom:-17px;margin-inline:-17px;padding:13px 17px}.staff-editor-actions button{min-height:42px}.staff-editor-actions>small{flex-basis:100%}.staff-attention ul{max-height:none}.staff-attention li{grid-template-columns:1fr}.staff-attention li>small,.staff-attention li .form-actions{grid-column:1;grid-row:auto}.staff-attention li .form-actions{justify-content:flex-start}.staff-workspace-heading{align-items:flex-start}.staff-workspace-heading button{font-size:12px}}
@media(max-width:600px){.staff-day-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-editor-layout .staff-schedule-day-heading .staff-check{grid-column:auto}.staff-detail-facts{grid-template-columns:1fr}.staff-schedule-day-heading>span{min-width:100px}}
@media(max-width:380px){.staff-directory-person{gap:8px}.staff-directory-person .staff-person-initial{display:none}.staff-directory-department,.staff-directory-work{padding-left:0}.staff-directory-pay{max-width:120px}.staff-profile-section dl,.staff-record-details dl{grid-template-columns:1fr}.staff-form-context{padding:10px 12px}.staff-profile-name h3{font-size:18px}.staff-state{font-size:10px;padding:4px 7px}}
@media(max-width:600px){.staff-attendance-history .table-wrap{overflow:visible}.staff-attendance-history table{width:100%;min-width:0}.staff-attendance-history thead{display:none}.staff-attendance-history tbody{display:grid;gap:12px}.staff-attendance-history tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:14px;background:var(--soft);border:1px solid var(--line);border-radius:8px}.staff-attendance-history td{display:block;padding:0;border:0;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:12px}.staff-attendance-history td::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;margin-bottom:5px}.staff-attendance-history td:last-child{display:flex;flex-wrap:wrap;gap:8px;grid-column:1/-1}.staff-attendance-history td:last-child::before{display:none}.staff-attendance-history td button{font-size:11px;padding:9px 11px}}
