#page-workers > :not(.employees-root),
#page-scaffolding-workers > :not(.employees-root) { display:none !important; }

.employees-root { min-width:0; }
.employees-shell { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:12px; align-items:start; direction:ltr; }
.employees-panel { min-width:0; background:#fff; border:1px solid var(--border); border-radius:12px; overflow:hidden; direction:rtl; }
.employees-list-panel { grid-column:2; grid-row:1; display:flex; flex-direction:column; min-height:480px; max-height:calc(100vh - 150px); }
.employees-detail-panel { grid-column:1; grid-row:1; }
.employees-list-head { padding:12px; border-bottom:1px solid var(--border); }
.employees-title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.employees-title-row h2 { margin:0; font-size:19px; line-height:1.2; }
.employees-count { display:block; margin-top:2px; color:var(--muted); font-size:12px; }
.employee-create { min-height:36px; border:1px solid #0f766e; border-radius:8px; background:#0f766e; color:#fff; padding:6px 10px; font-size:12px; font-weight:800; white-space:nowrap; }
.employee-create[hidden] { display:none; }
.employees-filters { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:10px; }
.employees-search { grid-column:1/-1; }
.employees-field { display:grid; gap:4px; color:var(--muted); font-size:12px; font-weight:600; }
.employees-field input,.employees-field select { width:100%; height:38px; border:1px solid var(--border); border-radius:7px; background:#fff; padding:0 8px; color:var(--text); font-size:13px; }
.employees-scope-note { grid-column:1/-1; margin:2px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.employees-list { flex:1; overflow:auto; min-height:0; padding:6px; }
.employee-list-row { width:100%; border:1px solid transparent; border-radius:9px; background:transparent; display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:9px; align-items:center; padding:8px; text-align:right; color:inherit; min-height:60px; }
.employee-list-row:hover { background:#f8fafc; }
.employee-list-row[aria-selected="true"] { background:#eaf5f4; border-color:#8fd1ca; box-shadow:inset -3px 0 #0f766e; }
.employee-list-row:focus-visible,.employees-field input:focus-visible,.employees-field select:focus-visible,.employee-action:focus-visible,.employees-mobile-back:focus-visible { outline:3px solid rgba(15,118,110,.28); outline-offset:2px; }
.employee-avatar { width:40px; height:40px; border-radius:50%; display:grid; place-items:center; background:#dbeafe; color:#1d4ed8; font-weight:800; font-size:15px; }
.employee-list-copy { min-width:0; }
.employee-list-copy strong,.employee-list-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.employee-list-copy strong { font-size:14px; }
.employee-list-copy small { color:var(--muted); margin-top:3px; font-size:12px; }
.employee-row-side { display:grid; justify-items:end; gap:5px; }
.employee-bu,.employee-status,.employee-pwa-state { display:inline-flex; align-items:center; border-radius:999px; padding:3px 7px; font-size:11px; font-weight:800; white-space:nowrap; }
.employee-bu.bu1 { background:#ccfbf1; color:#115e59; }.employee-bu.bu2 { background:#dbeafe; color:#1e40af; }
.employee-status.active { background:#dcfce7; color:#166534; }.employee-status.inactive { background:#f2f4f7; color:#667085; }
.employees-state { padding:42px 18px; color:var(--muted); text-align:center; }
.employees-state strong { display:block; color:var(--text); margin-bottom:6px; }
.employee-detail { padding:16px; }
.employee-detail-empty { min-height:320px; display:grid; place-items:center; text-align:center; color:var(--muted); }
.employee-detail-empty strong { display:block; color:var(--text); font-size:18px; margin-bottom:5px; }
.employee-detail-head { display:flex; align-items:flex-start; gap:11px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.employee-detail-head .employee-avatar { width:46px; height:46px; font-size:18px; }
.employee-heading { flex:1; min-width:0; }.employee-heading h2 { margin:0 0 4px; font-size:22px; line-height:1.2; }.employee-heading p { margin:0; color:var(--muted); font-size:14px; text-align:right; }
.employee-heading-badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.employee-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin:10px 0; }
.employee-summary-card { border:1px solid var(--border); border-radius:9px; padding:8px 9px; min-width:0; }
.employee-summary-card span { display:block; color:var(--muted); font-size:12px; margin-bottom:3px; }.employee-summary-card strong { display:block; overflow-wrap:anywhere; font-size:14px; }
.employee-detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.employee-detail-block { border:1px solid var(--border); border-radius:10px; padding:10px; font-size:13px; line-height:1.45; }
.employee-detail-block h3 { margin:0 0 8px; font-size:14px; }
.employee-info-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.employee-info-item span { display:block; color:var(--muted); font-size:12px; margin-bottom:2px; }.employee-info-item strong { font-size:13px; overflow-wrap:anywhere; }
.employee-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.employee-action { min-height:38px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--text); padding:7px 11px; font-weight:700; font-size:13px; }
.employee-action.primary { background:#0f766e; color:#fff; border-color:#0f766e; }.employee-action.danger { color:#b42318; border-color:#fca5a5; }
.employee-action[disabled] { cursor:not-allowed; opacity:.55; }
.employee-pwa-state { background:#ecfdf5; color:#047857; }.employee-pwa-state.unavailable { background:#f2f4f7; color:#667085; }
.employee-future-note { margin-top:7px; padding:7px 8px; border-radius:8px; background:#f8fafc; color:var(--muted); font-size:12px; line-height:1.4; }
.employees-mobile-back { display:none; border:0; background:transparent; color:#0f766e; font-weight:800; min-height:40px; padding:0; margin-bottom:5px; }
.employee-editor-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.employee-editor-head h2 { margin:0; font-size:20px; }.employee-editor-head p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.employee-editor-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.employee-editor-fields > label:not(.employee-reporter-option) { display:grid; gap:4px; color:var(--muted); font-size:12px; font-weight:700; }
.employee-editor-fields input,.employee-editor-fields select { width:100%; min-width:0; height:40px; border:1px solid var(--border); border-radius:8px; background:#fff; padding:0 9px; color:var(--text); font-size:13px; }
.employee-reporter-option { display:flex; align-items:center; gap:8px; min-height:40px; padding:6px 9px; border:1px solid var(--border); border-radius:8px; }
.employee-reporter-option input { width:18px; height:18px; flex:0 0 auto; }.employee-reporter-option span { display:grid; gap:1px; }.employee-reporter-option strong { font-size:13px; }.employee-reporter-option small { color:var(--muted); font-size:11px; }
.employee-project-editor { margin:12px 0 0; border:1px solid var(--border); border-radius:10px; padding:10px; }
.employee-project-editor legend { padding:0 5px; font-size:14px; font-weight:800; }.employee-project-editor > p { margin:0 0 8px; color:var(--muted); font-size:12px; }
.employee-project-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px 10px; max-height:180px; overflow:auto; }
.employee-project-option { display:flex; align-items:flex-start; gap:6px; min-width:0; padding:5px; border-radius:6px; font-size:13px; }.employee-project-option:hover { background:#f8fafc; }
.employee-project-option input { flex:0 0 auto; margin-top:2px; }.employee-project-option span { overflow-wrap:anywhere; }
.employee-editor-empty { color:var(--muted); font-size:13px; }
.employee-editor-error { margin-top:10px; border-radius:8px; background:#fef2f2; color:#b42318; padding:8px 10px; font-size:13px; font-weight:700; }
.employee-editor-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }

/* BU1 lifetime performance list. BU2 retains its established list presentation. */
.employees-bu1-flat .employees-shell { grid-template-columns:minmax(0,1fr) 420px; }
.employees-bu1-flat .employees-list-panel { max-height:calc(100vh - 200px); overflow:visible; }
.employees-bu1-flat .employees-list-head { padding:10px 12px; }
.employees-bu1-flat .employees-filters { gap:5px; margin-top:7px; }
.employees-bu1-flat .employees-scope-note { font-size:11px; }
.employees-bu1-flat .employees-list { padding:0 5px 6px; scrollbar-width:thin; overflow-x:hidden; }
.employees-project-filter { grid-column:1/-1; display:flex; align-items:center; gap:8px; }
.employees-project-filter[hidden] { display:none; }
.employees-project-filter > span { flex-shrink:0; }
.employees-project-filter select { flex:1; min-width:0; }
.employees-bu1-flat .employee-compact-worker { display:block; box-sizing:border-box; height:68px; min-height:68px; padding:7px 9px; border-radius:5px; margin:0; overflow:visible; }
.employees-bu1-flat .employee-compact-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:650; line-height:1.4; }
.employees-bu1-flat .employee-compact-meta { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto; column-gap:8px; align-items:center; margin-top:3px; color:var(--muted); font-size:11.5px; line-height:1.35; }
.employees-bu1-flat .employee-compact-phone { grid-column:1; grid-row:1; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
.employees-bu1-flat .employee-compact-status { grid-column:1; grid-row:2; justify-self:start; display:inline-flex; align-items:center; gap:4px; color:#166534; font-size:11px; }
.employees-bu1-flat .employee-compact-status::before { content:''; width:6px; height:6px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 2px #dcfce7; }
.employees-bu1-flat .employee-compact-status.inactive { color:#667085; }
.employees-bu1-flat .employee-compact-status.inactive::before { background:#94a3b8; box-shadow:0 0 0 2px #f1f5f9; }
.employee-performance-gauge { grid-column:2; grid-row:1/3; position:relative; z-index:2; width:62px; height:36px; display:inline-grid; place-items:center; direction:ltr; isolation:isolate; transform-origin:center; transition:transform .16s ease,filter .16s ease; will-change:transform; }
.employee-compact-worker:focus-visible .employee-performance-gauge { z-index:30; transform:scale(1.16); filter:drop-shadow(0 6px 9px rgba(15,23,42,.14)); }
/* hover emphasis only for a real hovering pointer: on touch screens :hover sticks after a tap and would leave a scaled, filtered layer inside the scrolling list */
@media (hover:hover) and (pointer:fine) { .employee-performance-gauge:hover { z-index:30; transform:scale(1.16); filter:drop-shadow(0 6px 9px rgba(15,23,42,.14)); } }
.employee-performance-gauge svg { display:block; width:60px; height:36px; overflow:visible; }
.employee-performance-track,.employee-performance-value { fill:none; stroke-linecap:round; stroke-width:7; }
.employee-performance-track { stroke:#e7edf2; }.employee-performance-value { stroke:var(--employee-performance-color); }
.employee-performance-gauge > b { position:absolute; z-index:2; bottom:9px; min-width:34px; padding:0 2px; border-radius:4px; background:rgba(255,255,255,.9); color:#17212b; font-size:13px; font-weight:850; line-height:1; text-align:center; white-space:nowrap; }
.employee-performance-days { position:absolute; bottom:-2px; font-size:9px; line-height:1; color:#64748b; white-space:nowrap; direction:rtl; }
.employee-performance-warning { position:absolute; top:-1px; right:-2px; width:8px; height:8px; border:2px solid #fff; border-radius:50%; background:#f59e0b; }
.employee-performance-tooltip { pointer-events:none; position:absolute; display:none; direction:rtl; left:50%; top:calc(100% + 5px); transform:translateX(-50%); width:178px; padding:7px 8px; border-radius:8px; background:#17212b; color:#fff; box-shadow:0 8px 18px rgba(15,23,42,.2); font-size:9.5px; line-height:1.42; text-align:right; white-space:normal; }
.employee-performance-tooltip::before { content:''; position:absolute; top:-4px; left:50%; width:8px; height:8px; background:#17212b; transform:translateX(-50%) rotate(45deg); }
.employee-performance-tooltip strong,.employee-performance-tooltip span { display:block; }.employee-performance-tooltip strong { font-size:11px; }.employee-performance-tooltip span { color:#d7e1ea; }
.employee-compact-worker:focus-visible .employee-performance-tooltip { display:block; }
@media (hover:hover) and (pointer:fine) { .employee-performance-gauge:hover .employee-performance-tooltip { display:block; } }
.employee-performance-tooltip[popover] { position:fixed; inset:auto; margin:0; transform:none; border:0; box-sizing:border-box; width:200px; max-width:calc(100vw - 16px); }
.employee-performance-tooltip[popover]:not(:popover-open) { display:none; }
.employee-performance-tooltip[popover]:popover-open { display:block; }
.employee-performance-tooltip[popover]::before { display:none; }

@media(max-width:1180px) {
  .employees-shell { grid-template-columns:minmax(0,1fr) 310px; }
  .employees-bu1-flat .employees-shell { grid-template-columns:minmax(0,1fr) 390px; }
  .employee-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .employee-detail-grid { grid-template-columns:1fr 1fr; }
  .employee-detail-notes { grid-column:1/-1; }
  .employee-editor-fields,.employee-project-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media(max-width:640px) {
  .employees-shell { display:block; }
  .employees-bu1-flat .employees-list-panel { max-height:none; min-height:0; }
  /* phone: the PAGE is the one vertical scroller. The list used to be a nested scroll box sized from 100vh (taller than the visible iOS viewport), so its lower rows sat below the fold. */
  .employees-list-panel { max-height:none; }
  .employees-list, .employees-bu1-flat .employees-list { max-height:none; overflow:visible; }
  .employees-bu1-flat .employee-compact-worker { min-height:68px; }
  .employee-performance-tooltip { left:auto; right:-4px; width:168px; transform:none; }
  .employees-panel { border-radius:10px; }
  .employees-list-panel.mobile-hidden,.employees-detail-panel.mobile-hidden { display:none; }
  .employees-list-panel { min-height:calc(100vh - 150px); }
  .employees-detail-panel { min-height:0; }
  .employees-mobile-back { display:inline-flex; align-items:center; }
  .employee-detail { padding:12px; }
  .employee-detail-head { display:grid; grid-template-columns:44px minmax(0,1fr); gap:9px; }
  .employee-detail-head .employee-avatar { width:44px; height:44px; }
  .employee-detail-grid,.employee-info-list { grid-template-columns:1fr; }
  .employee-detail-notes { grid-column:auto; }
  .employee-summary { gap:6px; }
  .employee-actions { display:grid; grid-template-columns:1fr 1fr; }
  .employee-action { min-height:44px; }
  .employee-create { min-height:44px; }
  .employees-field input,.employees-field select { height:44px; }
  .employee-list-row { min-height:64px; }
  .employee-editor-head { align-items:center; }.employee-editor-head p { font-size:12px; }
  .employee-editor-fields,.employee-project-options { grid-template-columns:1fr; }
  .employee-editor-fields input,.employee-editor-fields select { height:44px; }
  .employee-reporter-option { min-height:44px; }
  .employee-editor-actions { display:grid; grid-template-columns:1fr 1fr; }
}
