/* V509 HR Actions > Staff Data: directory FIRST, selected record BELOW.
   Entirely scoped to #hrstaff; no data/RPC/event handler changes. */
#hrstaff[data-reports-v426] .hrhub{padding-top:14px!important}
#hrstaff[data-reports-v426] .hrwrap{max-width:1540px!important;width:100%!important}
/* Employee finder is the topmost page content; large decorative hero is redundant. */
#hrstaff #hrV508Hero{display:none!important}
#hrstaff .hr-v508-workspace,
#hrstaff .hr-v508-workspace.has-employee{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  width:100%!important;
  grid-template-columns:none!important;
  gap:20px!important;
  min-width:0!important;
}
#hrstaff .hr-v508-workspace > #hrV381Picker{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  position:static!important;
  top:auto!important;
  flex:0 0 auto!important;
  order:0!important;
}
#hrstaff .hr-v508-workspace > #hrV372StaffReport{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  position:static!important;
  order:1!important;
  scroll-margin-top:22px;
}
/* Keep search, month and filters evenly spaced even AFTER choosing a staff member. */
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-primary-fields,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-primary-fields{
  display:grid!important;
  grid-template-columns:minmax(0,1.7fr) minmax(215px,.85fr)!important;
  gap:14px!important;
  align-items:end!important;
}
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-filter-fields,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-filter-fields{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:end!important;
}
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-filter-fields > .hr426-field,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-filter-fields > .hr426-field{
  min-width:0!important;
  grid-column:auto!important;
}
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-load,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-load{
  grid-column:1/-1!important;
  min-height:42px!important;
}
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-stats,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-stats{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  width:100%!important;
  margin:14px 0!important;
  gap:12px!important;
}
/* Prevent the narrow 5-column card bug visible in V508 screenshot. */
#hrstaff[data-reports-v426] .hr426-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,245px),1fr))!important;
  gap:11px!important;
  width:100%!important;
  min-width:0!important;
}
#hrstaff[data-reports-v426] .hr426-card{
  min-width:0!important;
  width:100%!important;
  min-height:72px!important;
  border-radius:12px!important;
}
#hrstaff[data-reports-v426] .hr426-select{min-width:0!important;flex:1 1 auto!important;gap:11px!important;padding:11px!important}
#hrstaff[data-reports-v426] .hr426-card-copy{min-width:0!important;flex:1 1 auto!important}
#hrstaff[data-reports-v426] .hr426-card-top{gap:8px!important;flex-wrap:wrap!important;justify-content:flex-start!important}
#hrstaff[data-reports-v426] .hr426-card-name{
  font-size:13px!important;
  line-height:1.38!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  white-space:normal!important;
}
#hrstaff[data-reports-v426] .hr426-dept{font-size:11px!important}
#hrstaff[data-reports-v426] .hr426-avatar{width:42px!important;height:42px!important}
#hrstaff[data-reports-v426] .hr426-open{width:34px!important}
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-directory-toolbar,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-directory-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:12px!important;
}
#hrstaff[data-reports-v426] .hr-v508-workspace .hr426-view-controls,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-view-controls{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  margin-left:auto!important;
  width:auto!important;
  gap:10px!important;
}
#hrstaff[data-reports-v426] .hr-v508-workspace #hrV372StaffMatches,
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee #hrV372StaffMatches{
  max-height:min(480px,60vh)!important;
  min-height:95px!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  padding:14px!important;
}
#hrstaff[data-reports-v426] .hr426-directory{overflow:hidden!important}
#hrstaff[data-reports-v426] .hr426-table{min-width:770px!important;width:100%!important}
#hrstaff[data-reports-v426] .hr426-directory-footer{padding:13px 17px!important}
/* Bottom zone: full-width selected employee record, without old split mechanics. */
#hrstaff[data-reports-v426] .hr-v508-workspace.has-employee #hrV372StaffReport{
  grid-template-columns:minmax(0,1fr)!important;
  gap:15px!important;
}
#hrstaff[data-reports-v426] #hrV372StaffReport > .hrcard,
#hrstaff[data-reports-v426] #hrV372StaffReport > #hrProfileV503,
#hrstaff[data-reports-v426] #hrV372StaffReport > .hr-v508-records{
  width:100%!important;
  min-width:0!important;
  grid-column:1/-1!important;
}
#hrstaff[data-reports-v426] #hrV372StaffReport > .hr-v381-employee-head{padding:21px 24px!important;border-radius:16px!important}
#hrstaff[data-reports-v426] #hrV372StaffName{font-size:clamp(21px,2vw,29px)!important;line-height:1.3!important}
#hrstaff[data-reports-v426] #hrProfileV503{padding:22px 24px!important}
#hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-doc-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#hrstaff[data-reports-v426] .hr-v508-records{border-radius:16px!important}
@media(max-width:1080px){
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-stats,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:740px){
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-primary-fields,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-primary-fields{grid-template-columns:1fr!important;gap:9px!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-filter-fields,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-filter-fields > .hr426-field:nth-child(3),
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-filter-fields > .hr426-field:nth-child(3){grid-column:1/-1!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-view-controls,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-view-controls{width:100%!important;margin-left:0!important;justify-content:flex-start!important}
 #hrstaff[data-reports-v426] .hr426-view-controls>select{max-width:250px!important;flex:1 1 130px!important}
 #hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-grid,
 #hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #hrstaff[data-reports-v426] #hrProfileV503{padding:14px!important}
}
@media(max-width:520px){
 #hrstaff[data-reports-v426] .hrhub{padding:8px 8px 24px!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace{gap:14px!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-stats,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-primary-fields,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-primary-fields{padding:9px 12px!important}
 #hrstaff[data-reports-v426] .hr-v508-workspace .hr426-filter-fields,
 #hrstaff[data-reports-v426] .hr-v508-workspace.has-employee .hr426-filter-fields{padding:10px 12px!important}
 #hrstaff[data-reports-v426] .hr426-grid{grid-template-columns:minmax(0,1fr)!important}
 #hrstaff[data-reports-v426] .hr426-view-toggle{width:100%!important}
 #hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-grid,
 #hrstaff[data-reports-v426] #hrProfileV503Body .hr-v503-doc-grid{grid-template-columns:minmax(0,1fr)!important}
 #hrstaff[data-reports-v426] #hrV372StaffReport > .hr-v381-employee-head{padding:15px!important}
 #hrstaff[data-reports-v426] #hrV372StaffName{font-size:20px!important}
}
