.orgchart-app {
  --orgchart-green: #07965b;
  --orgchart-green-dark: #08725a;
  --orgchart-ink: #17231d;
  --orgchart-muted: #6f7c75;
  --orgchart-line: #94a39c;
  position: relative;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #dfeae5;
  color: var(--orgchart-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.orgchart-app,
.orgchart-app *,
.orgchart-app *::before,
.orgchart-app *::after {
  box-sizing: border-box;
}

.orgchart-app [hidden],
.orgchart-position-modal-layer [hidden] { display: none !important; }

.orgchart-navigator {
  position: relative;
  z-index: 20;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid #dfe6e2;
  background: #fff;
}

.orgchart-transfer-panel {
  position: absolute;
  z-index: 24;
  inset: 0;
  overflow: auto;
  padding: 0 10px 18px;
  background: #fff;
  scrollbar-width: thin;
}

.orgchart-transfer-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 4px;
  border-bottom: 1px solid #e7ece9;
  background: #fff;
}

.orgchart-transfer-head strong { color: #1c2a23; font-size: 15px; }
.orgchart-transfer-head span { color: #7c8982; font-size: 11px; }
.orgchart-transfer-group { padding: 12px 2px 2px; }
.orgchart-transfer-group h3 { margin: 0 5px 6px; color: #748179; font-size: 11px; }

.orgchart-transfer-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  margin: 3px 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f6f8f7;
  color: #2a3831;
  font: inherit;
  text-align: left;
}

.orgchart-transfer-target strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.orgchart-transfer-target small { color: #8a9690; font-size: 10px; }
.orgchart-transfer-target:disabled { opacity: 0.38; }
.orgchart-transfer-target.is-drop-target { border-color: var(--orgchart-green); background: #e8f7ef; box-shadow: 0 0 0 3px rgba(7, 150, 91, 0.13); }

.orgchart-visual {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 255, 255, 0.58), transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(86, 143, 115, 0.11), transparent 38%),
    linear-gradient(145deg, #e3ece8, #d7e4de);
}

.orgchart-toolbar {
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  border-bottom: 1px solid #dfe6e2;
  background: #fff;
}

.orgchart-toolbar-leading { display: flex; align-items: center; min-width: 0; }
.orgchart-breadcrumb { display: flex; align-items: center; min-width: 0; overflow: hidden; }

.orgchart-breadcrumb button {
  max-width: 150px;
  overflow: hidden;
  padding: 6px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5b6861;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orgchart-breadcrumb button:hover,
.orgchart-breadcrumb button:focus-visible { background: #eef5f1; color: var(--orgchart-green-dark); outline: 0; }
.orgchart-breadcrumb button[aria-current="page"] { color: #17231d; }
.orgchart-breadcrumb-separator { color: #a1aaa5; font-size: 12px; }
.orgchart-toolbar-actions { display: flex; align-items: center; gap: 6px; }

.orgchart-tool-button,
.orgchart-primary-action,
.orgchart-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d8e1dc;
  border-radius: 7px;
  background: #fff;
  color: #435149;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.orgchart-tool-button:hover,
.orgchart-tool-button:focus-visible,
.orgchart-secondary-action:hover,
.orgchart-secondary-action:focus-visible { border-color: rgba(7, 150, 91, 0.5); color: var(--orgchart-green-dark); outline: 0; }
.orgchart-primary-action { border-color: var(--orgchart-green); background: var(--orgchart-green); color: #fff; }
.orgchart-primary-action:hover,
.orgchart-primary-action:focus-visible { border-color: var(--orgchart-green-dark); background: var(--orgchart-green-dark); outline: 0; }
.orgchart-tool-button:disabled,
.orgchart-primary-action:disabled,
.orgchart-secondary-action:disabled { cursor: not-allowed; opacity: 0.48; }
.orgchart-tool-button.zoom-value { min-width: 55px; font-variant-numeric: tabular-nums; }
.orgchart-readonly { padding: 4px 7px; border-radius: 999px; background: #e9eeeb; color: #69756f; font-size: 10px; font-weight: 700; }

.orgchart-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }

.orgchart-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: 0;
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 255, 255, 0.58), transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(86, 143, 115, 0.11), transparent 38%),
    linear-gradient(145deg, #e3ece8, #d7e4de);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.orgchart-viewport:focus-visible { box-shadow: inset 0 0 0 2px rgba(7, 150, 91, 0.3); }
.orgchart-viewport.is-panning { cursor: grabbing; }

.orgchart-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 1000px;
  height: 720px;
}

.orgchart-connectors,
.orgchart-edge-actions,
.orgchart-node-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.orgchart-connectors { z-index: 1; overflow: visible; }
.orgchart-edge-actions { z-index: 2; pointer-events: none; }
.orgchart-node-layer { z-index: 3; pointer-events: none; }

.orgchart-edge {
  fill: none;
  stroke: var(--orgchart-line);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.orgchart-edge.is-executive-chain { stroke: #39745a; stroke-width: 1.8; }
.orgchart-edge.is-department-branch { stroke: #879990; }

.orgchart-arrow-head { fill: var(--orgchart-line); }
.orgchart-edge-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: context-menu; vector-effect: non-scaling-stroke; }

.orgchart-edge-add {
  position: absolute;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(7, 150, 91, 0.42);
  border-radius: 50%;
  background: #fff;
  color: var(--orgchart-green-dark);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  opacity: 0.12;
  pointer-events: auto;
  box-shadow: 0 4px 10px rgba(35, 63, 50, 0.12);
  transition: opacity 120ms ease, box-shadow 120ms ease;
}

.orgchart-edge-add:hover,
.orgchart-edge-add:focus-visible { opacity: 1; outline: 0; box-shadow: 0 0 0 3px rgba(7, 150, 91, 0.12); }

.orgchart-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid #7d8b84;
  border-radius: 7px;
  background: #fff;
  color: var(--orgchart-ink);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 5px 14px rgba(31, 58, 45, 0.07);
  text-align: center;
  -webkit-font-smoothing: antialiased;
  transition: border-color 130ms ease, box-shadow 130ms ease, transform 130ms ease, opacity 130ms ease;
}

.orgchart-node:hover,
.orgchart-node:focus-visible { z-index: 5; border-color: var(--orgchart-green); outline: 0; box-shadow: 0 9px 20px rgba(26, 74, 51, 0.14), 0 0 0 3px rgba(7, 150, 91, 0.12); }
.orgchart-node.is-selected { z-index: 4; border-color: var(--orgchart-green); box-shadow: 0 10px 22px rgba(20, 76, 50, 0.15), 0 0 0 3px rgba(7, 150, 91, 0.15); }

.orgchart-node strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: var(--orgchart-title-size, 13px);
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orgchart-node.company > strong {
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

.orgchart-node small { display: block; max-width: 100%; overflow: hidden; color: var(--orgchart-muted); font-size: var(--orgchart-meta-size, 10px); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.orgchart-node.company { border-color: #26775a; background: #edf7f1; box-shadow: 0 7px 18px rgba(25, 75, 52, 0.1); }
.orgchart-node-kind { display: block; max-width: 100%; overflow: hidden; color: var(--orgchart-green-dark); font-size: var(--orgchart-meta-size, 10px); font-weight: 700; letter-spacing: 0.04em; text-overflow: ellipsis; white-space: nowrap; }
.orgchart-node.department,
.orgchart-node.position {
  border-color: rgba(255, 255, 255, 0.92);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 250, 0.68));
  box-shadow:
    0 7px 16px rgba(24, 80, 62, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(18, 126, 96, 0.07);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
}

.orgchart-node.department::before,
.orgchart-node.position::before {
  position: absolute;
  z-index: 0;
  top: 2px;
  right: 10px;
  left: 10px;
  height: 43%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
  content: "";
  pointer-events: none;
}

.orgchart-node.department:hover,
.orgchart-node.department:focus-visible,
.orgchart-node.position:hover,
.orgchart-node.position:focus-visible {
  border-color: rgba(7, 150, 91, 0.58);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 251, 247, 0.76));
  box-shadow:
    0 12px 23px rgba(21, 91, 68, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(18, 126, 96, 0.08),
    0 0 0 3px rgba(7, 150, 91, 0.1);
  transform: translateY(-2px);
}

.orgchart-node.department.is-scene-root {
  border-color: rgba(18, 126, 96, 0.34);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(232, 247, 240, 0.6));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(54, 103, 78, 0.13),
    0 13px 27px rgba(18, 104, 78, 0.13);
}
.orgchart-node.position.is-executive {
  border-color: rgba(44, 119, 87, 0.36);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(231, 245, 238, 0.56));
}
.orgchart-node.position.is-top-executive {
  border-color: rgba(38, 119, 90, 0.52);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(224, 242, 233, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(41, 98, 70, 0.15),
    0 13px 27px rgba(25, 75, 52, 0.14);
}
.orgchart-node.position.is-subordinate-executive {
  border-color: rgba(56, 121, 91, 0.4);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.87), rgba(236, 247, 241, 0.53));
}

.orgchart-node.department:hover,
.orgchart-node.department:focus-visible,
.orgchart-node.position:hover,
.orgchart-node.position:focus-visible {
  border-color: rgba(7, 150, 91, 0.58);
  box-shadow:
    0 12px 23px rgba(21, 91, 68, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(18, 126, 96, 0.08),
    0 0 0 3px rgba(7, 150, 91, 0.1);
  transform: translateY(-2px);
}

.orgchart-node.department:active,
.orgchart-node.position:not(.is-expanded):active {
  z-index: 6;
  border-color: rgba(24, 137, 103, 0.26);
  background: linear-gradient(145deg, rgba(242, 250, 247, 0.8), rgba(255, 255, 255, 0.9));
  box-shadow:
    0 3px 8px rgba(24, 80, 62, 0.08),
    inset 0 2px 5px rgba(18, 84, 64, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(1px) scale(0.985);
  transition-duration: 90ms;
}

.orgchart-position-mark {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 50%;
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: rgba(114, 139, 126, 0.42);
  transform: translateX(-50%);
}
.orgchart-node.position.is-management .orgchart-position-mark,
.orgchart-node.position.is-expanded .orgchart-position-mark { background: var(--orgchart-green); }

.orgchart-node.position.is-expanded {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-color: var(--orgchart-green);
  border-radius: 10px;
  background: #fff;
  cursor: default;
  text-align: left;
}

.orgchart-node.position.is-expanded:hover,
.orgchart-node.position.is-expanded:focus-visible { box-shadow: 0 12px 26px rgba(20, 76, 50, 0.16), 0 0 0 3px rgba(7, 150, 91, 0.14); }
.orgchart-node.position.is-opening { animation: orgchart-roster-open 280ms cubic-bezier(0.2, 0.75, 0.28, 1); }

.orgchart-roster-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 13px 14px 10px;
  border-bottom: 1px solid #e4eae7;
  background: #f1f8f4;
}

.orgchart-roster-head > span { grid-column: 1 / -1; color: var(--orgchart-green-dark); font-size: 10px; font-weight: 700; }
.orgchart-roster-head strong { align-self: center; font-size: var(--orgchart-title-size, 16px); }
.orgchart-roster-head small { align-self: center; font-size: var(--orgchart-meta-size, 11px); }
.orgchart-roster { min-height: 0; overflow: auto; padding: 5px 8px 8px; scrollbar-width: thin; }

.orgchart-roster-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #27352e;
  cursor: grab;
  font: inherit;
  text-align: left;
}

.orgchart-roster-person:hover,
.orgchart-roster-person:focus-visible,
.orgchart-roster-person.is-selected { background: #eaf5ef; outline: 0; }
.orgchart-roster-person:active { cursor: grabbing; }
.orgchart-roster-person strong { font-size: 12px; }
.orgchart-roster-person small { font-size: 9px; }

.orgchart-person-avatar {
  display: grid;
  flex: 0 0 var(--orgchart-avatar-size, 30px);
  place-items: center;
  width: var(--orgchart-avatar-size, 30px);
  height: var(--orgchart-avatar-size, 30px);
  border-radius: 50%;
  background: #e3f2e9;
  color: var(--orgchart-green-dark);
  font-size: 11px;
  font-weight: 700;
}

.orgchart-roster-person.is-inactive { filter: grayscale(0.9); opacity: 0.58; }
.orgchart-roster-person.is-inactive strong { text-decoration: line-through; }
.orgchart-roster-empty { display: grid; min-height: 52px; place-items: center; color: #87928c; font-size: 12px; }
.orgchart-node.is-drop-target { border-color: var(--orgchart-green); background: #e8f7ef; box-shadow: 0 0 0 5px rgba(7, 150, 91, 0.18); }

.orgchart-position-modal-layer {
  --orgchart-green: #07965b;
  --orgchart-green-dark: #08725a;
  --orgchart-ink: #17231d;
  position: fixed;
  z-index: 2147483600;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    clamp(36px, 7vh, 60px) calc(55px + var(--linxi-workbench-modal-right, 0px))
    clamp(36px, 7vh, 60px) calc(55px + var(--linxi-workbench-modal-left, 0px));
  box-sizing: border-box;
  background: rgba(31, 55, 47, 0.32);
  color: var(--orgchart-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-backdrop-filter: blur(10px) saturate(78%);
  backdrop-filter: blur(10px) saturate(78%);
  isolation: isolate;
  opacity: 0;
  pointer-events: none;
  transition: opacity 170ms ease;
}

.orgchart-position-modal-layer *,
.orgchart-position-modal-layer *::before,
.orgchart-position-modal-layer *::after { box-sizing: border-box; }
.orgchart-position-modal-layer[hidden] { display: none !important; }
.orgchart-position-modal-layer.is-open { opacity: 1; pointer-events: auto; }
.orgchart-position-modal-layer.is-closing { opacity: 0; }

.orgchart-position-modal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1060px, 100%);
  height: min(760px, 100%);
  min-height: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  background: rgba(247, 252, 249, 0.97);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 28px 64px rgba(6, 42, 31, 0.26),
    0 0 0 1px rgba(48, 132, 102, 0.08);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
  backdrop-filter: blur(22px) saturate(118%);
  transform-origin: 50% 50%;
}

.orgchart-position-modal-layer.is-open .orgchart-position-modal {
  animation: orgchart-position-modal-enter 210ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.orgchart-position-modal-layer.is-closing .orgchart-position-modal {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 150ms ease, transform 150ms ease;
}

.orgchart-position-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(239, 249, 244, 0.42));
}

.orgchart-position-modal-heading { min-width: 0; }
.orgchart-position-modal-heading > small { display: block; margin-bottom: 5px; color: #6b817a; font-size: 11px; }
.orgchart-position-modal-heading > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }

.orgchart-position-modal-heading h2 {
  margin: 0;
  overflow: hidden;
  color: #16352c;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orgchart-position-modal-heading span { color: #70847d; font-size: 12px; white-space: nowrap; }

.orgchart-position-modal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(37, 102, 82, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 6px 14px rgba(33, 86, 68, 0.1);
  color: #08775a;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease, border-color 130ms ease;
}

.orgchart-position-modal-close:hover,
.orgchart-position-modal-close:focus-visible {
  border-color: rgba(7, 150, 91, 0.4);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 #fff, 0 9px 18px rgba(33, 86, 68, 0.16), 0 0 0 3px rgba(7, 150, 91, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.orgchart-position-modal-close:active { transform: translateY(1px) scale(0.98); }

.orgchart-position-modal-body {
  display: grid;
  grid-template-areas: "view";
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(249, 252, 250, 0.8);
}

.orgchart-position-roster-view,
.orgchart-position-person-view {
  grid-area: view;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.orgchart-position-roster-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.orgchart-position-workspace-tabs,
.orgchart-position-person-tabs {
  display: flex;
  align-items: end;
  gap: 26px;
  min-height: 52px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.12);
}

.orgchart-position-workspace-tabs {
  padding: 0 22px;
  background: rgba(249, 253, 251, 0.66);
}

.orgchart-position-workspace-tabs button,
.orgchart-position-person-tabs button {
  position: relative;
  align-self: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  color: #71837d;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.orgchart-position-workspace-tabs button::after,
.orgchart-position-person-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #0b9b71;
  content: "";
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 130ms ease, transform 130ms ease;
}

.orgchart-position-workspace-tabs button:hover,
.orgchart-position-workspace-tabs button:focus-visible,
.orgchart-position-workspace-tabs button.is-active,
.orgchart-position-person-tabs button:hover,
.orgchart-position-person-tabs button:focus-visible,
.orgchart-position-person-tabs button.is-active {
  color: #08775a;
  outline: 0;
}

.orgchart-position-workspace-tabs button:focus-visible,
.orgchart-position-person-tabs button:focus-visible { box-shadow: inset 0 0 0 2px rgba(7, 150, 91, 0.12); }

.orgchart-position-workspace-tabs button.is-active::after,
.orgchart-position-person-tabs button.is-active::after { opacity: 1; transform: scaleX(1); }

.orgchart-profile-edit-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 34px;
  padding: 0 15px;
  border: 1px solid rgba(72, 125, 106, 0.2);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 242, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 3px rgba(55, 104, 87, 0.07),
    0 5px 12px rgba(39, 89, 72, 0.09);
  color: #176b55;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease, background-color 130ms ease, box-shadow 130ms ease;
}

.orgchart-profile-edit-action[hidden] { display: none !important; }

.orgchart-position-workspace-tabs .orgchart-profile-edit-action {
  align-self: center;
  margin-left: auto;
  padding: 0 15px;
  border: 1px solid rgba(72, 125, 106, 0.2);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 242, 0.82));
  color: #176b55;
}

.orgchart-position-workspace-tabs .orgchart-profile-edit-action::after { display: none; content: none; }

.orgchart-profile-edit-action:hover,
.orgchart-profile-edit-action:focus-visible,
.orgchart-position-workspace-tabs .orgchart-profile-edit-action:hover,
.orgchart-position-workspace-tabs .orgchart-profile-edit-action:focus-visible {
  border-color: rgba(17, 145, 99, 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(238, 251, 245, 0.96));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 3px rgba(48, 111, 88, 0.06),
    0 9px 18px rgba(31, 105, 78, 0.14);
  color: #08775a;
  outline: 0;
  transform: translateY(-2px);
}

.orgchart-profile-edit-action:active,
.orgchart-position-workspace-tabs .orgchart-profile-edit-action:active {
  background: linear-gradient(180deg, rgba(225, 242, 234, 0.92), rgba(240, 249, 245, 0.9));
  box-shadow: inset 0 3px 7px rgba(39, 94, 75, 0.14);
  transform: translateY(1px) scale(0.98);
}

.orgchart-position-workspace-panel { min-height: 0; padding: 20px 22px 26px; }

.orgchart-position-people-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.orgchart-position-search {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(330px, 100%);
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(42, 116, 91, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 5px 12px rgba(45, 95, 78, 0.07);
  color: #6f857d;
}

.orgchart-position-search:focus-within {
  border-color: rgba(7, 150, 91, 0.46);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(7, 150, 91, 0.09), 0 7px 16px rgba(45, 95, 78, 0.08);
}

.orgchart-position-search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.orgchart-position-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #16352c;
  font: inherit;
  font-size: 13px;
}

.orgchart-position-search input::placeholder { color: #8b9a94; }

.orgchart-position-member-scroll {
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 8px 1px;
  scrollbar-color: rgba(66, 114, 90, 0.3) transparent;
  scrollbar-width: thin;
}

.orgchart-position-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 260px));
  gap: 14px;
  align-content: start;
  justify-content: start;
}

.orgchart-position-member {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(52, 112, 92, 0.18);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 18px rgba(41, 91, 74, 0.09);
  color: #17352d;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.orgchart-position-member:hover,
.orgchart-position-member:focus-visible {
  border-color: rgba(7, 150, 91, 0.38);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 #fff, 0 13px 24px rgba(37, 91, 72, 0.15), 0 0 0 3px rgba(7, 150, 91, 0.07);
  outline: 0;
  transform: translateY(-2px);
}

.orgchart-position-member:active { transform: translateY(1px) scale(0.99); }

.orgchart-position-member-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(7, 150, 91, 0.16);
  border-radius: 14px;
  background: rgba(222, 242, 231, 0.82);
  color: #08775a;
  font-size: 13px;
  font-weight: 700;
}

.orgchart-position-member strong { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.orgchart-position-member.is-inactive { filter: grayscale(0.86); opacity: 0.56; }
.orgchart-position-member.is-inactive strong { text-decoration: line-through; }

.orgchart-position-member-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #7b8881;
  font-size: 13px;
}

.orgchart-position-profile-view {
  min-height: 0;
  overflow: auto;
  scrollbar-color: rgba(66, 114, 90, 0.3) transparent;
  scrollbar-width: thin;
}

.orgchart-position-details-form,
.orgchart-position-details-readonly {
  display: grid;
  width: min(680px, 100%);
  margin: 0;
  border: 1px solid rgba(52, 112, 92, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 20px rgba(41, 91, 74, 0.07);
}

.orgchart-position-details-form > label,
.orgchart-position-details-form > .orgchart-position-work-mode,
.orgchart-position-readonly,
.orgchart-position-details-readonly > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.1);
}

.orgchart-position-details-form > label > span:first-child,
.orgchart-position-work-mode > label,
.orgchart-position-readonly > span,
.orgchart-position-details-readonly dt {
  color: #71817a;
  font-size: 12px;
}

.orgchart-position-readonly strong,
.orgchart-position-details-readonly dd {
  min-width: 0;
  margin: 0;
  color: #16352c;
  font-size: 13px;
  font-weight: 600;
}

.orgchart-position-details-form input,
.orgchart-position-details-form select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(42, 116, 91, 0.22);
  border-radius: 11px;
  outline: 0;
  background: rgba(250, 253, 251, 0.92);
  color: #16352c;
  font: inherit;
  font-size: 13px;
}

.orgchart-position-details-form input:focus,
.orgchart-position-details-form select:focus {
  border-color: rgba(7, 150, 91, 0.52);
  box-shadow: 0 0 0 3px rgba(7, 150, 91, 0.09);
}

.orgchart-position-work-mode-control {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.orgchart-position-work-mode-control select { flex: 1 1 auto; }

.orgchart-single-rest-note,
.orgchart-position-details-readonly small {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(7, 150, 91, 0.25);
  border-radius: 999px;
  background: rgba(223, 243, 233, 0.84);
  color: #08775a;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

button.orgchart-single-rest-note { cursor: pointer; }
button.orgchart-single-rest-note:hover,
button.orgchart-single-rest-note:focus-visible {
  border-color: rgba(7, 150, 91, 0.52);
  background: rgba(211, 240, 225, 0.96);
  outline: 0;
}

.orgchart-position-details-form > .orgchart-editor-error {
  padding: 10px 18px 0;
}

.orgchart-position-details-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.orgchart-position-details-actions button { min-width: 92px; }

.orgchart-position-details-readonly > div:last-child { border-bottom: 0; }

.orgchart-single-rest-dialog {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 55, 47, 0.24);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.orgchart-single-rest-dialog[hidden] { display: none !important; }

.orgchart-single-rest-dialog > section {
  display: grid;
  gap: 10px;
  width: min(330px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(249, 253, 251, 0.98);
  box-shadow: 0 22px 52px rgba(6, 42, 31, 0.28);
}

.orgchart-single-rest-dialog h3 {
  margin: 0 0 4px;
  color: #16352c;
  font-size: 17px;
  font-weight: 650;
}

.orgchart-single-rest-dialog label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(52, 112, 92, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: #19382f;
  cursor: pointer;
  font-size: 13px;
}

.orgchart-single-rest-dialog input { accent-color: var(--orgchart-green); }
.orgchart-single-rest-dialog p { margin: 0; color: #b33d3d; font-size: 11px; }

.orgchart-single-rest-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.orgchart-single-rest-actions button { min-width: 92px; }

.orgchart-position-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.orgchart-position-overview-facts,
.orgchart-position-description {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(52, 112, 92, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 20px rgba(41, 91, 74, 0.07);
}

.orgchart-position-overview-facts > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.1);
}

.orgchart-position-overview-facts > div:last-child { border-bottom: 0; }
.orgchart-position-overview-facts dt { color: #77847d; font-size: 12px; }
.orgchart-position-overview-facts dd { margin: 0; color: #16352c; font-size: 13px; }

.orgchart-position-description { padding: 17px 18px; }
.orgchart-position-description h3 { margin: 0 0 12px; color: #16352c; font-size: 13px; font-weight: 700; }
.orgchart-position-description p { margin: 0; color: #5f6e66; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }

.orgchart-position-person-view {
  display: block;
  padding: 20px 22px 26px;
  overflow: auto;
  scrollbar-color: rgba(66, 114, 90, 0.3) transparent;
  scrollbar-width: thin;
  animation: orgchart-position-detail-enter 180ms ease both;
}

.orgchart-position-person-top { display: flex; align-items: center; gap: 14px; min-width: 0; margin-bottom: 16px; }
.orgchart-position-person-top > .orgchart-profile-edit-action { flex: 0 0 auto; margin-left: auto; }

.orgchart-position-person-back {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(37, 102, 82, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 14px rgba(33, 86, 68, 0.08);
  color: #08775a;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

.orgchart-position-person-back:hover,
.orgchart-position-person-back:focus-visible {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 #fff, 0 9px 18px rgba(33, 86, 68, 0.14), 0 0 0 3px rgba(7, 150, 91, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.orgchart-position-person-back:active { transform: translateY(1px) scale(0.98); }

.orgchart-position-person-identity {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.orgchart-position-person-identity > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(7, 150, 91, 0.16);
  border-radius: 15px;
  background: rgba(222, 242, 231, 0.82);
  color: #08775a;
  font-size: 14px;
  font-weight: 700;
}

.orgchart-position-person-identity h3 { margin: 0 0 3px; color: #16352c; font-size: 19px; font-weight: 650; }
.orgchart-position-person-identity p { margin: 0; color: #748179; font-size: 12px; }
.orgchart-position-person-tabs { min-height: 46px; }
.orgchart-position-person-panel { min-height: 0; overflow: visible; }

.orgchart-person-profile-sections {
  display: grid;
  gap: 14px;
}

.orgchart-person-profile-sections section {
  overflow: hidden;
  border: 1px solid rgba(52, 112, 92, 0.15);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.68);
}

.orgchart-person-profile-sections h4 {
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.1);
  color: #16352c;
  font-size: 13px;
  font-weight: 650;
}

.orgchart-person-profile-sections dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.orgchart-person-profile-sections dl > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.08);
}

.orgchart-person-profile-sections dl > div:nth-child(odd) { border-right: 1px solid rgba(54, 104, 88, 0.08); }
.orgchart-person-profile-sections dt { color: #78857e; font-size: 12px; }
.orgchart-person-profile-sections dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #16352c; font-size: 13px; }

.orgchart-person-profile-edit-form {
  display: grid;
  gap: 12px;
}

.orgchart-person-profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.orgchart-person-profile-edit-grid > label {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.08);
}

.orgchart-person-profile-edit-grid > label:nth-child(odd) { border-right: 1px solid rgba(54, 104, 88, 0.08); }
.orgchart-person-profile-edit-grid > label.is-wide { grid-column: 1 / -1; border-right: 0; }
.orgchart-person-profile-edit-grid > label > span { color: #78857e; font-size: 12px; }

.orgchart-person-profile-edit-grid input,
.orgchart-person-profile-edit-grid select,
.orgchart-person-profile-edit-grid textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(42, 116, 91, 0.22);
  border-radius: 11px;
  background: rgba(249, 253, 251, 0.9);
  color: #16352c;
  font: inherit;
  font-size: 13px;
}

.orgchart-person-profile-edit-grid input,
.orgchart-person-profile-edit-grid select { height: 38px; padding: 0 11px; }
.orgchart-person-profile-edit-grid textarea { min-height: 58px; padding: 9px 11px; resize: vertical; }
.orgchart-person-profile-edit-grid input[readonly] { background: rgba(235, 242, 238, 0.72); color: #6f7d76; }

.orgchart-person-profile-edit-grid input:focus,
.orgchart-person-profile-edit-grid select:focus,
.orgchart-person-profile-edit-grid textarea:focus {
  border-color: rgba(7, 150, 91, 0.52);
  box-shadow: 0 0 0 3px rgba(7, 150, 91, 0.09);
  outline: 0;
}

.orgchart-person-profile-document-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 15px;
}

.orgchart-person-profile-document-edit {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(52, 112, 92, 0.14);
  border-radius: 13px;
  background: rgba(247, 252, 249, 0.82);
}

.orgchart-person-profile-document-edit strong { color: #24493e; font-size: 12px; }
.orgchart-person-profile-document-edit > span { overflow: hidden; color: #78857e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.orgchart-person-profile-document-edit em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 66px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(7, 150, 91, 0.24);
  border-radius: 10px;
  background: rgba(232, 247, 239, 0.9);
  color: #08775a;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  cursor: pointer;
}

.orgchart-person-profile-document-edit input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.orgchart-person-profile-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 0;
}

.orgchart-person-profile-edit-actions button { min-width: 92px; }

.orgchart-position-person-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(52, 112, 92, 0.15);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.68);
}

.orgchart-position-person-facts > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 15px 12px;
  border-bottom: 1px solid rgba(54, 104, 88, 0.1);
}

.orgchart-position-person-facts > div:nth-child(odd) { border-right: 1px solid rgba(54, 104, 88, 0.1); }
.orgchart-position-person-facts dt { color: #78857e; font-size: 12px; }
.orgchart-position-person-facts dd { min-width: 0; margin: 0; overflow: hidden; color: #16352c; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.orgchart-position-salary { place-items: center; min-height: 220px; color: #78857e; text-align: center; }
.orgchart-position-salary:not([hidden]) { display: grid; }
.orgchart-position-salary strong { display: block; margin-bottom: 8px; color: #16352c; font-size: 14px; }
.orgchart-position-salary span { font-size: 12px; }

@keyframes orgchart-position-modal-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes orgchart-position-detail-enter {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.orgchart-popover { position: absolute; z-index: 90; border: 1px solid #d2ddd7; background: #fff; box-shadow: 0 18px 42px rgba(28, 58, 45, 0.19); }
.orgchart-context-menu { display: grid; min-width: 146px; padding: 5px; border-radius: 9px; }

.orgchart-context-menu button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #28362f;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.orgchart-context-menu button:hover,
.orgchart-context-menu button:focus-visible { background: #edf6f1; color: var(--orgchart-green-dark); outline: 0; }
.orgchart-context-menu button.is-danger { color: #b43b3b; }
.orgchart-context-menu button.is-danger:hover,
.orgchart-context-menu button.is-danger:focus-visible { background: #fff0f0; }

.orgchart-editor { width: min(360px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 16px; border-radius: 11px; }
.orgchart-editor form { display: grid; gap: 11px; }
.orgchart-editor h3 { margin: 0 0 2px; color: #18251f; font-size: 16px; }
.orgchart-field { display: grid; gap: 5px; }
.orgchart-field > span,
.orgchart-readonly-field > span,
.orgchart-downstream legend { color: #647169; font-size: 11px; font-weight: 650; }

.orgchart-field input,
.orgchart-field select,
.orgchart-field textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #cfdbd5;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #1e2b25;
  font: inherit;
  font-size: 12px;
}

.orgchart-field textarea { resize: vertical; line-height: 1.5; }
.orgchart-field input:focus,
.orgchart-field select:focus,
.orgchart-field textarea:focus { border-color: rgba(7, 150, 91, 0.62); box-shadow: 0 0 0 3px rgba(7, 150, 91, 0.09); }

.orgchart-readonly-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 9px; border-radius: 7px; background: #eef3f0; }
.orgchart-readonly-field strong { color: #26362e; font-size: 12px; }
.orgchart-downstream { display: grid; gap: 7px; min-width: 0; margin: 0; padding: 9px; border: 1px solid #d5dfda; border-radius: 8px; }
.orgchart-downstream legend { padding: 0 4px; }
.orgchart-downstream label { display: flex; align-items: center; gap: 8px; color: #2f3d36; font-size: 12px; }
.orgchart-downstream input { accent-color: var(--orgchart-green); }
.orgchart-editor-error { margin: 0; color: #b33d3d; font-size: 11px; line-height: 1.45; }
.orgchart-editor-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.orgchart-editor-actions .orgchart-secondary-action { margin-left: auto; }

.orgchart-loading,
.orgchart-failure {
  position: absolute;
  z-index: 110;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(245, 248, 246, 0.92);
  color: #57645d;
  font-size: 13px;
}

.orgchart-failure { flex-direction: column; }
.orgchart-loading-spinner { width: 17px; height: 17px; border: 2px solid rgba(7, 150, 91, 0.17); border-top-color: var(--orgchart-green); border-radius: 50%; animation: orgchart-spin 800ms linear infinite; }

.orgchart-toast {
  position: absolute;
  z-index: 105;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: min(420px, calc(100% - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(7, 150, 91, 0.3);
  border-radius: 9px;
  background: #f3fbf6;
  color: #244136;
  box-shadow: 0 12px 30px rgba(28, 67, 49, 0.16);
  font-size: 12px;
}

.orgchart-toast.is-error { border-color: rgba(180, 59, 59, 0.28); background: #fff5f5; color: #9d3232; }
.orgchart-toast button { padding: 4px 7px; border: 0; border-radius: 6px; background: #dff1e6; color: var(--orgchart-green-dark); cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }

.orgchart-drag-ghost { position: absolute; z-index: 120; display: grid; gap: 2px; min-width: 118px; padding: 8px 10px; border: 1px solid rgba(7, 150, 91, 0.45); border-radius: 8px; background: #fff; color: #1f3329; pointer-events: none; box-shadow: 0 14px 32px rgba(29, 71, 51, 0.18); }
.orgchart-drag-ghost strong { font-size: 12px; }
.orgchart-drag-ghost span { color: #68776f; font-size: 10px; }

@keyframes orgchart-spin { to { transform: rotate(360deg); } }
@keyframes orgchart-roster-open {
  from { opacity: 0.72; clip-path: inset(34% 34% round 7px); }
  to { opacity: 1; clip-path: inset(0 round 10px); }
}

@media (max-width: 1060px) {
  .orgchart-app { grid-template-columns: 254px minmax(0, 1fr); }
  .orgchart-toolbar { padding-inline: 10px; }
}

@media (max-width: 720px) {
  .orgchart-app { display: block; }

  .orgchart-app::after {
    position: absolute;
    z-index: 65;
    inset: 0;
    background: rgba(24, 36, 30, 0.22);
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
  }

  .orgchart-app.is-directory-open::after { opacity: 1; pointer-events: auto; }

  .orgchart-navigator {
    position: absolute;
    z-index: 70;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(86vw, 320px);
    border-right: 1px solid #d9e1dd;
    box-shadow: 14px 0 34px rgba(27, 48, 38, 0.16);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .orgchart-app.is-directory-open .orgchart-navigator { transform: translateX(0); }
  .orgchart-visual { width: 100%; height: 100%; }
  .orgchart-toolbar-actions .orgchart-readonly,
  .orgchart-toolbar-actions .zoom-value { display: none; }
  .orgchart-breadcrumb button { max-width: 92px; }

  .orgchart-editor {
    position: absolute;
    top: auto !important;
    right: 9px !important;
    bottom: 9px !important;
    left: 9px !important;
    width: auto;
    max-height: min(74%, 560px);
  }

  .orgchart-context-menu { min-width: 158px; }
  .orgchart-toast { right: 9px; bottom: 9px; max-width: calc(100% - 18px); }

  .orgchart-position-modal-layer { padding: 10px; }
  .orgchart-position-modal { width: 100%; height: 100%; min-height: 0; border-radius: 20px; }
  .orgchart-position-modal-body { padding: 0; }
  .orgchart-position-workspace-panel,
  .orgchart-position-person-view { padding: 16px; }
  .orgchart-position-workspace-tabs { padding-inline: 16px; }
  .orgchart-position-overview { grid-template-columns: 1fr; }
  .orgchart-position-member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orgchart-position-details-form > label,
  .orgchart-position-details-form > .orgchart-position-work-mode,
  .orgchart-position-readonly,
  .orgchart-position-details-readonly > div { grid-template-columns: 108px minmax(0, 1fr); padding-inline: 14px; }
  .orgchart-person-profile-document-edit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .orgchart-position-modal-head { min-height: 70px; gap: 8px; padding: 11px 12px; }
  .orgchart-position-modal-close { width: 34px; height: 34px; }
  .orgchart-position-modal-heading h2 { font-size: 20px; }
  .orgchart-position-modal-heading > div { gap: 6px; }
  .orgchart-position-member-grid,
  .orgchart-position-person-facts,
  .orgchart-person-profile-sections dl,
  .orgchart-person-profile-edit-grid { grid-template-columns: 1fr; }
  .orgchart-position-person-facts > div:nth-child(odd) { border-right: 0; }
  .orgchart-person-profile-sections dl > div:nth-child(odd) { border-right: 0; }
  .orgchart-person-profile-edit-grid > label,
  .orgchart-person-profile-edit-grid > label:nth-child(odd) { grid-template-columns: 1fr; gap: 6px; border-right: 0; }
  .orgchart-position-workspace-tabs { gap: 18px; }
  .orgchart-profile-edit-action,
  .orgchart-position-workspace-tabs .orgchart-profile-edit-action { min-width: 58px; padding-inline: 11px; }
  .orgchart-position-details-form > label,
  .orgchart-position-details-form > .orgchart-position-work-mode,
  .orgchart-position-readonly,
  .orgchart-position-details-readonly > div { grid-template-columns: 1fr; gap: 6px; padding-block: 12px; }
  .orgchart-position-work-mode-control { align-items: stretch; flex-direction: column; }
  .orgchart-single-rest-note { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .orgchart-node,
  .orgchart-navigator,
  .orgchart-app::after,
  .orgchart-position-modal-layer,
  .orgchart-position-modal,
  .orgchart-position-member,
  .orgchart-position-person-view,
  .orgchart-profile-edit-action,
  .orgchart-single-rest-dialog { transition: none; animation: none; }
  .orgchart-profile-edit-action:hover,
  .orgchart-profile-edit-action:active { transform: none; }
  .orgchart-node.position.is-opening { animation: none; }
}
