
body:has(.personnel-workspace) {
 --pw-surface:#fff; --pw-bg:#f5f7fb; --pw-text:#1b2b45; --pw-muted:#76869d; --pw-border:#e2e8f2; --pw-tint:#f8fafc; --pw-selected:#e9f0ff;
 background:var(--pw-bg)!important;
}
body:has(.personnel-workspace) .fi-main-ctn,
body:has(.personnel-workspace) .fi-main {background:var(--pw-bg)!important;background-image:none!important}
body:has(.personnel-workspace) .fi-main {padding-top:1.75rem}
body:has(.personnel-workspace) .fi-header-heading {color:var(--pw-text);font-size:1.9rem;letter-spacing:-.035em}
body:has(.personnel-workspace) .fi-header-subheading {color:var(--pw-muted);font-size:1rem}
.personnel-workspace {color:var(--pw-text)}
.pw-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--pw-border);border-radius:14px;background:var(--pw-surface);padding:22px 0;margin-bottom:20px}
.pw-stat {display:flex;align-items:center;gap:16px;padding:0 24px;border-inline-end:1px solid var(--pw-border)}
.pw-stat:last-child {border:0}
.pw-stat-icon {width:44px;height:44px;border-radius:11px;background:#eaf0ff;color:#5271b0;display:grid;place-items:center;flex-shrink:0}
.pw-stat-icon svg {width:22px;height:22px}
.pw-stat-occupied .pw-stat-icon {background:#e9f5ef;color:#278456}
.pw-stat-vacant .pw-stat-icon {background:#fff5df;color:#a87716}
.pw-stat strong {display:block;font-size:1.7rem;font-weight:700;line-height:1.2}
.pw-stat div>span {display:block;font-size:.88rem;color:var(--pw-muted);margin-top:5px}
.pw-view-switch {display:flex;gap:8px;margin-bottom:18px}
.pw-layout {display:grid;grid-template-columns:minmax(290px,340px) minmax(0,1fr);gap:24px;align-items:start}
.pw-explorer {border:1px solid var(--pw-border);border-radius:14px;background:var(--pw-surface);padding:20px 14px}
.pw-explorer-heading {display:flex;align-items:center;justify-content:space-between;padding:0 6px;margin-bottom:20px}
.pw-explorer-heading h2 {font-size:1.05rem;font-weight:700}
.pw-explorer-heading>svg {width:21px;height:21px;color:var(--pw-muted)}
.pw-search {display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--pw-tint);border:1px solid var(--pw-border);border-radius:8px;margin:0 4px 18px}
.pw-search>svg {width:18px;height:18px;color:var(--pw-muted);flex-shrink:0}
.pw-search input {background:transparent;border:0;outline:0;min-width:0;width:100%;font-size:.9rem;color:var(--pw-text);padding:0;box-shadow:none!important}
.pw-search:focus-within {border-color:#6b97f3;box-shadow:0 0 0 3px #2563eb15}
.pw-tree {padding:0;min-height:200px}
.pw-tree-node {padding:0;margin:3px 0;border:0;background:transparent}
.pw-tree-node>summary {position:relative;list-style:none;padding:0;cursor:pointer}
.pw-tree-node>summary::-webkit-details-marker {display:none}
.pw-tree-node>summary:before {content:'';position:absolute;inset-inline-start:5px;top:19px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-inline-start:5px solid #8093b1}
.pw-tree-node[open]>summary:before {transform:rotate(90deg)}
.pw-unit-button {display:flex;align-items:flex-start;gap:8px;text-align:start;width:calc(100% - 19px);margin-inline-start:19px;padding:11px 8px;min-height:44px;border:0;border-radius:7px;cursor:pointer;background:transparent;color:#44546b;font-size:.91rem;font-weight:500;line-height:1.45;transition:background-color .15s,color .15s}
.pw-unit-button svg {width:18px;height:18px;flex-shrink:0;margin-top:1px;color:#8496b0}
.pw-unit-button span {flex:1;min-width:0;overflow-wrap:anywhere}
.pw-unit-button:hover {color:#2563eb;background:#f0f5ff}
.pw-unit-button:focus-visible {outline:2px solid #2563eb;outline-offset:2px}
.pw-unit-button.is-selected {background:var(--pw-selected);color:#2563eb;font-weight:700;box-shadow:inset 3px 0 #2563eb}
.pw-unit-button.is-selected svg {color:#2563eb}
.pw-unit-check {width:16px!important;height:16px!important}
.pw-tree-children {margin-inline-start:11px;padding-inline-start:3px;border-inline-start:1px solid #e6ecf5}
.pw-tree-footer {border-top:1px solid var(--pw-border);padding-top:18px;margin:22px 4px 0}
.pw-tree-footer p {color:var(--pw-muted);font-size:.86rem;line-height:1.6;margin-bottom:15px}
.pw-tree-footer>div {display:flex;justify-content:space-between;gap:10px;padding:9px;background:var(--pw-tint);border-radius:7px}
.pw-tree-footer button {color:#506687;font-size:.83rem;cursor:pointer;padding:4px;border-radius:4px}
.pw-tree-footer button:hover {color:#2563eb;background:var(--pw-selected)}
.pw-main-panel {min-width:0}
.pw-selection-empty {min-height:420px;background:var(--pw-surface);border:1px solid var(--pw-border);border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px}
.pw-selection-empty>span {display:grid;place-items:center;width:64px;height:64px;background:#edf3ff;color:#5080df;border-radius:16px;margin-bottom:22px}
.pw-selection-empty svg {width:30px;height:30px}
.pw-selection-empty h2 {font-size:1.2rem;font-weight:700;margin-bottom:10px}
.pw-selection-empty p,.pw-empty-copy {font-size:.94rem;color:var(--pw-muted)}
.pw-staff-card.fi-section {display:block!important;padding:0!important;background:var(--pw-surface)!important;border:1px solid var(--pw-border)!important;border-radius:14px!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible}
html body:has(.personnel-workspace) .fi-main .pw-staff-card.fi-section,
html body:has(.personnel-workspace) .fi-main .pw-staff-card .fi-ta-ctn {background:var(--pw-surface)!important;background-image:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.pw-staff-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:24px;border-bottom:1px solid var(--pw-border)}
.pw-unit-path {color:var(--pw-muted);font-size:.83rem;line-height:1.5;margin-bottom:13px;overflow-wrap:anywhere}
.pw-unit-title {display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.pw-unit-title h2 {flex:1;min-width:0;font-size:1.4rem;line-height:1.3;letter-spacing:-.025em;font-weight:700}
.pw-unit-summary {display:flex;gap:15px;flex-wrap:wrap;font-size:.86rem;color:var(--pw-muted);margin-top:13px}
.pw-occupied {color:#278456}
.pw-vacant {color:#a87716}
.pw-staff-actions {display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;flex-shrink:0;max-width:40%}
.pw-tabs {display:flex;gap:24px;padding:0 24px;border-bottom:1px solid var(--pw-border);overflow-x:auto}
.pw-tabs button {padding:18px 0 15px;border-bottom:3px solid transparent;font-size:.94rem;font-weight:500;white-space:nowrap;color:var(--pw-muted);cursor:pointer}
.pw-tabs button[aria-selected=true] {border-color:#2563eb;color:#2563eb;font-weight:700}
.pw-tabs button:hover {color:#2563eb}
.pw-table-panel {min-width:0}
.pw-staff-card .fi-ta {border:0!important;box-shadow:none!important;border-radius:0 0 14px 14px;background:transparent!important;backdrop-filter:none!important}
.pw-staff-card .fi-ta-ctn {box-shadow:none!important;background:transparent!important;backdrop-filter:none!important}
.pw-staff-card .fi-ta-header-toolbar {padding:18px 24px!important;background:var(--pw-surface)!important}
.pw-staff-card .fi-ta-header-cell {background:var(--pw-tint)!important;color:var(--pw-muted)!important;font-size:.83rem!important;padding-top:14px!important;padding-bottom:14px!important}
.pw-staff-card .fi-ta-cell {padding-top:18px!important;padding-bottom:18px!important;background:var(--pw-surface)!important}
.pw-staff-card .fi-ta-text-item {font-size:.94rem!important;line-height:1.5}
.pw-staff-card .fi-ta-text-description {font-size:.78rem!important;color:var(--pw-muted)!important}
.pw-staff-card .fi-ta-actions {gap:10px!important}
.pw-staff-card .fi-ta-actions .fi-icon-btn {width:34px!important;height:34px!important;min-width:34px!important}
.pw-staff-card .fi-ta-actions .fi-icon-btn .fi-icon {width:22px!important;height:22px!important}
.pw-history-table {overflow:auto}
.pw-history-table table {width:100%;text-align:start;font-size:.93rem;border-collapse:collapse}
.pw-history-table th {text-align:start;background:var(--pw-tint);color:var(--pw-muted);font-size:.83rem}
.pw-history-table td,.pw-history-table th {padding:18px 24px;border-bottom:1px solid var(--pw-border)}
.pw-history-table nav {padding:18px}
.pw-unit-path button {color:inherit;text-align:start;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.pw-unit-path button:hover {color:var(--pw-text)}
.pw-unit-path button:focus-visible,.pw-division-link:focus-visible {outline:2px solid #2563eb;outline-offset:3px;border-radius:4px}
.pw-divisions-hint {padding:18px 24px;color:var(--pw-muted);font-size:.86rem;line-height:1.5}
.pw-divisions-table table {min-width:520px}
.pw-divisions-table > table > thead > tr > th:not(:first-child),.pw-divisions-table > table > tbody > tr > td:not(:first-child) {text-align:end;white-space:nowrap}
.pw-divisions-table tbody tr:hover {background:var(--pw-tint)}
.pw-division-link {display:flex;align-items:center;gap:10px;width:100%;min-height:44px;text-align:start;color:var(--pw-text);cursor:pointer;font-weight:600}
.pw-division-link span {flex:1;overflow-wrap:anywhere}
.pw-division-link svg {width:18px;height:18px;flex-shrink:0;color:var(--pw-muted)}
.pw-division-link:hover {color:#2563eb}
.pw-division-inactive {font-size:.8rem;color:var(--pw-muted)}
.pw-expand-staff {display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--pw-border);border-radius:8px;color:var(--pw-muted);cursor:pointer;background:var(--pw-surface)}
.pw-expand-staff svg {width:18px;height:18px}
.pw-expand-staff:hover,.pw-expand-staff[aria-expanded=true] {color:var(--pw-text);background:var(--pw-selected)}
.pw-expand-staff:focus-visible {outline:2px solid #2563eb;outline-offset:3px}
.pw-expand-staff:disabled {opacity:.5;cursor:wait}
.pw-divisions-table > table > tbody > .pw-division-details > td {padding:0;background:var(--pw-tint)}
.pw-inline-staff {margin:12px 20px 20px;border:1px solid var(--pw-border);border-radius:8px;overflow:auto;background:var(--pw-surface)}
.pw-inline-staff td,.pw-inline-staff th {white-space:normal;overflow-wrap:anywhere;padding:14px 16px}
body:has(.personnel-workspace) .fi-section.pw-staff-card .fi-modal {background:transparent}
.dark body:has(.personnel-workspace),body.dark:has(.personnel-workspace) {--pw-surface:#152238;--pw-bg:#0d1729;--pw-text:#e3eaf6;--pw-muted:#a0afc6;--pw-border:#2a3b54;--pw-tint:#192940;--pw-selected:#203d6e}
.dark .pw-unit-button {color:#b6c6dd}
.dark .pw-unit-button:hover {background:#20334f;color:#dce8ff}
.dark .pw-unit-button.is-selected {color:#dce8ff}
.dark .pw-unit-button.is-selected svg {color:#8fb7ff}
.dark .pw-tabs button[aria-selected=true] {color:#93b9ff}
@media(max-width:1279px) {.pw-layout {grid-template-columns:280px minmax(0,1fr)}.pw-staff-heading {align-items:flex-start;flex-direction:column}.pw-staff-actions {max-width:100%}.pw-tabs {gap:18px}.pw-stat {padding:0 15px;gap:10px}}
@media(max-width:900px) {.pw-layout {grid-template-columns:minmax(0,1fr)}.pw-stats {grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 0}.pw-stat:nth-child(2) {border:0}.pw-explorer {padding:16px}.pw-tree {min-height:0}.pw-tree-footer {margin-top:15px}.pw-staff-heading {padding:18px}.pw-tabs {padding:0 18px;gap:20px}.pw-unit-title h2 {font-size:1.25rem}.pw-unit-button {font-size:1rem}.pw-staff-card .fi-ta-header-toolbar {padding:16px!important}}
@media(prefers-reduced-motion:reduce) {.pw-unit-button {transition:none}}
.pw-staff-drag-handle {display:inline-flex;align-items:center;justify-content:center;width:30px;height:34px;cursor:grab;color:var(--pw-muted);background:transparent;border:0;touch-action:none;user-select:none}
.pw-staff-drag-handle:active {cursor:grabbing}
.pw-staff-drag-handle:disabled {cursor:wait;opacity:.5}
.pw-staff-drag-handle svg {width:20px;height:20px}
.pw-staff-drag-handle:focus-visible {outline:2px solid var(--pw-muted);border-radius:4px}
.pw-staff-card tr[data-staff-drop] {box-shadow:inset 0 2px #3b82f6}
