/* Staff profiles retain GC's existing dark surfaces, gold controls and card rhythm. */
.staff-directory{min-width:0;padding:20px}
.staff-directory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.staff-view-toggle,.staff-period-toggle{display:flex;flex-wrap:wrap;gap:8px}
.staff-directory-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:24px}
.staff-directory-filters label{min-width:0}
.staff-directory-filters input,.staff-directory-filters select{min-height:36px;max-width:100%;border:1px solid #ffffff12;border-radius:6px;background:var(--surface-2,#1b1b1d);color:var(--ink,#eeeef0);font:inherit;font-size:12px;padding:7px 10px}
.staff-directory-filters .staff-search-label{display:flex;align-items:center;gap:7px;flex:1 1 240px;max-width:380px}
.staff-search-label>.icon{width:16px;flex:none;color:var(--muted,#a6a6ad)}
.staff-search-label>input{width:100%;min-width:0}
.staff-directory :is(button,summary),.staff-profile-modal :is(button,summary){cursor:pointer}
.staff-directory :is(button,input,select,summary):focus-visible,.staff-profile-modal :is(button,input,select,summary):focus-visible,.staff-account-modal :is(button,input,select):focus-visible{outline:2px solid var(--gold,#cfb573);outline-offset:3px}
.staff-gallery{grid-template-columns:repeat(auto-fill,minmax(min(244px,100%),244px));gap:12px;justify-content:start}
.staff-card{width:244px;max-width:100%;min-width:0;padding:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden}
.staff-card-photo{display:flex;align-items:center;justify-content:center;width:100%;height:160px;flex:none;padding:0;border:0;border-bottom:1px solid #ffffff09;background:var(--surface-2,#1b1b1d);color:var(--gold,#cfb573);cursor:pointer}
.staff-card-photo>img{display:block;width:100%;height:100%;object-fit:cover}
.staff-card-photo>.record-card-cover{width:100%;height:100%}
.staff-card-content{display:flex;flex-direction:column;gap:9px;padding:16px;min-width:0}
.staff-card-identity{display:flex!important;align-items:center;gap:10px;min-width:0;text-align:left;min-height:44px}
.staff-card-name-row{display:flex;align-items:center;gap:4px;min-width:0}.staff-card-name-row>.staff-card-identity{flex:1}.staff-card .staff-avatar{border-radius:50%}
.staff-card-identity>strong{min-width:0;overflow-wrap:anywhere;line-height:1.45;font-size:13px;font-weight:600}
.staff-avatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;box-sizing:border-box;overflow:hidden;border:1px solid #ffffff16;border-radius:10px;background:var(--surface-2,#1b1b1d);color:var(--gold,#cfb573);font-size:15px;font-weight:600}
.staff-avatar>img{width:100%;height:100%;object-fit:cover;display:block}
.staff-role-label{font-size:11px;line-height:1.5;color:var(--staff-role-color,var(--muted,#a6a6ad));font-weight:500}
[data-staff-role="owner"]{--staff-role-color:#cfb573}
[data-staff-role="office_director"]{--staff-role-color:#b7b9d5}
[data-staff-role="team_manager"]{--staff-role-color:#9caed0}
[data-staff-role="manager"]{--staff-role-color:#9fb9af}
[data-staff-role="broker"]{--staff-role-color:#adbac9}
[data-staff-role="intern"]{--staff-role-color:#b5a8c1}
.staff-card[data-staff-role]{border-top-color:color-mix(in srgb,var(--staff-role-color) 30%,transparent)}
.staff-card-location,.staff-card-contact{display:flex;align-items:flex-start;gap:7px;color:var(--muted,#a6a6ad);font-size:11px;line-height:1.5;min-width:0}
.staff-card-location>.icon,.staff-card-contact>.icon{width:13px;height:15px;flex:0 0 13px;margin-top:1px}
.staff-card-contact>span,.staff-card-location>span{min-width:0;overflow-wrap:anywhere}
.staff-city-group{margin:24px 0;min-width:0}
.staff-city-group>h2{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ink,#eeeef0);margin:0 0 16px}
.staff-city-group>h2>.icon{width:15px;height:15px;flex:none;color:var(--muted,#a6a6ad)}
.staff-account-inactive{font-size:11px;color:#b4a16c}
.staff-tree,.staff-tree-children{list-style:none;padding:0;margin:0;min-width:0}
.staff-tree{display:flex;flex-direction:column;gap:28px}
.staff-tree-node{min-width:0;position:relative}
.staff-tree-branch{margin:8px 0 0 24px;min-width:0}
.staff-tree-branch>summary{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;min-height:32px;color:var(--muted,#a6a6ad);font-size:11px;padding:0 6px;list-style:none;border-radius:6px}
.staff-tree-branch>summary::-webkit-details-marker{display:none}
.staff-tree-branch>summary::before{content:"";width:5px;height:5px;border-top:1px solid currentColor;border-right:1px solid currentColor;transform:rotate(45deg);margin-right:4px;transition:transform 180ms ease}
.staff-tree-branch[open]>summary::before{transform:rotate(135deg)}
.staff-branch-count{font-size:10px;opacity:.7}
.staff-tree-children{margin-left:8px;padding:16px 0 0 26px;border-left:1px solid #cfb57324;display:flex;flex-wrap:wrap;align-items:flex-start;gap:18px 24px}
.staff-tree-children>.staff-tree-node{flex:0 0 auto;max-width:100%}
.staff-tree-children>.staff-tree-node::before{content:"";position:absolute;left:-27px;top:24px;width:26px;border-top:1px solid #cfb57324}
.staff-unassigned{margin-top:30px;padding-top:20px;border-top:1px solid #ffffff09}
.staff-unassigned>h3{font-size:12px;color:var(--muted,#a6a6ad);letter-spacing:.05em;margin:0 0 18px}
.staff-office-group{margin:20px 0}
.staff-office-group>h2{font-size:13px;line-height:1.5;margin:0 0 16px;color:var(--ink,#eeeef0)}
.staff-role-band{margin:0 0 22px}
.staff-role-band>h4{display:flex;align-items:center;gap:10px;color:var(--muted,#a6a6ad);font-size:11px;font-weight:500;margin:0 0 10px}
.staff-role-band>h4>span{font-size:10px;opacity:.7}
.staff-org-chart{max-width:100%;min-width:0;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#cfb57355 transparent;box-sizing:border-box;padding:18px 12px 26px;border:1px solid #ffffff09;border-radius:9px;background:#ffffff01}
.staff-org-chart:focus-visible{outline:2px solid var(--gold,#cfb573);outline-offset:3px}
@media(min-width:801px){
  .staff-org-chart>.staff-tree{display:flex;flex-direction:row;align-items:flex-start;justify-content:center;gap:40px;width:max-content;min-width:100%;margin:0 auto}
  .staff-org-chart .staff-tree-node{display:flex;flex-direction:column;align-items:center;flex:0 0 auto;width:max-content;max-width:none;min-width:244px}
  .staff-org-chart .staff-tree-node>.staff-card{width:244px;flex:none;margin:0}
  .staff-org-chart .staff-tree-branch{position:relative;width:max-content;min-width:244px;margin:8px 0 0;max-width:none}
  .staff-org-chart .staff-tree-branch::before{content:"";position:absolute;left:50%;top:-8px;height:40px;border-left:1px solid #cfb57330}
  .staff-org-chart .staff-tree-branch>summary{position:relative;z-index:1;box-sizing:border-box;min-height:32px;margin:0 auto;padding:4px 9px;border:1px solid #ffffff0b;background:var(--surface-1,#141415);border-radius:6px}
  .staff-org-chart .staff-tree-children{display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:center;gap:24px;position:relative;min-width:0;max-width:none;padding:24px 0 0;margin:0;border-left:0}
  .staff-org-chart .staff-tree-children>.staff-tree-node::before{content:"";position:absolute;top:-24px;left:50%;width:0;height:24px;border-top:0;border-left:1px solid #cfb57330}
  .staff-org-chart .staff-tree-children>.staff-tree-node::after{content:"";position:absolute;top:-24px;left:-12px;right:-12px;border-top:1px solid #cfb57330}
  .staff-org-chart .staff-tree-children>.staff-tree-node:first-child::after{left:50%}
  .staff-org-chart .staff-tree-children>.staff-tree-node:last-child::after{right:50%}
  .staff-org-chart .staff-tree-children>.staff-tree-node:only-child::after{display:none}
}
@media(max-width:800px){.staff-org-chart{overflow-x:hidden;padding:6px 0;border:0;background:transparent}.staff-org-chart>.staff-tree{width:100%;min-width:0}}
/* Staff dossier uses the shared client layout, avatar, rows, tabs and Details drawer. */
.staff-profile-modal{position:relative;min-width:0}
.staff-profile-layout{width:100%}
.staff-profile-modal.staff-details-open .staff-profile-layout{grid-template-columns:minmax(0,1fr) 300px}
.staff-profile-main .dossier-tab-item{flex-shrink:0}
.staff-profile-main .staff-role-label{display:block;margin-top:5px}
.staff-profile-main .client-tab-panel[hidden]{display:none!important}
.staff-profile-main .staff-settings-panel[hidden]{display:none!important}
.staff-settings-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.staff-settings-tab{display:inline-flex;align-items:center;gap:7px;min-height:34px}
.staff-settings-tab>.icon{width:14px;height:14px;flex:none}
.staff-settings-panel{min-width:0}
.staff-settings-panel .mfa-settings-section,.staff-settings-panel .calendar-settings-section,#staff-panel-security .mfa-settings-section{margin-top:0}
.staff-profile-main .client-tab-panel .record-gallery{grid-template-columns:repeat(auto-fill,minmax(min(244px,100%),244px));justify-content:start}
.staff-profile-main .task-property-value>select{width:100%;min-width:0;max-width:100%}
.staff-profile-main .task-property-label>label{display:flex;align-items:center;gap:8px;min-width:0}
.staff-profile-main .staff-pinned-properties .process-pinned-label>label{min-width:0}
.staff-profile-main .staff-pinned-properties .process-pinned-label>label>span{overflow-wrap:anywhere}
.staff-profile-main .staff-pinned-properties .task-property-value{min-width:0}
.staff-profile-main #staff-contact-form a[href]{overflow-wrap:anywhere}
.staff-password-control{display:flex;align-items:center;width:100%;min-width:0;gap:6px}
.staff-password-control>input{flex:1;min-width:0}
.staff-password-control>.icon-button{flex:0 0 28px;min-height:28px;width:28px;height:28px;padding:6px;color:var(--muted)}
.staff-password-control>.icon-button>.icon{width:14px;height:14px}
.staff-profile-main #staff-account-form>.modal-footer,.staff-profile-main #staff-password-form>.modal-footer{position:static;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;margin:12px 0 24px;padding:12px 0;border-top:1px solid #ffffff0b}
.staff-profile-main #staff-account-form .task-footer-save-actions,.staff-profile-main #staff-password-form .task-footer-save-actions{margin-left:auto}
.staff-account-content{min-width:0}
.staff-history-event{border-top:1px solid #ffffff09;padding:10px 0;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.staff-history-event time,.staff-history-event>span{font-size:10px;color:var(--muted)}
.staff-history-event p{margin:4px 0}
.staff-period-toggle{margin-bottom:15px}
.staff-range-form{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:18px}
.staff-range-form>.task-property{flex:1 1 220px;grid-template-columns:28px minmax(0,1fr);margin:0}
.staff-range-form>.text-button{min-height:31px}
.staff-stats-range{font-size:11px;color:var(--muted);margin:0 0 15px}
.staff-kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.staff-kpi{min-width:0;padding:14px;border:1px solid #ffffff0c;border-radius:8px;background:#ffffff02}
.staff-kpi>span{display:block;color:var(--muted);font-size:11px;line-height:1.4}
.staff-kpi>strong{display:block;color:var(--ink);font-size:24px;font-weight:600;line-height:1.3;margin-top:8px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.staff-kpi[data-staff-kpi="points"]>strong{color:var(--gold)}
.staff-stats-incomplete{margin-top:12px}
.staff-pinned-office{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.staff-pinned-office>strong{font-size:11px;line-height:1.4}
.staff-pinned-office>small{font-size:11px;line-height:1.4;color:var(--muted)}
.staff-pinned-office>select{width:100%;min-width:0}
.staff-owners{margin:0 0 26px}
.staff-owners>h2,.staff-office-group>h2{font-size:14px;line-height:1.5;font-weight:600;margin:0 0 16px;color:var(--ink)}
.staff-office-group>h2>small{display:inline-block;margin-left:9px;font-size:11px;font-weight:400;color:var(--muted)}
.staff-structure-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;margin:0 0 12px}
.staff-structure-heading>:is(h2,h3){margin:0;min-width:0;font-size:14px;line-height:1.5;font-weight:600;color:var(--ink)}
.staff-structure-heading>h3{font-size:12px;font-weight:500;color:var(--muted)}
.staff-structure-heading :is(h2,h3)>small{display:inline-block;margin-left:9px;font-size:11px;font-weight:400;color:var(--muted)}
.staff-structure-heading>.text-button{flex-shrink:0;min-height:30px;font-size:11px}
.staff-team-group{margin:16px 0 24px}
.staff-team-group>h3,.staff-team-group>h4,.staff-profile-team-office>h3{font-size:12px;color:var(--muted);font-weight:500;margin:0 0 10px}
.staff-table-identity .staff-avatar{width:34px;height:34px;flex-basis:34px;font-size:12px;border-radius:50%}
.staff-table .stack-cell small{overflow-wrap:anywhere}
.staff-table-scroll{min-width:0;max-width:100%}
@media(max-width:900px){.staff-profile-modal.staff-details-open .staff-profile-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:580px){.staff-directory{padding:16px}.staff-directory-filters{gap:8px;margin-bottom:20px}.staff-directory-filters .staff-search-label{flex-basis:100%;max-width:none}.staff-directory-filters label:has(select){flex:1 1 130px}.staff-directory-filters select{width:100%}.staff-gallery{grid-template-columns:minmax(0,1fr)}.staff-card{width:100%}.staff-tree-children{padding-left:14px;margin-left:0;gap:18px}.staff-tree-children>.staff-tree-node{width:100%}.staff-tree-children>.staff-tree-node::before{left:-15px;width:14px}.staff-tree-branch{margin-left:12px}.staff-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.staff-kpi{padding:12px}.staff-profile-main .client-tab-panel .record-gallery{grid-template-columns:minmax(0,1fr)}.staff-range-form>.task-property{flex-basis:100%}.staff-table{min-width:580px}}
@media(hover:none),(pointer:coarse){.staff-directory .filter-pill,.staff-tree-branch>summary{min-height:44px}}
@media(prefers-reduced-motion:reduce){.staff-tree-branch>summary::before{transition:none}}
@media(forced-colors:active){.staff-card,.staff-kpi{background:Canvas;color:CanvasText;border-color:CanvasText}.staff-tree-children,.staff-tree-children>.staff-tree-node::before{border-color:CanvasText}.staff-role-label{color:CanvasText}.staff-avatar{border-color:CanvasText;background:Canvas;color:CanvasText}}

.staff-pinned-office>.record-select{width:100%;min-width:0}
.staff-pinned-properties .record-select-readonly{width:100%;min-width:0}
.staff-pinned-properties .record-select-value>.staff-pinned-office{flex:1;min-width:0}
.staff-profile-main .staff-pinned-office.record-select-host{align-items:flex-start}
.staff-development-section{padding:22px 0}.staff-development-section+ .staff-development-section{border-top:1px solid var(--line)}.staff-development-section h2{font-size:15px;margin:0 0 15px}.staff-learning-summary{display:flex;flex-wrap:wrap;gap:12px 24px;color:var(--muted);font-size:12px;margin-bottom:20px}.staff-learning-summary strong{color:var(--ink);font-variant-numeric:tabular-nums}.staff-learning-program{padding:15px 0;border-bottom:1px solid var(--line)}.staff-learning-program>div,.staff-growth-criterion>div{display:flex;justify-content:space-between;gap:16px;font-size:12px}.staff-learning-program>div>span,.staff-growth-criterion>div>span{flex-shrink:0;color:var(--gold);font-variant-numeric:tabular-nums}.staff-learning-program progress,.staff-growth-criterion progress{display:block;width:100%;height:5px;margin:12px 0;border:0;accent-color:var(--gold);background:var(--input);border-radius:4px;overflow:hidden}.staff-learning-program progress::-webkit-progress-bar,.staff-growth-criterion progress::-webkit-progress-bar{background:var(--input)}.staff-learning-program progress::-webkit-progress-value,.staff-growth-criterion progress::-webkit-progress-value{background:var(--gold)}.staff-growth-criterion{padding:14px 0;border-bottom:1px solid var(--line)}.staff-growth-criterion small{display:block;color:var(--muted);line-height:1.65;font-size:11px;margin-top:6px}.staff-growth-criterion[data-state=met]>div>span{color:var(--green)}.staff-development-section details{margin:14px 0}.staff-development-section summary{cursor:pointer;color:var(--gold);font-size:12px;padding:10px 0}.staff-development-section h3{font-size:12px;margin-top:18px}.staff-development-evidence{padding-left:20px;font-size:12px;line-height:1.8}.staff-learning-history>div{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}.staff-learning-history span{color:var(--muted);font-size:11px;flex-shrink:0}.staff-development-notice{padding:15px 0;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.65}@media(max-width:600px){.staff-learning-program>div,.staff-growth-criterion>div,.staff-learning-history>div{align-items:flex-start;flex-direction:column;gap:7px}.staff-development-section h2{font-size:14px}}

.staff-growth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.staff-growth-card{min-width:0;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--glass-bg,var(--paper))}.staff-growth-card h3{margin:0 0 10px!important;color:var(--gold);font-size:14px!important}.staff-progress-unknown{height:6px;background:var(--input);border:1px dashed var(--line);border-radius:5px;margin:12px 0}.staff-growth-criterion[data-state=met] progress::-webkit-progress-value{background:var(--green)}.staff-growth-criterion[data-state=met] progress{accent-color:var(--green)}.staff-career-form{display:grid;gap:13px;max-width:520px;margin:15px 0}.staff-career-form label{display:grid;gap:7px;font-size:12px;color:var(--muted)}.staff-career-form :is(input,textarea){min-width:0;width:100%;font:inherit;padding:10px 12px;color:var(--ink);background:var(--input);border:1px solid var(--line);border-radius:8px}.staff-module-progress{padding:10px 0}.staff-module-progress>div{display:flex;justify-content:space-between;gap:15px;font-size:12px}.staff-module-progress strong{white-space:nowrap;color:var(--gold)}@media(max-width:760px){.staff-growth-grid{grid-template-columns:1fr}.staff-growth-card{padding:14px}.staff-module-progress>div{flex-direction:column;gap:5px}}
