.admin-org-tree { padding:0; overflow:hidden; }
.admin-org-tree__header { display:flex; align-items:center; flex-wrap:wrap; gap:16px; padding:18px 20px 10px; }
.admin-org-tree__header h2 { margin:0; margin-right:auto; }
.admin-org-tree__tools { display:flex; align-items:center; gap:8px; padding:8px 20px; border-bottom:1px solid var(--border-default,#dddde5); }
.admin-org-tree__viewport { height:540px; overflow:auto; background:radial-gradient(#dedbe8 1px,transparent 1px) 0 0/20px 20px; cursor:grab; padding:35px; touch-action:none; }
.admin-org-tree__viewport:active { cursor:grabbing; }
.admin-org-tree__stage { min-width:max-content; width:100%; }
.admin-org-tree__branches,.admin-org-tree__branches ul { display:flex; justify-content:center; gap:24px; list-style:none; padding:0; margin:0; }
.admin-org-tree__branches li { display:flex; flex-direction:column; align-items:center; position:relative; }
.admin-org-tree__branches ul { padding-top:32px; position:relative; }
/* Each branch has a parent stem, a junction halfway down the gap, and
   child stems. Half-gap extensions join siblings even with unequal subtrees. */
.admin-org-tree__branches ul:before { content:''; position:absolute; left:50%; top:0; width:1px; height:16px; background:var(--border-default,#ccc8d8); pointer-events:none; }
.admin-org-tree__branches ul>li:before { content:''; position:absolute; left:50%; top:-16px; width:1px; height:16px; background:var(--border-default,#ccc8d8); pointer-events:none; }
.admin-org-tree__branches ul>li:after { content:''; position:absolute; left:-12px; top:-16px; width:calc(100% + 24px); height:1px; background:var(--border-default,#ccc8d8); pointer-events:none; }
.admin-org-tree__branches ul>li:first-child:after { left:50%; width:calc(50% + 12px); }
.admin-org-tree__branches ul>li:last-child:after { width:calc(50% + 12px); }
.admin-org-tree__branches ul>li:only-child:after { display:none; }
.admin-org-tree__person { width:236px; border:1px solid var(--border-default,#dedbe8); border-radius:14px; box-shadow:0 3px 10px #2817500a; background:var(--surface-default,#fff); overflow:hidden; }
.admin-org-tree__person.is-selected { border-color:var(--brand-solid,#6446b8); }
.admin-org-tree__select { border:0; background:none; width:100%; display:flex; align-items:center; text-align:left; gap:12px; padding:16px; color:inherit; cursor:pointer; font:inherit; }
.admin-org-tree__select>span:last-child { min-width:0; }
.admin-org-tree__select strong,.admin-org-tree__select span span,.admin-org-tree__select small { display:block; overflow-wrap:anywhere; }
.admin-org-tree__select span span,.admin-org-tree__select small { font-size:12px; color:var(--text-secondary,#706b7e); margin-top:4px; }
.admin-org-tree__avatar { display:grid; place-items:center; flex-shrink:0; width:38px; height:38px; border-radius:50%; background:#f0eafa; color:#6542a3; font-weight:600; }
.admin-org-tree__expand { border:0; border-top:1px solid var(--border-default,#eeeaf5); background:transparent; color:var(--text-secondary,#706b7e); cursor:pointer; width:100%; padding:8px; font:inherit; font-size:12px; }
.admin-org-tree.is-fullscreen { position:fixed; inset:16px; z-index:150; background:var(--surface-default,#fff); box-shadow:0 0 0 30px #231a3d66; }
.admin-org-tree.is-fullscreen .admin-org-tree__viewport { height:calc(100vh - 170px); }
.admin-org-tree__sheet { margin:0 0 0 auto; height:100dvh; max-height:100dvh; width:min(480px,100%); max-width:100%; border-radius:0; padding:24px; }
.admin-org-tree__path { display:flex; flex-wrap:wrap; gap:6px; margin:20px 0; }
.admin-org-tree__path button { border:0; border-radius:6px; padding:6px 8px; background:#f2edf9; color:#6442a0; cursor:pointer; }
.admin-org-tree__facts { display:grid; gap:12px; margin:20px 0; }
.admin-org-tree__facts>div { display:flex; justify-content:space-between; gap:16px; }
.admin-org-tree__facts dt { color:var(--text-secondary,#706b7e); }
.admin-org-tree__facts dd { margin:0; font-weight:600; }
.admin-org-tree__team,.admin-org-tree__outline,.admin-org-tree__outline ul { list-style:none; padding:0; }
.admin-org-tree__team button { width:100%; background:none; border:0; border-bottom:1px solid #eeeaf5; text-align:left; padding:14px 0; cursor:pointer; color:inherit; }
.admin-org-tree__team span { display:block; margin-top:4px; color:var(--text-secondary,#706b7e); font-size:12px; }
.admin-org-tree__outline ul { padding-left:16px; }
.admin-org-tree__outline .admin-org-tree__person { width:100%; margin:8px 0; box-shadow:none; }
@media(max-width:700px) { .admin-org-tree__header>.description { width:100%; order:3; } .admin-org-tree__viewport { height:460px; } .admin-org-tree__tools { flex-wrap:wrap; padding:8px; } }
