.back-link { display: inline-block; margin-top: 28px; color: var(--muted); font-size: 12px; text-decoration: none; }
.back-link:hover { color: var(--ink); }

.admin-shell { min-height: 100svh; display: grid; grid-template-columns: 272px 1fr; }
.admin-sidebar {
  position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 20; padding: 28px 22px;
  display: flex; flex-direction: column; background: var(--ink); color: #f4f2e9;
}

.admin-nav-label { margin: 74px 8px 12px; color: #686860; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.admin-nav { display: grid; }
.admin-nav-item {
  position: relative; display: grid; grid-template-columns: 34px 1fr; width: 100%; padding: 13px 8px;
  border: 0; background: transparent; color: #aaa99f; text-align: left; cursor: pointer;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.admin-nav-link { text-decoration: none; }
.admin-nav-item span { color: #5f5f58; font-size: 12px; letter-spacing: .12em; }
.admin-nav-item::after { content: ""; position: absolute; right: -22px; width: 3px; height: 0; background: var(--accent); transition: height .22s var(--ease); }
.admin-nav-item:hover, .admin-nav-item.is-active { color: #fff; transform: translateX(2px); }
.admin-nav-item.is-active::after { height: 30px; }
.admin-sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.admin-sidebar-foot a, .admin-sidebar-foot button { border: 0; padding: 0; background: none; color: #96968d; font-size: 12px; text-align: left; text-decoration: none; cursor: pointer; }
.admin-sidebar-foot a:hover, .admin-sidebar-foot button:hover { color: #fff; }

.admin-workspace { grid-column: 2; padding: 34px 46px 60px; overflow: hidden; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.admin-header-actions { display: flex; align-items: center; gap: 18px; }
.admin-header-actions span { color: var(--muted); font-size: 12px; }
.admin-metrics { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.admin-metrics > div { min-height: 116px; padding: 22px 18px 18px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.admin-metrics > div + div { padding-left: 18px; }
.admin-metrics > div:last-child { border-right: 0; }
.admin-metrics span { color: var(--muted); font-size: 12px; }
.admin-metrics strong { font-size: 38px; font-weight: 580; letter-spacing: -.055em; }
.admin-filters {
  display: grid; grid-template-columns: minmax(260px, 1.65fr) minmax(150px, .7fr) minmax(170px, .8fr) auto;
  align-items: end; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--line);
}
.admin-filters label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.admin-filters input, .admin-filters select {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 0; padding: 0 12px;
  background: transparent; color: var(--ink); font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none;
}
.admin-filters input:focus, .admin-filters select:focus { outline: 1px solid var(--ink); outline-offset: -1px; }
.filter-clear {
  height: 42px; border: 0; border-bottom: 1px solid var(--line); padding: 0 2px; background: none;
  color: var(--muted); font-size: 12px; cursor: pointer;
}
.filter-clear:hover { border-color: var(--ink); color: var(--ink); }
.structure-workbench { padding: 30px 0 10px; border-bottom: 1px solid var(--line); }
.structure-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding-bottom: 18px; }
.structure-head .eyebrow { margin: 0 0 6px; }
.structure-head p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.structure-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.structure-head-actions span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.structure-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 30px; }
.structure-tree-panel { min-height: 360px; border-top: 1px solid var(--ink); }
.admin-structure-tree { padding: 9px 0 18px; }
.admin-tree-branch { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.admin-tree-node { margin: 0; }
.admin-tree-row { width: 100%; min-height: 55px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px 9px calc(10px + var(--tree-depth) * 22px); border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.admin-tree-row:hover { background: #f1f0e8; }
.admin-tree-row.is-selected { background: var(--ink); color: #fff; }
.admin-tree-row.is-context { opacity: .6; }
.admin-tree-row.is-selected.is-context { opacity: 1; }
.admin-tree-marker { width: 18px; height: 18px; display: grid; place-items: center; color: var(--muted); font-size: 14px; line-height: 1; }
.admin-tree-marker.is-toggle { border: 1px solid currentColor; font-weight: 760; cursor: pointer; transition: color .16s var(--ease), background .16s var(--ease); }
.admin-tree-marker.is-filter-reveal { cursor: default; opacity: .45; }
.admin-tree-row:hover .admin-tree-marker.is-toggle { color: var(--ink); }
.admin-tree-row.is-selected .admin-tree-marker { color: #aeaea5; }
.admin-tree-row.is-selected .admin-tree-marker.is-toggle { background: #2b2b26; color: #fff; }
.admin-tree-row-copy { min-width: 0; display: grid; gap: 3px; }
.admin-tree-row-copy strong { overflow: hidden; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.admin-tree-row-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-tree-row.is-selected .admin-tree-row-copy small { color: #b8b7ad; }
.admin-tree-status { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.admin-tree-status-draft { color: #a36d00; }
.admin-tree-status-archived { color: var(--muted); }
.admin-tree-row.is-selected .admin-tree-status { color: #fff; }
.structure-inspector { align-self: start; min-height: 360px; padding: 18px 0 22px; border-top: 1px solid var(--ink); }
.structure-inspector .eyebrow { margin: 0 0 13px; }
.structure-inspector h2 { margin: 0; font-size: 24px; line-height: 1.05; letter-spacing: -.04em; }
.inspector-code { margin: 8px 0 21px; color: var(--muted); font-size: 12px; }
.inspector-facts { display: grid; gap: 10px; margin: 0; }
.inspector-facts div { display: grid; gap: 3px; padding-top: 10px; border-top: 1px solid var(--line); }
.inspector-facts dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.inspector-facts dd { margin: 0; font-size: 12px; line-height: 1.45; }
.inspector-actions { display: grid; gap: 10px; margin-top: 22px; }
.inspector-actions .button { justify-content: center; }
.text-action { width: max-content; border: 0; border-bottom: 1px solid var(--line); padding: 3px 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.text-action:hover { border-color: var(--ink); color: var(--ink); }
.text-action-danger:hover { border-color: var(--danger); color: var(--danger); }
.delete-note, .structure-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.users-workbench { padding: 30px 0 10px; border-bottom: 1px solid var(--line); }
.users-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding-bottom: 18px; }
.users-head .eyebrow { margin: 0 0 6px; }
.users-head p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.users-head > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.users-layout { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(0, 1.3fr); gap: 30px; }
.users-list { min-height: 410px; border-top: 1px solid var(--ink); }
.user-org-group + .user-org-group { margin-top: 12px; }
.user-org-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; font-weight: 730; letter-spacing: .06em; text-transform: uppercase; }
.user-org-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-org-heading small { color: var(--muted); font-size: 12px; }
.user-list-row { width: 100%; min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.user-list-row:hover { background: #f1f0e8; }
.user-list-row.is-selected { background: var(--ink); color: #fff; }
.user-list-copy, .user-list-meta { min-width: 0; display: grid; gap: 4px; }
.user-list-copy strong, .user-list-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-list-copy strong { font-size: 13px; font-weight: 680; }
.user-list-copy small, .user-list-meta small { color: var(--muted); font-size: 12px; }
.user-list-meta { justify-items: end; }
.user-list-row.is-selected small { color: #b8b7ad; }
.user-inspector { align-self: start; min-height: 410px; padding: 18px 0 22px; border-top: 1px solid var(--ink); }
.user-inspector > .eyebrow { margin: 0 0 13px; }
.user-inspector > h2 { margin: 0; font-size: 28px; line-height: 1.05; letter-spacing: -.045em; }
.user-assignment-list { margin-top: 32px; }
.user-assignment-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 9px; border-bottom: 1px solid var(--ink); }
.user-assignment-head .eyebrow { margin: 0; }
.user-assignment-head span { color: var(--muted); font-size: 12px; }
.user-assignment { display: grid; grid-template-columns: minmax(210px, 1fr) auto; gap: 14px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.user-assignment-copy { min-width: 0; display: grid; gap: 4px; }
.user-assignment-copy strong { font-size: 13px; font-weight: 680; }
.user-assignment-copy small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.user-assignment-state { align-self: start; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.user-assignment-state-current { color: #5b6d00; }
.user-assignment-state-upcoming, .user-assignment-state-draft { color: #a36d00; }
.user-assignment-state-history { color: var(--muted); }
.user-assignment-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.user-profile-actions { display: flex; flex-wrap: wrap; align-items: center; }
.user-profile-panel { margin-top: 26px; border-top: 1px solid var(--ink); animation: profile-reveal .2s var(--ease) both; }
.user-profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 0 12px; }
.user-profile-head .eyebrow { margin: 0 0 6px; }
.user-profile-head p:last-child { max-width: 540px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.user-profile-head > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.user-work-profile { border-top: 1px solid var(--line); }
.user-work-profile:last-child { border-bottom: 1px solid var(--line); }
.user-work-profile summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; cursor: pointer; list-style: none; }
.user-work-profile summary::-webkit-details-marker { display: none; }
.user-work-profile summary::after { content: "+"; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 760; }
.user-work-profile[open] summary::after { content: "−"; border-color: var(--ink); color: var(--ink); }
.user-work-profile summary:hover::after { border-color: var(--ink); color: var(--ink); }
.user-work-profile summary > span:first-child { min-width: 0; display: grid; gap: 4px; }
.user-work-profile summary strong, .user-work-profile summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-work-profile summary strong { font-size: 13px; }
.user-work-profile summary small, .user-work-profile-count { color: var(--muted); font-size: 12px; }
.user-work-profile-context { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 0 12px; color: var(--muted); font-size: 12px; }
.user-work-profile-context .sla-tags { margin: 0; }
.user-duty-list { margin: 0; padding: 0 0 12px; list-style: none; }
.user-duty { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.user-duty-copy, .user-duty-meta { min-width: 0; display: grid; gap: 4px; }
.user-duty-copy strong { font-size: 12px; }
.user-duty-copy small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.user-duty-meta { align-content: start; justify-items: end; }
.user-duty-meta b { color: #5b6d00; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.user-duty-meta small { color: var(--muted); font-size: 12px; }
.user-duty-empty { padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@keyframes profile-reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.assignment-person { display: grid; gap: 4px; padding: 0 0 13px; border-bottom: 1px solid var(--line); }
.assignment-person span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.assignment-person strong { font-size: 15px; }
.positions-workbench { padding: 30px 0 10px; border-bottom: 1px solid var(--line); }
.positions-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding-bottom: 18px; }
.positions-head .eyebrow { margin: 0 0 6px; }
.positions-head p:last-child { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.positions-head > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.positions-layout { display: grid; grid-template-columns: minmax(310px, .85fr) minmax(0, 1.35fr); gap: 30px; }
.positions-list { min-height: 390px; border-top: 1px solid var(--ink); }
.position-org-group + .position-org-group { margin-top: 12px; }
.position-org-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; font-weight: 730; letter-spacing: .06em; text-transform: uppercase; }
.position-org-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.position-org-heading small { color: var(--muted); font-size: 12px; }
.position-list-row { width: 100%; min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.position-list-row:hover { background: #f1f0e8; }
.position-list-row.is-selected { background: var(--ink); color: #fff; }
.position-list-copy, .position-list-meta, .placement-copy { min-width: 0; display: grid; gap: 4px; }
.position-list-copy strong, .placement-copy strong { overflow: hidden; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.position-list-copy small, .position-list-meta small, .placement-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.position-list-meta { justify-items: end; }
.position-list-row.is-selected small { color: #b8b7ad; }
.position-status { color: #5b6d00; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.position-status-draft { color: #a36d00; }
.position-status-archived { color: var(--muted); }
.position-list-row.is-selected .position-status { color: #fff; }
.position-inspector { align-self: start; min-height: 390px; padding: 18px 0 22px; border-top: 1px solid var(--ink); }
.position-inspector > .eyebrow { margin: 0 0 13px; }
.position-inspector > h2 { margin: 0; font-size: 28px; line-height: 1.05; letter-spacing: -.045em; }
.position-profile-actions { grid-template-columns: repeat(2, minmax(0, max-content)); align-items: center; }
.position-profile-actions .text-action { align-self: center; }
.position-placements { margin-top: 32px; }
.position-placements-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 9px; border-bottom: 1px solid var(--ink); }
.position-placements-head .eyebrow { margin: 0; }
.position-placements-head span { color: var(--muted); font-size: 12px; }
.position-placement { min-height: 76px; display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(220px, auto); align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.placement-actions, .record-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 12px; }
.sla-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.sla-tags b { padding: 3px 6px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .06em; }
.sla-tags.is-empty { color: var(--muted); font-size: 12px; }
.position-empty { margin: 0; padding: 22px 0; color: var(--muted); font-size: 12px; }
.admin-register { padding-top: 34px; }
.admin-register[hidden] { display: none; }
.register-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 15px; }
.register-head p, .register-head span { margin: 0; color: var(--muted); font-size: 12px; }
.admin-register table { min-width: 820px; }
.admin-register td { vertical-align: middle; }
.org-group-row td { padding: 18px 10px 8px; border-bottom-color: var(--ink); background: #efeee6; color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.org-group-content { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; }
.org-group-row .org-path { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.org-group-row small { color: var(--muted); font-size: 12px; }
.record-primary { display: block; font-weight: 680; }
.record-secondary { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.inline-action { border: 0; border-bottom: 1px solid var(--line); padding: 4px 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.inline-action:hover { color: var(--ink); border-color: var(--ink); }
.inline-action-danger:hover { color: var(--danger); border-color: var(--danger); }
.role-mark { font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.role-admin { color: #5b6d00; }
.state-off { color: var(--danger); }
.admin-drawer { width: min(590px, 100%); }
.admin-drawer.is-onboarding { width: min(760px, 100%); }
.admin-drawer.is-duty-catalog { width: min(820px, 100%); }
.catalog-form[hidden] { display: none !important; }
.duty-catalog-form[hidden] { display: none !important; }
.duty-catalog-form { display: grid; gap: 18px; }
.duty-catalog-context { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr); gap: 18px; padding: 0 0 14px; border-bottom: 1px solid var(--ink); }
.duty-catalog-context div { min-width: 0; display: grid; gap: 4px; }
.duty-catalog-context span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.duty-catalog-context strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.duty-catalog-search { margin-top: 2px; }
.duty-catalog-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; }
.duty-catalog-summary strong { color: var(--ink); font-size: 12px; font-weight: 680; }
.duty-catalog-list { max-height: min(54svh, 620px); overflow-y: auto; padding-right: 4px; }
.duty-catalog-group + .duty-catalog-group { margin-top: 16px; }
.duty-catalog-group > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }
.duty-catalog-group > header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duty-catalog-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.duty-catalog-item:hover { background: #f1f0e8; }
.duty-catalog-item:has(input:disabled) { cursor: default; }
.duty-catalog-item input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--ink); }
.duty-catalog-copy, .duty-catalog-meta { min-width: 0; display: grid; gap: 4px; }
.duty-catalog-copy strong { font-size: 12px; }
.duty-catalog-copy small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.duty-catalog-meta { justify-items: end; }
.duty-catalog-meta b { color: #5b6d00; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.duty-catalog-meta small { color: var(--muted); font-size: 12px; }
.duty-catalog-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 2px; }
.duty-catalog-actions .button { min-width: 160px; justify-content: center; }
.onboarding-form[hidden], .wizard-step[hidden], .wizard-person-panel[hidden] { display: none !important; }
.onboarding-form { gap: 24px; }
.wizard-progress { display: grid; grid-template-columns: repeat(3, 1fr); margin: -8px 0 10px; padding: 0; border-bottom: 1px solid var(--line); list-style: none; }
.wizard-progress li { display: flex; align-items: center; gap: 8px; padding: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.wizard-progress li span { font-size: 12px; }
.wizard-progress li.is-active { border-bottom: 2px solid var(--ink); color: var(--ink); }
.wizard-progress li.is-complete { color: #5b6d00; }
.wizard-step { display: grid; gap: 20px; animation: wizard-step-in .2s var(--ease); }
.wizard-step-intro { display: grid; gap: 5px; padding-bottom: 4px; }
.wizard-step-intro .eyebrow { margin: 0; }
.wizard-step-intro h3 { margin: 0; font-size: 24px; line-height: 1.08; letter-spacing: -.035em; }
.wizard-step-intro p:last-child { max-width: 580px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.wizard-mode { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ink); }
.wizard-mode label { position: relative; display: block; padding: 12px 4px; color: var(--muted); cursor: pointer; }
.wizard-mode label + label { padding-left: 16px; border-left: 1px solid var(--line); }
.wizard-mode input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wizard-mode label:has(input:checked) { background: var(--ink); color: #fff; }
.wizard-mode label:has(input:checked) span { padding-left: 12px; }
.wizard-person-panel { display: grid; gap: 18px; }
.wizard-vacancy-context { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; padding: 15px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.wizard-vacancy-context div { min-width: 0; display: grid; gap: 4px; }
.wizard-vacancy-context span, .wizard-review dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wizard-vacancy-context strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.wizard-review { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--ink); }
.wizard-review div { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wizard-review div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
.wizard-review dd { margin: 0; font-size: 12px; line-height: 1.45; }
.wizard-duties { margin-top: 4px; }
.wizard-duties > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 9px; border-bottom: 1px solid var(--ink); }
.wizard-duties .eyebrow { margin: 0; }
.wizard-duties > div:first-child span { color: var(--muted); font-size: 12px; }
.wizard-duty { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.wizard-duty strong { font-size: 12px; }
.wizard-duty small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 6px; }
.wizard-actions .button { min-width: 130px; justify-content: center; }
@keyframes wizard-step-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
.check-label { display: flex; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; min-height: 44px; }
.check-label input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.edit-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 1050px) {
  .admin-shell { grid-template-columns: 86px 1fr; }
  .admin-sidebar { width: 86px; padding: 24px 14px; }
  .admin-sidebar .brand-name, .admin-nav-label, .admin-nav-item:not(.is-active) { }
  .admin-sidebar .brand-name, .admin-sidebar .brand-tagline, .admin-sidebar .brand-context { display: none; }
  .admin-nav-label { visibility: hidden; margin-top: 64px; }
  .admin-nav-item { grid-template-columns: 1fr; font-size: 0; justify-items: center; }
  .admin-nav-item span { font-size: 12px; }
  .admin-sidebar-foot { overflow: hidden; }
  .admin-workspace { padding: 30px 28px 50px; }
  .admin-metrics { grid-template-columns: repeat(3, 1fr); }
  .admin-filters { grid-template-columns: 1fr 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .filter-clear { justify-self: start; }
  .structure-layout { grid-template-columns: minmax(0, 1.35fr) minmax(240px, .75fr); gap: 22px; }
  .users-layout { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 22px; }
  .positions-layout { grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); gap: 22px; }
  .position-placement { grid-template-columns: minmax(150px, 1fr) auto; padding: 10px 0; }
  .placement-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 700px) {
  .admin-shell { display: block; padding-top: 62px; }
  .admin-sidebar { position: fixed; width: 100%; height: 62px; padding: 0 14px; flex-direction: row; align-items: center; overflow-x: auto; }
  .admin-sidebar .brand { margin-right: auto; }
  .admin-nav-label, .admin-sidebar-foot { display: none; }
  .admin-nav { display: flex; }
  .admin-nav-item { width: 42px; padding: 10px 5px; }
  .admin-nav-item::after { right: 7px; bottom: 0; width: 0; height: 2px; }
  .admin-nav-item.is-active::after { width: 28px; height: 2px; }
  .admin-workspace { padding: 24px 16px 42px; }
  .admin-header { align-items: flex-start; }
  .admin-header-actions span { display: none; }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-metrics > div { min-height: 98px; }
  .admin-filters { grid-template-columns: 1fr; gap: 12px; }
  .filter-search { grid-column: auto; }
  .structure-head { align-items: flex-start; flex-direction: column; }
  .structure-head-actions { width: 100%; justify-content: space-between; }
  .structure-layout { grid-template-columns: 1fr; gap: 22px; }
  .structure-tree-panel, .structure-inspector { min-height: auto; }
  .admin-tree-row { grid-template-columns: 16px minmax(0, 1fr); }
  .admin-tree-status { grid-column: 2; }
  .users-head { align-items: flex-start; flex-direction: column; }
  .users-layout { grid-template-columns: 1fr; gap: 22px; }
  .users-list, .user-inspector { min-height: auto; }
  .user-profile-actions { align-items: stretch; flex-direction: column; }
  .user-profile-actions .button { width: 100%; }
  .user-profile-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .user-work-profile summary { grid-template-columns: minmax(0, 1fr) 18px; }
  .user-work-profile-count { display: none; }
  .user-duty { grid-template-columns: 1fr; gap: 7px; }
  .user-duty-meta { display: flex; justify-content: space-between; }
  .positions-head { align-items: flex-start; flex-direction: column; }
  .positions-layout { grid-template-columns: 1fr; gap: 22px; }
  .positions-list, .position-inspector { min-height: auto; }
  .position-profile-actions { grid-template-columns: 1fr; }
  .position-placement { grid-template-columns: minmax(0, 1fr) auto; }
  .wizard-vacancy-context, .wizard-review { grid-template-columns: 1fr; }
  .wizard-review div:nth-child(even) { padding-left: 0; border-left: 0; }
  .wizard-mode { grid-template-columns: 1fr; }
  .wizard-mode label + label { padding-left: 4px; border-top: 1px solid var(--line); border-left: 0; }
  .duty-catalog-context { grid-template-columns: 1fr; }
  .duty-catalog-item { grid-template-columns: 18px minmax(0, 1fr); }
  .duty-catalog-meta { grid-column: 2; display: flex; justify-content: space-between; }
  .duty-catalog-actions { align-items: stretch; flex-direction: column-reverse; }
  .duty-catalog-actions .button { width: 100%; }
}

/* v0.11 visual system — reference dashboard */
:root {
  --admin-night: #07111f;
  --admin-night-2: #0b1728;
  --admin-canvas: #f7f8fc;
  --admin-card: rgba(255, 255, 255, .92);
  --admin-line: #e2e5ec;
  --admin-copy: #0b1324;
  --admin-muted: #70798c;
  --admin-violet: #7440ec;
  --admin-blue: #1599f5;
  --admin-cyan: #12c6de;
  --admin-lime: #b8f33f;
  --admin-shadow: 0 9px 24px rgba(16, 26, 46, .07), 0 2px 7px rgba(16, 26, 46, .04);
  --admin-radius: 16px;
  --admin-text-xs: 10px;
  --admin-text-sm: 12px;
  --admin-text-md: 14px;
}

.ui-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body:has(#admin-shell:not([hidden])) { background: var(--admin-night); color: var(--admin-copy); }

.admin-shell { min-height: 100svh; grid-template-columns: 270px minmax(0, 1fr); background: radial-gradient(circle at 12% 3%, #10223a 0, var(--admin-night) 34%); }
.admin-sidebar { width: 270px; padding: 35px 15px 28px; background: transparent; color: #f7f9ff; }
.admin-sidebar .brand { padding: 0 10px; }
.admin-sidebar .brand-mark { color: var(--admin-lime); font-size: 31px; }
.admin-sidebar .brand-name { font-size: 30px; }
.admin-sidebar .brand-context { color: #8c96a8; }
.admin-nav-label { margin: 54px 14px 11px; color: #657085; font-size: 12px; letter-spacing: .12em; }
.admin-nav { gap: 6px; }
.admin-nav-item {
  grid-template-columns: 24px 30px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 54px; padding: 0 13px;
  border: 1px solid transparent; border-radius: 11px; color: #bec5d2; transform: none;
}
.admin-nav-item span { color: #798397; font-size: 12px; }
.admin-nav-item .ui-icon { width: 21px; height: 21px; }
.admin-nav-item b { font-size: 14px; font-weight: 620; }
.admin-nav-item::after { right: -1px; width: 5px; border-radius: 5px; background: var(--admin-lime); box-shadow: 0 0 12px rgba(184, 243, 63, .35); }
.admin-nav-item:hover { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.045); color: #fff; transform: none; }
.admin-nav-item.is-active { border-color: rgba(184, 196, 219, .22); background: linear-gradient(100deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.admin-nav-item.is-active::after { height: 27px; }
.admin-nav-item.is-active span, .admin-nav-item.is-active .ui-icon { color: #eaf0fb; }
.admin-sidebar-foot { gap: 12px; }
.admin-sidebar-foot .workspace-link { padding-left: 12px; color: #788399; font-size: 12px; }
.sidebar-user-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) 30px; align-items: center; gap: 10px; min-height: 76px; padding: 10px 11px; border: 1px solid rgba(181, 194, 220, .22); border-radius: 12px; background: rgba(7, 17, 31, .5); }
.sidebar-avatar { width: 43px; height: 43px; display: grid; place-items: center; border: 1.5px solid var(--admin-lime); border-radius: 50%; color: #fff; font-size: 14px; font-weight: 680; box-shadow: 0 0 15px rgba(184, 243, 63, .08); }
.sidebar-user-copy { min-width: 0; display: grid; gap: 4px; }
.sidebar-user-copy strong, .sidebar-user-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy strong { color: #f5f7fb; font-size: 12px; }
.sidebar-user-copy small { color: #8993a6; font-size: 12px; }
.sidebar-user-card #logout-button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(181, 194, 220, .24); border-radius: 50%; color: #cbd2df; font-size: 17px; }
.sidebar-user-card #logout-button:hover { border-color: var(--admin-lime); color: var(--admin-lime); }

.admin-workspace {
  grid-column: 2; min-height: 100svh; padding: 35px 34px 48px; border-radius: 18px 0 0 18px;
  background:
    radial-gradient(circle at 76% 45%, rgba(116, 64, 236, .055), transparent 25%),
    radial-gradient(circle at 98% 9%, rgba(21, 153, 245, .05), transparent 25%),
    var(--admin-canvas);
  overflow: hidden;
}
.admin-workspace::before { content: ""; position: fixed; z-index: 0; inset: 0 0 0 270px; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(36,48,76,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(36,48,76,.025) 1px, transparent 1px); background-size: 28px 28px; }
.admin-workspace > * { position: relative; z-index: 1; }
.admin-header { min-height: 86px; align-items: center; padding: 0 5px 24px; border: 0; }
.admin-header .eyebrow { margin-bottom: 10px; color: #273cb8; font-size: 12px; letter-spacing: .18em; }
.admin-header h1 { color: #071124; font-size: clamp(38px, 4.1vw, 58px); font-weight: 680; letter-spacing: -.058em; }
.admin-header-actions { gap: 18px; }
.admin-header-actions span { color: var(--admin-muted); font-size: 12px; }

.button { min-height: 44px; border-radius: 10px; padding: 0 17px; border-color: #d9dde6; }
.button-primary { border: 0; background: linear-gradient(112deg, var(--admin-violet), #5c4ff0 47%, var(--admin-cyan)); color: #fff; box-shadow: 0 7px 16px rgba(92, 79, 240, .22); }
.button-primary:hover { background: linear-gradient(112deg, #6734e6, #435ff2 48%, #0ebbd8); box-shadow: 0 10px 20px rgba(92, 79, 240, .28); }
.button-secondary { border-color: #d9dde6; background: rgba(255,255,255,.72); color: #2529ad; }
#open-create::before, #add-root-org-unit::before { content: "+"; margin-right: 9px; font-size: 21px; font-weight: 400; line-height: 0; }

.admin-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; padding: 0 0 20px; border: 0; }
.admin-metrics > .metric-card {
  min-height: 113px; display: grid; grid-template-columns: 60px minmax(0, 1fr) 38px; grid-template-rows: 1fr 1fr;
  align-items: center; gap: 0 10px; padding: 16px; border: 1px solid rgba(224,227,235,.9); border-radius: 15px;
  background: var(--admin-card); box-shadow: var(--admin-shadow); color: var(--metric-color);
  animation: admin-card-in .45s var(--ease) both;
}
.admin-metrics > .metric-card + .metric-card { padding-left: 16px; }
.admin-metrics > .metric-card:nth-child(2) { animation-delay: .04s; }
.admin-metrics > .metric-card:nth-child(3) { animation-delay: .08s; }
.admin-metrics > .metric-card:nth-child(4) { animation-delay: .12s; }
.admin-metrics > .metric-card:nth-child(5) { animation-delay: .16s; }
.metric-green { --metric-color: #58ad27; --metric-bg: #eff9df; }
.metric-violet { --metric-color: #7746ef; --metric-bg: #f1ebff; }
.metric-blue { --metric-color: #158eed; --metric-bg: #e9f4fe; }
.metric-cyan { --metric-color: #08abc1; --metric-bg: #e4f9fb; }
.metric-orange { --metric-color: #d97600; --metric-bg: #fff2e2; }
.metric-icon { grid-row: 1 / 3; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--metric-bg); }
.metric-icon .ui-icon { width: 30px; height: 30px; }
.admin-metrics .metric-card > span:nth-child(2) { align-self: end; color: #5c6578; font-size: var(--admin-text-sm); }
.admin-metrics .metric-card strong { align-self: start; color: var(--metric-color); font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.metric-spark { grid-column: 3; grid-row: 2; width: 38px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }

.admin-filters { grid-template-columns: minmax(280px, 1.8fr) minmax(160px, .72fr) minmax(180px, .84fr) auto; gap: 16px; padding: 14px 15px 15px; border: 1px solid var(--admin-line); border-radius: 15px; background: rgba(255,255,255,.78); box-shadow: var(--admin-shadow); }
.admin-filters label { position: relative; gap: 6px; color: #424b5d; font-size: var(--admin-text-xs); font-weight: 620; letter-spacing: 0; text-transform: none; }
.admin-filters input, .admin-filters select { height: 46px; border: 1px solid #dde1e9; border-radius: 8px; padding: 0 14px; background: rgba(255,255,255,.78); color: #111a2d; font-size: var(--admin-text-sm); }
.admin-filters input:focus, .admin-filters select:focus { border-color: #7768e9; outline: 3px solid rgba(119,104,233,.1); }
.filter-search .ui-icon { position: absolute; z-index: 1; left: 14px; bottom: 13px; width: 18px; height: 18px; color: #697388; }
.admin-filters .filter-search input { padding-left: 44px; }
.filter-clear { height: 46px; display: flex; align-items: center; gap: 9px; border: 1px solid #dde1e9; border-radius: 8px; padding: 0 14px; background: rgba(255,255,255,.82); color: #394255; font-size: var(--admin-text-sm); }
.filter-clear .ui-icon { width: 17px; height: 17px; }

.structure-workbench, .users-workbench, .positions-workbench { padding: 18px 0 0; border: 0; }
.structure-layout { grid-template-columns: minmax(0, 1.48fr) minmax(330px, .82fr); gap: 13px; }
.structure-tree-panel, .structure-inspector, .users-workbench, .positions-workbench, .admin-register { border: 1px solid var(--admin-line); border-radius: var(--admin-radius); background: rgba(255,255,255,.82); box-shadow: var(--admin-shadow); }
.structure-tree-panel { min-height: 480px; padding: 0 16px 14px; }
.structure-head { align-items: center; padding: 20px 5px 15px; border-bottom: 1px solid #e5e8ee; }
.structure-head h2 { color: #0b1426; font-size: 18px; font-weight: 690; }
.panel-title-row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.panel-title-row > span { padding: 3px 8px; border-radius: 999px; background: #f0f1f5; color: #737c8e; font-size: var(--admin-text-xs); }
.structure-head p:last-child { max-width: 620px; color: #687185; font-size: var(--admin-text-sm); }
.structure-head-actions { flex: 0 0 auto; }
.structure-head-actions .button { min-height: 40px; }
.admin-structure-tree { overflow-x: auto; padding: 9px 4px 12px; }
.admin-tree-branch { position: relative; gap: 5px; }
.admin-tree-node { position: relative; }
.admin-tree-row {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr);
  align-items: stretch; width: 100%; min-height: 56px; padding: 0; border: 0;
  --tree-card-offset: 44px; --tree-marker-offset: 7px;
  background: transparent; color: #111a2d; text-align: left;
}
.admin-tree-row[data-tree-depth="1"] { --tree-card-offset: 78px; --tree-marker-offset: 41px; }
.admin-tree-row[data-tree-depth="2"] { --tree-card-offset: 112px; --tree-marker-offset: 75px; }
.admin-tree-row[data-tree-depth="3"] { --tree-card-offset: 146px; --tree-marker-offset: 109px; }
.admin-tree-row[data-tree-depth="4"] { --tree-card-offset: 180px; --tree-marker-offset: 143px; }
.admin-tree-row[data-tree-depth="5"] { --tree-card-offset: 214px; --tree-marker-offset: 177px; }
.admin-tree-row[data-tree-depth="6"] { --tree-card-offset: 248px; --tree-marker-offset: 211px; }
.admin-tree-row[data-tree-depth="7"] { --tree-card-offset: 282px; --tree-marker-offset: 245px; }
.admin-tree-row[data-tree-depth="8"] { --tree-card-offset: 316px; --tree-marker-offset: 279px; }
.admin-tree-row[data-tree-depth="9"] { --tree-card-offset: 350px; --tree-marker-offset: 313px; }
.admin-tree-row[data-tree-depth="10"] { --tree-card-offset: 384px; --tree-marker-offset: 347px; }
.admin-tree-row[data-tree-depth="11"] { --tree-card-offset: 418px; --tree-marker-offset: 381px; }
.admin-tree-row[data-tree-depth="12"] { --tree-card-offset: 452px; --tree-marker-offset: 415px; }
.admin-tree-card {
  position: relative; z-index: 0; grid-area: 1 / 1; display: grid; width: auto; min-height: 56px;
  grid-template-columns: 38px minmax(0, 1fr) auto 22px; align-items: center; gap: 9px;
  margin-left: var(--tree-card-offset); padding: 6px 12px; border: 1px solid #e5e8ee; border-radius: 9px;
  background: rgba(255,255,255,.76); box-shadow: 0 2px 5px rgba(21,31,50,.025);
}
.admin-tree-row[data-tree-depth="0"] .admin-tree-card { padding-left: 14px; }
.admin-tree-card > * { position: relative; z-index: 2; }
.tree-guide { position: absolute; z-index: 1; left: 19.5px; width: 1px; border-left: 1px solid #c9d0dc; pointer-events: none; }
.tree-guide[data-guide-level="1"] { left: 53.5px; }
.tree-guide[data-guide-level="2"] { left: 87.5px; }
.tree-guide[data-guide-level="3"] { left: 121.5px; }
.tree-guide[data-guide-level="4"] { left: 155.5px; }
.tree-guide[data-guide-level="5"] { left: 189.5px; }
.tree-guide[data-guide-level="6"] { left: 223.5px; }
.tree-guide[data-guide-level="7"] { left: 257.5px; }
.tree-guide[data-guide-level="8"] { left: 291.5px; }
.tree-guide[data-guide-level="9"] { left: 325.5px; }
.tree-guide[data-guide-level="10"] { left: 359.5px; }
.tree-guide[data-guide-level="11"] { left: 393.5px; }
.tree-guide[data-guide-level="12"] { left: 427.5px; }
.tree-guide-through { top: -8px; bottom: -8px; }
.tree-guide-elbow { top: -8px; }
.tree-guide-elbow.continues { bottom: -8px; }
.tree-guide-elbow.is-last { bottom: 50%; }
.tree-guide-elbow::after { content: ""; position: absolute; left: -1px; width: 35px; height: 1px; background: #c9d0dc; }
.tree-guide-elbow.continues::after { top: 50%; }
.tree-guide-elbow.is-last::after { top: 100%; }
.tree-guide-descend { top: 50%; bottom: -8px; }
.admin-tree-row.is-selected .tree-guide { border-color: #59677b; }
.admin-tree-row.is-selected .tree-guide-elbow::after { background: #59677b; }
.admin-tree-row:hover { background: transparent; transform: none; }
.admin-tree-row:hover .admin-tree-card { border-color: #cfd5e0; background: #fff; }
.admin-tree-row.is-selected { border: 0; background: transparent; color: #fff; box-shadow: none; }
.admin-tree-row.is-selected .admin-tree-card { border-color: #101d31; background: linear-gradient(105deg, #101a2d, #061120); color: #fff; box-shadow: 0 8px 18px rgba(7,17,31,.17); }
.admin-tree-row:focus-visible { outline: 0; }
.admin-tree-row:focus-visible .admin-tree-card { outline: 2px solid #7458e8; outline-offset: 2px; }
.admin-tree-marker {
  position: relative; z-index: 3; grid-area: 1 / 1; align-self: center; justify-self: start;
  width: 25px; height: 25px; margin-left: var(--tree-marker-offset);
  border-radius: 5px; font-size: 15px; transform: none;
}
.admin-tree-marker.is-toggle { border-color: #d7dce6; background: #fff; color: #25324a; }
.admin-tree-marker.is-toggle { box-shadow: 0 1px 3px rgba(15,27,46,.08); }
.admin-tree-marker.is-collapsed { padding-bottom: 2px; font-size: 20px; font-weight: 500; }
.admin-tree-marker.is-expanded { font-size: 15px; }
.admin-tree-marker.is-leaf::before { content: ""; width: 6px; height: 6px; border: 1.5px solid #b7c0cf; border-radius: 50%; background: #fff; }
.admin-tree-row.is-selected .admin-tree-marker.is-leaf::before { border-color: #9b76ef; background: #101a2d; }
.admin-tree-row.is-selected .admin-tree-marker.is-toggle { border-color: #101d31; background: #101a2d; color: #fff; box-shadow: 0 4px 10px rgba(7,17,31,.16); }
.admin-tree-unit-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 8px; background: #edf5ff; color: #167ee9; }
.admin-tree-unit-icon .ui-icon { width: 21px; height: 21px; }
.admin-tree-row[data-unit-type="BOARD"] .admin-tree-unit-icon { background: #f1ebff; color: #7440ec; }
.admin-tree-row[data-unit-type="GROUP"] .admin-tree-unit-icon { background: #eef9df; color: #55a92b; }
.admin-tree-row[data-unit-type="SERVICE"] .admin-tree-unit-icon { background: #f1ebff; color: #7440ec; }
.admin-tree-row.is-selected .admin-tree-unit-icon { background: rgba(116,64,236,.18); color: #a879ff; }
.admin-tree-row-copy { gap: 3px; }
.admin-tree-row-copy strong { font-size: var(--admin-text-md); font-weight: 650; line-height: 1.25; }
.admin-tree-row-copy small { color: #6c7588; font-size: var(--admin-text-xs); line-height: 1.3; }
.admin-tree-row.is-selected .admin-tree-row-copy small { color: #aeb8ca; }
.admin-tree-status { display: flex; align-items: center; gap: 7px; color: #526071; font-size: var(--admin-text-xs); font-weight: 580; line-height: 1.2; letter-spacing: 0; text-transform: none; }
.admin-tree-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #63bd2d; }
.admin-tree-status-draft::before { background: #e29a2c; }
.admin-tree-status-archived::before { background: #a7afbd; }
.admin-tree-row.is-selected .admin-tree-status { color: #e7ebf2; }
.admin-tree-more { color: #778195; font-size: 12px; letter-spacing: 1px; text-align: right; }
.admin-tree-row.is-selected .admin-tree-more { color: #dce3ef; }

.structure-inspector { min-height: 480px; padding: 21px 20px 18px; border-top: 1px solid rgba(116,64,236,.28); background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,243,255,.78)); }
.structure-inspector .eyebrow { color: #616b7d; }
.structure-inspector > h2 { color: #091326; font-size: 20px; }
.inspector-entity { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: center; gap: 14px; margin: 22px 0 18px; }
.inspector-entity h2 { margin: 0 0 7px; color: #091326; font-size: 22px; line-height: 1.12; letter-spacing: -.035em; }
.inspector-entity-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #f0eaff, #f8f5ff); color: #7144e9; }
.inspector-entity-icon .ui-icon { width: 31px; height: 31px; }
.inspector-code { color: #687288; font-size: var(--admin-text-sm); }
.inspector-facts { gap: 0; }
.inspector-facts div { grid-template-columns: minmax(150px, .75fr) 1fr; align-items: center; gap: 12px; min-height: 54px; padding: 10px 0; border-top: 1px solid #e3e6ed; }
.inspector-facts dt { color: #606b7f; font-size: var(--admin-text-xs); letter-spacing: 0; text-transform: none; }
.inspector-facts dd { color: #162035; font-size: var(--admin-text-sm); }
.inspector-actions { margin-top: 20px; }
.structure-inspector .inspector-actions .button-primary { width: 100%; min-height: 48px; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: #f0f2f5; color: #616c7e; font-size: 12px; font-weight: 620; }
.status-pill-active { border: 1px solid #bae777; background: #eaf9ce; color: #3d7b1b; }
.status-pill-draft { border: 1px solid #f2cf93; background: #fff4df; color: #9b620a; }
.status-pill-archived { border: 1px solid #d8dde6; background: #f0f2f5; color: #687285; }
.text-action { color: #687287; }

.users-workbench, .positions-workbench { padding: 20px; }
.users-head, .positions-head { padding: 0 0 15px; border-bottom: 1px solid #e5e8ee; }
.users-head .eyebrow, .positions-head .eyebrow { color: #263bb3; }
.users-head p:last-child, .positions-head p:last-child { color: #6e7789; font-size: 12px; }
.users-layout, .positions-layout, .duties-layout { gap: 14px; padding-top: 13px; }
.users-list, .user-inspector, .positions-list, .position-inspector { border-top: 0; }
.user-list-row, .position-list-row { min-height: 66px; margin-bottom: 5px; border: 1px solid #e5e8ee; border-radius: 9px; padding: 10px 12px; }
.user-list-row:hover, .position-list-row:hover { background: #fff; border-color: #cfd5e0; }
.user-list-row.is-selected, .position-list-row.is-selected { border-color: #101d31; background: linear-gradient(105deg, #101a2d, #061120); color: #fff; }
.user-inspector, .position-inspector { padding: 18px 16px; border: 1px solid #e2e5ec; border-radius: 13px; background: linear-gradient(145deg, #fff, #faf9ff); }
.user-inspector > h2, .position-inspector > h2 { color: #0b1426; font-size: 24px; }
.user-assignment, .position-placement { border-color: #e5e8ee; }
.position-placement { padding: 9px 0; }

.admin-register { margin-top: 18px; padding: 20px; }
.register-head { padding-bottom: 14px; }
.table-wrap { border-top-color: #e1e5ec; }
.admin-register th { color: #697386; border-color: #e5e8ee; }
.admin-register td { border-color: #e8ebf0; }
.org-group-row td { background: #f6f7fa; border-bottom-color: #dce1e9; }
.inline-action { color: #5964b6; }
.inline-action:hover { color: #4728c7; border-color: #7458e8; }

.task-drawer.admin-drawer { border-radius: 18px 0 0 18px; background: #fbfcff; box-shadow: -18px 0 42px rgba(5,14,28,.18); }
.drawer-backdrop { background: rgba(5,13,25,.38); backdrop-filter: blur(3px); }
.drawer-head { border-bottom-color: #e1e5ec; }
.admin-drawer input, .admin-drawer select, .admin-drawer textarea { border-radius: 8px; border-color: #dce1e9; background: #fff; }
.admin-drawer input:focus, .admin-drawer select:focus, .admin-drawer textarea:focus { border-color: #7664ea; outline: 3px solid rgba(118,100,234,.1); }

@keyframes admin-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1220px) {
  .admin-shell { grid-template-columns: 92px minmax(0, 1fr); }
  .admin-sidebar { width: 92px; padding: 28px 12px; }
  .admin-sidebar .brand-name, .admin-sidebar .brand-tagline, .admin-sidebar .brand-context, .admin-nav-label, .admin-nav-item span, .admin-nav-item b, .admin-sidebar-foot { display: none; }
  .admin-sidebar .brand { padding: 0; justify-content: center; }
  .admin-sidebar .brand-mark { font-size: 25px; }
  .admin-nav { margin-top: 56px; }
  .admin-nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .admin-nav-item::after { right: -12px; }
  .admin-workspace { grid-column: 2; padding: 28px 24px 42px; }
  .admin-workspace::before { left: 92px; }
  .admin-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .structure-layout { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .8fr); }
}

@media (max-width: 820px) {
  .admin-shell { display: block; padding-top: 66px; }
  .admin-sidebar { position: fixed; width: 100%; height: 66px; padding: 0 14px; flex-direction: row; background: var(--admin-night); }
  .admin-sidebar .brand { margin-right: auto; }
  .admin-nav { display: flex; margin: 0; }
  .admin-nav-item { width: 44px; min-height: 44px; }
  .admin-nav-item::after { right: 8px; bottom: -10px; width: 0; height: 3px; }
  .admin-nav-item.is-active::after { width: 27px; height: 3px; }
  .admin-workspace { min-height: calc(100svh - 66px); padding: 22px 14px 36px; border-radius: 0; }
  .admin-workspace::before { display: none; }
  .admin-header { align-items: flex-start; }
  .admin-header h1 { font-size: 39px; }
  .admin-header-actions span { display: none; }
  .admin-metrics { display: flex; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; }
  .admin-metrics > .metric-card { flex: 0 0 220px; scroll-snap-align: start; }
  .admin-filters { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .structure-layout, .users-layout, .positions-layout, .duties-layout { grid-template-columns: 1fr; }
  .structure-head { align-items: flex-start; flex-direction: column; }
  .structure-head-actions { width: 100%; }
  .structure-head-actions .button { width: 100%; justify-content: center; }
  .structure-tree-panel, .structure-inspector { min-height: auto; }
  .admin-tree-row { min-width: 560px; padding: 0; }
  .admin-tree-status { grid-column: 3; }
  .admin-tree-more { grid-column: 4; grid-row: 1; }
  .inspector-facts div { grid-template-columns: 1fr; gap: 4px; }
}

/* v0.13 — unified position → profile → duties → people editor */
.positions-layout { grid-template-columns: minmax(290px, .58fr) minmax(0, 1.72fr); align-items: start; }
.duties-workbench { padding-top: 2px; }
.duties-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 4px 4px 14px; border-bottom: 1px solid #dfe3ea; }
.duties-head > div { min-width: 0; }
.duties-head p:last-child { max-width: 760px; margin: 5px 0 0; color: #727d90; font-size: 13px; line-height: 1.5; }
.duties-head > span { flex: 0 0 auto; color: #788295; font-size: 12px; }
.duties-layout { display: grid; grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr); align-items: start; gap: 14px; padding-top: 13px; }
.duties-list, .duty-inspector { min-width: 0; border: 1px solid #e0e4eb; border-radius: 15px; background: rgba(255,255,255,.88); box-shadow: 0 8px 24px rgba(29,39,63,.055); }
.duties-list { max-height: calc(100svh - 300px); min-height: 430px; overflow: auto; padding: 12px; }
.duty-inspector { overflow: hidden; }
.duty-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid #e1e5ec; }
.duty-detail-head > div:first-child { min-width: 0; }
.duty-detail-head h2 { max-width: 760px; margin: 7px 0 5px; color: #111b30; font-size: clamp(22px,2vw,31px); line-height: 1.08; letter-spacing: -.035em; }
.duty-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.duty-head-actions .button { min-height: 36px; padding: 8px 12px; }
.duty-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: 0 24px; }
.duty-facts > div { min-width: 0; display: grid; gap: 5px; padding: 15px 0; border-bottom: 1px solid #e6e9ef; }
.duty-facts > div:nth-child(odd) { padding-right: 20px; }
.duty-facts > div:nth-child(even) { padding-left: 20px; border-left: 1px solid #e6e9ef; }
.duty-facts dt { color: #747f91; font-size: 12px; }
.duty-facts dd { margin: 0; overflow-wrap: anywhere; color: #172137; font-size: 13px; font-weight: 650; line-height: 1.45; }
.duty-detail-section { padding: 18px 24px; border-bottom: 1px solid #e1e5ec; }
.duty-detail-section:last-child { border-bottom: 0; }
.duty-result { margin: 8px 0 10px; color: #3c485d; font-size: 13px; line-height: 1.62; white-space: pre-line; }
.duty-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.duty-section-head > span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #f0edf9; color: #6343db; font-size: 11px; font-weight: 750; text-align: center; }
.duty-linked-list { margin: 10px 0 0; padding: 0; list-style: none; }
.duty-linked-list li { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid #e7eaf0; }
.duty-linked-list strong { color: #172137; font-size: 13px; }
.duty-linked-list small { color: #747f91; font-size: 12px; line-height: 1.45; }
.duty-empty { display: grid; justify-items: start; gap: 14px; min-height: 260px; align-content: center; padding: 28px; color: #747f91; font-size: 13px; }
.position-inspector { min-height: 520px; padding: 22px; animation: chain-panel-in .24s var(--ease) both; }
.chain-position-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; scroll-margin-top: 18px; }
.chain-position-head .eyebrow { margin: 0 0 9px; color: #263bb3; }
.chain-position-head h2 { max-width: 720px; margin: 0; color: #0b1426; font-size: 27px; line-height: 1.08; letter-spacing: -.04em; }
.chain-position-head .inspector-code { margin: 8px 0 0; }
.chain-head-actions { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px 12px; }
.chain-head-actions .button { min-height: 38px; }

.role-chain-map { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1.2fr) 32px minmax(0, .8fr) 32px minmax(0, .8fr); align-items: center; margin: 22px 0 0; padding: 15px; border: 1px solid #e0e4ec; border-radius: 12px; background: #f7f8fb; }
.role-chain-map button { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 8px; border: 0; padding: 4px; background: transparent; color: #111a2d; text-align: left; cursor: pointer; }
.role-chain-map button:hover strong, .role-chain-map button:focus-visible strong { color: #5b3fda; }
.role-chain-map button:focus-visible { border-radius: 6px; outline: 2px solid rgba(116,64,236,.35); outline-offset: 2px; }
.role-chain-map button span { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #ece7ff; color: #6740dc; font-size: 12px; font-weight: 760; }
.role-chain-map button small { color: #6b7588; font-size: 12px; line-height: 1.2; }
.role-chain-map button strong { overflow: hidden; color: #18233a; font-size: 12px; font-weight: 680; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; transition: color .16s var(--ease); }
.role-chain-map i { position: relative; height: 1px; margin: 0 7px; background: #bfc7d5; }
.role-chain-map i::after { content: ""; position: absolute; top: -3px; right: -1px; width: 6px; height: 6px; border-top: 1px solid #8e99ab; border-right: 1px solid #8e99ab; transform: rotate(45deg); }

.chain-position-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 13px 0 0; border-top: 1px solid #e3e6ed; }
.chain-position-facts div { display: grid; grid-template-columns: minmax(120px, .8fr) 1fr; gap: 12px; padding: 12px 0; }
.chain-position-facts div + div { padding-left: 18px; border-left: 1px solid #e3e6ed; }
.chain-position-facts dt { color: #697386; font-size: 12px; }
.chain-position-facts dd { margin: 0; color: #172137; font-size: 12px; }

.chain-section { margin-top: 24px; border-top: 1px solid #cfd5df; scroll-margin-top: 18px; }
.chain-section > header { min-height: 65px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 12px 0; }
.chain-section > header > div { min-width: 0; }
.chain-section > header .eyebrow { margin: 0 0 5px; color: #263bb3; font-size: 12px; }
.chain-section > header h3 { overflow: hidden; margin: 0; color: #10192c; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.chain-section > header > span { color: #6e788a; font-size: 12px; white-space: nowrap; }
.chain-section > header .button { min-height: 36px; padding: 0 12px; font-size: 12px; }
.chain-context-note { margin: -2px 0 10px; color: #7b6b45; font-size: 12px; line-height: 1.45; }

.chain-work-profile-list { display: grid; gap: 7px; }
.chain-work-profile { overflow: hidden; border: 1px solid #e1e5ed; border-radius: 10px; background: rgba(255,255,255,.68); transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease); }
.chain-work-profile:hover { border-color: #cbd2df; transform: translateY(-1px); }
.chain-work-profile.is-selected { border-color: #7560e8; box-shadow: 0 6px 16px rgba(71,56,175,.09); }
.chain-work-profile-select { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; border: 0; padding: 12px; background: transparent; color: #142036; text-align: left; cursor: pointer; }
.chain-work-profile-select:focus-visible { outline: 2px solid #7458e8; outline-offset: -2px; }
.chain-work-profile-index { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: #f0edff; color: #6840dc; font-size: 12px; font-weight: 760; }
.chain-work-profile.is-selected .chain-work-profile-index { background: #7045e7; color: #fff; }
.chain-work-profile-metrics { display: grid; justify-items: end; gap: 3px; }
.chain-work-profile-metrics b { color: #28334a; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chain-work-profile-metrics small { color: #717b8e; font-size: 12px; white-space: nowrap; }
.chain-work-profile .placement-actions { justify-content: flex-start; padding: 8px 12px; border-top: 1px solid #eaedf2; background: #fafbfc; }

.chain-duty-groups { border-top: 1px solid #e1e5ed; }
.chain-duty-group { border-bottom: 1px solid #e1e5ed; }
.chain-duty-group summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 12px; min-height: 46px; padding: 8px 4px; color: #202b40; cursor: pointer; list-style: none; }
.chain-duty-group summary::-webkit-details-marker { display: none; }
.chain-duty-group summary::after { content: "+"; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #d6dce6; border-radius: 5px; color: #526075; font-size: 14px; }
.chain-duty-group[open] summary::after { content: "−"; border-color: #7560e8; color: #5a3ed0; }
.chain-duty-group summary span { font-size: 12px; font-weight: 700; letter-spacing: .035em; }
.chain-duty-group summary small { color: #737d8f; font-size: 12px; }
.chain-duty-list { animation: chain-list-in .18s var(--ease) both; }
.chain-duty-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(120px, auto); align-items: start; gap: 12px; padding: 12px 4px 12px 14px; border-top: 1px solid #eef0f4; }
.chain-duty-copy { min-width: 0; display: grid; gap: 4px; }
.chain-duty-copy strong { color: #172137; font-size: 12px; line-height: 1.35; }
.chain-duty-copy small { color: #707a8d; font-size: 12px; line-height: 1.45; }
.chain-duty-copy small:last-child { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.chain-origin { min-height: 20px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 7px; background: #eef5e6; color: #4f7f27; font-size: 12px; font-weight: 720; white-space: nowrap; }
.chain-origin-linked { background: #eaf2ff; color: #2871bb; }
.chain-origin-inherited { background: #f0ebff; color: #6740c8; }
.chain-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 10px; }

.chain-assignment-list { border-top: 1px solid #e1e5ed; }
.chain-assignment-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(140px, auto); align-items: center; gap: 13px; min-height: 70px; padding: 10px 4px; border-bottom: 1px solid #e8ebf0; }
.chain-person { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 11px; border: 0; padding: 0; background: transparent; color: #142036; text-align: left; cursor: pointer; }
.chain-person:hover strong { color: #5636ca; }
.chain-person:focus-visible { border-radius: 6px; outline: 2px solid rgba(116,64,236,.35); outline-offset: 3px; }
.chain-person-avatar { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #d7ddec; border-radius: 50%; background: #f3f1ff; color: #6241ce; font-size: 12px; font-weight: 720; }
.chain-person > span:last-child { min-width: 0; display: grid; gap: 3px; }
.chain-person strong, .chain-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chain-person strong { font-size: 12px; transition: color .16s var(--ease); }
.chain-person small { color: #707a8d; font-size: 12px; }

@keyframes chain-panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chain-list-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .positions-layout { grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr); }
  .duties-layout { grid-template-columns: minmax(320px,.72fr) minmax(0,1.28fr); }
  .role-chain-map { grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 1fr; padding: 12px; }
  .role-chain-map i { margin: 0 2px; }
  .chain-work-profile-select { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .chain-work-profile-select > .position-status { grid-column: 2; justify-self: start; }
  .chain-duty-row { grid-template-columns: minmax(0, 1fr) auto; }
  .chain-duty-row .chain-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .chain-assignment-row { grid-template-columns: minmax(0, 1fr) auto; }
  .chain-assignment-row .chain-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 820px) {
  .positions-layout, .duties-layout { grid-template-columns: 1fr; }
  .duties-list { max-height: 560px; min-height: 320px; }
  .position-inspector { padding: 16px; }
  .chain-position-head { flex-direction: column; }
  .chain-head-actions { justify-content: flex-start; }
  .role-chain-map { grid-template-columns: 1fr; gap: 0; }
  .role-chain-map i { width: 1px; height: 18px; margin: 2px 0 2px 15px; }
  .role-chain-map i::after { top: auto; right: -3px; bottom: 0; transform: rotate(135deg); }
  .chain-position-facts { grid-template-columns: 1fr; }
  .chain-position-facts div { grid-template-columns: 1fr; gap: 4px; }
  .chain-position-facts div + div { padding-left: 0; border-top: 1px solid #e3e6ed; border-left: 0; }
  .chain-section > header { grid-template-columns: minmax(0, 1fr) auto; }
  .chain-section > header .button { justify-content: center; }
  .chain-work-profile-select { grid-template-columns: 28px minmax(0, 1fr); }
  .chain-work-profile-metrics, .chain-work-profile-select > .position-status { grid-column: 2; justify-self: start; }
  .chain-duty-row, .chain-assignment-row { grid-template-columns: 1fr; }
  .chain-origin { justify-self: start; }
  .chain-duty-row .chain-row-actions, .chain-assignment-row .chain-row-actions { grid-column: auto; justify-content: flex-start; }
}

@media (max-width: 680px) {
  .duties-head, .duty-detail-head { align-items: stretch; flex-direction: column; }
  .duty-head-actions { justify-content: flex-start; }
  .duty-facts { grid-template-columns: 1fr; }
  .duty-facts > div:nth-child(odd), .duty-facts > div:nth-child(even) { padding: 13px 0; border-left: 0; }
  .duty-detail-head, .duty-detail-section { padding-left: 16px; padding-right: 16px; }
}

/* v0.31 — hierarchical user directory and compact tabbed profile */
.users-directory { min-width: 0; overflow: hidden; border: 1px solid #e0e4ec; border-radius: 15px; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(29,39,63,.05); }
.users-directory > header { min-height: 67px; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid #e3e7ee; }
.users-directory > header h2 { margin: 0 0 3px; color: #111b30; font-size: 15px; line-height: 1.2; }
.users-directory > header p { margin: 0; color: #758094; font-size: 11px; line-height: 1.35; }
.users-directory-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: #eaf3ff; color: #1680ed; }
.users-directory-icon .ui-icon { width: 21px; height: 21px; }
.users-directory .users-list { max-height: calc(100svh - 365px); min-height: 520px; overflow: auto; padding: 10px; scrollbar-gutter: stable; }
.users-directory .hp-card { box-shadow: none; }

.user-inspector { min-width: 0; overflow: hidden; padding: 0; border: 1px solid #dde3ee; border-radius: 17px; background: rgba(255,255,255,.92); box-shadow: 0 12px 34px rgba(38,49,78,.07); }
.user-profile-hero { position: relative; overflow: hidden; padding: 20px; border-bottom: 1px solid #e1e6ef; background: linear-gradient(135deg,#fff 0%,#f8faff 62%,#eef3ff 100%); }
.user-profile-hero::after { content:""; position:absolute; width:300px; height:300px; right:-115px; top:-150px; border-radius:50%; border:42px solid rgba(94,82,225,.045); pointer-events:none; }
.user-profile-kicker { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.user-profile-kicker > span:first-child { color: #6544db; font-size: 11px; font-weight: 760; letter-spacing: .105em; text-transform: uppercase; }
.user-profile-identity { position: relative; z-index: 1; display: grid; grid-template-columns: 74px minmax(0,1fr); align-items: center; gap: 16px; margin-top: 15px; }
.user-profile-avatar { position: relative; width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#2e225d,#111a38); color: #86db39; font-size: 24px; font-weight: 750; box-shadow: 0 8px 22px rgba(31,25,74,.18); }
.user-profile-avatar i { position:absolute; right:2px; bottom:3px; width:16px; height:16px; border:3px solid #fff; border-radius:50%; background:#55bd28; }
.user-profile-identity h2 { margin: 0 0 6px; color: #0d1730; font-size: clamp(23px,2.25vw,33px); line-height: 1.08; letter-spacing: -.04em; overflow-wrap: break-word; }
.user-profile-identity p { margin: 0; color: #66728a; font-size: 13px; }
.user-profile-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 20px; }
.user-profile-metrics > div { min-width: 0; display: grid; gap: 6px; min-height: 70px; align-content: center; padding: 11px 13px; border: 1px solid #e3e8f1; border-radius: 11px; background: rgba(255,255,255,.82); }
.user-profile-metrics span { color: #758095; font-size: 11px; }
.user-profile-metrics strong { overflow: hidden; color: #152038; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }

.user-profile-workspace { min-width: 0; padding: 0 18px 18px; }
.user-profile-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid #e2e6ee; scrollbar-width: thin; }
.user-profile-tabs button { flex: 0 0 auto; min-height: 49px; border: 0; border-bottom: 2px solid transparent; padding: 0 10px; background: transparent; color: #69758a; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; transition: color .16s var(--ease),border-color .16s var(--ease),background .16s var(--ease); }
.user-profile-tabs button:hover { color: #5638ce; background: #faf9ff; }
.user-profile-tabs button.is-active { border-bottom-color: #7048e8; color: #5638ce; }
.user-tab-content { min-height: 250px; padding: 15px 0 8px; animation: profile-reveal .18s var(--ease) both; }
.user-tab-section { min-width: 0; }
.user-tab-section > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 0 11px; border-bottom: 1px solid #e4e8ef; }
.user-tab-section > header .eyebrow { margin: 0 0 3px; color: #2852c5; font-size: 10px; }
.user-tab-section > header h3 { margin: 0; color: #172238; font-size: 15px; }
.user-tab-section > header > span { color: #6f7a8d; font-size: 11px; }
.user-tab-section > header .button { min-height: 34px; padding: 7px 11px; }
.user-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
.user-detail-grid > div { display: grid; grid-template-columns: minmax(110px,.8fr) minmax(0,1.2fr); align-items: center; gap: 10px; min-height: 49px; border-bottom: 1px solid #e7eaf0; }
.user-detail-grid > div:nth-child(odd) { padding-right: 16px; }
.user-detail-grid > div:nth-child(even) { padding-left: 16px; border-left: 1px solid #e7eaf0; }
.user-detail-grid dt { color: #737e92; font-size: 11px; }
.user-detail-grid dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #172238; font-size: 12px; font-weight: 620; }
.user-tab-content .user-assignment-list { margin-top: 0; }
.user-tab-content .user-assignment { padding: 12px 2px; }
.user-tab-note { margin: 15px 0 0; color: #6d788c; font-size: 12px; line-height: 1.55; }
.user-history { margin: 0; padding: 0; list-style: none; }
.user-history li { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 50px; border-bottom: 1px solid #e6e9ef; color: #172238; font-size: 12px; }
.user-history span { color: #748094; white-space: nowrap; }
.user-profile-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 8px; padding-top: 14px; border-top: 1px solid #e0e5ed; }
.user-profile-actions .button { width: 100%; min-height: 41px; justify-content: center; }

@media (max-width: 1500px) {
  .user-profile-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .user-profile-actions { grid-template-columns: 1fr; }
}
@media (max-width: 1280px) {
  .users-directory .users-list { max-height: min(56dvh,620px); min-height: 330px; }
}
@media (max-width: 680px) {
  .users-workbench { padding-left: 0; padding-right: 0; }
  .user-profile-hero { padding: 16px; }
  .user-profile-identity { grid-template-columns: 58px minmax(0,1fr); }
  .user-profile-avatar { width: 58px; height: 58px; font-size: 18px; }
  .user-profile-identity h2 { font-size: 22px; }
  .user-profile-metrics { grid-template-columns: 1fr 1fr; }
  .user-profile-metrics > div { min-height: 62px; }
  .user-profile-workspace { padding: 0 13px 14px; }
  .user-detail-grid { grid-template-columns: 1fr; }
  .user-detail-grid > div:nth-child(odd),.user-detail-grid > div:nth-child(even) { padding: 0; border-left: 0; }
  .user-history li { align-items: flex-start; flex-direction: column; gap: 4px; padding: 10px 0; }
}
