/* Organization page: org chart with connector lines, unit and people lists, dialogs. Colours are the app tokens. */
.org-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 12px; font-size: 13px; }
.org-stat { display: inline-flex; align-items: baseline; gap: 6px; color: var(--text); }
a.org-stat { text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
a.org-stat:hover { border-bottom-color: var(--brand); }
.org-stat strong { font-weight: 600; font-variant-numeric: tabular-nums; }

.org-scroll { overflow-x: auto; padding: 4px 2px 12px; }
.org-tree, .org-kids { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.org-tree { margin: 0 auto; }
.org-tree > li { display: flex; flex-direction: column; align-items: center; padding: 0 8px; }
.org-kids { position: relative; padding-top: 16px; }
.org-kids::before { content: ''; position: absolute; top: 0; left: 50%; height: 16px; border-left: 1px solid var(--line-strong); }
.org-kids > li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 16px 8px 0; }
.org-kids > li::before, .org-kids > li::after { content: ''; position: absolute; top: 0; width: 50%; border-top: 1px solid var(--line-strong); }
.org-kids > li::before { right: 50%; }
.org-kids > li::after { left: 50%; }
.org-kids > li:first-child::before, .org-kids > li:last-child::after { display: none; }
.org-kids > li > .org-node { position: relative; }
.org-kids > li > .org-node::before { content: ''; position: absolute; top: -16px; left: 50%; height: 16px; border-left: 1px solid var(--line-strong); }

.org-box { box-sizing: border-box; width: 200px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.org-pbox { padding: 4px; }
.org-unplaced { margin: 20px auto 0; }
.org-box-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.org-box-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.org-code { flex: none; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-3); }
.org-box-head .chip { flex: none; }
.org-sw { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--line-strong); }
.org-members { display: grid; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }

.org-person { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; min-width: 0; padding: 4px 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.org-person:hover { background: var(--sunk); }
.org-person.org-head { padding: 2px 0; }
.org-person-text { display: flex; flex: 1 1 90px; flex-direction: column; min-width: 0; }
.org-person-name, .org-person-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-person-name { font-size: 13px; }
.org-person-title { font-size: 12px; color: var(--text-3); }
.org-person .chip { flex: none; }

.org-indent { display: inline-flex; align-items: center; gap: 8px; padding-left: calc(var(--depth, 0) * 18px); }
.org-who { display: inline-flex; align-items: center; gap: 8px; }
.org-acts-in { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.org-build { display: inline-flex; align-items: center; gap: 4px; }

.org-form { display: grid; gap: 12px; }
.org-error { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad-ink); font-size: 13px; }
.org-error[hidden] { display: none; }
.org-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.org-color { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); cursor: pointer; }
.org-color[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 2px; }
.org-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.org-crumbs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--text); }
.org-crumbs .ic { color: var(--text-3); }
.org-ro { font-size: 14px; }
.org-open { justify-self: start; }

@media (max-width: 700px) {
  .org-box { width: 180px; }
  .org-stats { gap: 4px 14px; }
}
