@import url("../renewal-tokens.css?v=20260902d");
/* ═══════════════════════════════════════════════════════════════
   PropVis 리뉴얼 — 조직도 관리 (/employeeTree · test2.html) 전용
   원본: docs/design/prototype-toss-interactive-2026-07-28.html
         #page-orgchart(2767~) + .orgwrap/.orgpick/.orgchip/.orgcanvas CSS(608~625)
   원칙:
   - treeview.css / treeView2.css / jquery.orgchart.min.css 는 수정하지 않고
     이 파일(로드 순서 마지막)에서 오버라이드한다.
   - treeView.js 가 트리 노드에 inline 색(배경/보더: GROUP=#E1E9F1·#0C4B93,
     직원·대표=#fffaf5·var(--rn-brand))을 강제하므로 색 구분은 그대로 두고
     형태·타이포·연결선 색만 다듬는다. (inline 대비 !important 는 padding 등 최소)
   - 드래그&드롭 실동작 요소(직원 칩·트리 노드)만 cursor:grab 예외 허용.
   ═══════════════════════════════════════════════════════════════ */

/* ─── 페이지 셸 (.rn 의 margin 리셋이 .main-box 오프셋을 덮으므로 재선언 —
       renewal.css 의 .rn.rn-dash 패턴과 동일) ─── */
.rn.rn-org {
  min-height: calc(100vh - 60px);
  padding: 24px 0 60px;
  margin-left: 260px;
  margin-top: 60px;
}
.navbar-container.close + .rn.rn-org { margin-left: 68px; }
@media screen and (max-width: 1760px) {
  .rn.rn-org { margin-left: 220px; }
}
.rn-org .org-content { width: 100%; margin: 0 auto; padding: 0 28px; }

/* ─── 헤드 (renewal.css .rn-dash .head 패턴) ─── */
.rn-org .head { display: flex; align-items: flex-start; justify-content: space-between; margin: 6px 0 12px; gap: 12px; flex-wrap: wrap; }
.rn-org .head h3 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; margin: 0; line-height: 1.3; color: var(--rn-text); }
.rn-org .hsub { font-size: 14px; font-weight: 500; color: var(--rn-text-sub); margin-top: 6px; }
.rn-org .headacts { display: flex; gap: 8px; align-items: center; }
/* #controlBox — JS 가 대표 계정일 때 visibility:visible 로 전환 (구조 유지) */
.rn-org .ctrlacts { display: inline-flex; gap: 8px; align-items: center; }

/* ─── 본문 2열 그리드 (프로토타입 .orgwrap: 좌 목록 236px + 우 캔버스) ─── */
.rn-org .orgwrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: stretch; }
@media screen and (max-width: 1180px) {
  .rn-org .orgwrap { grid-template-columns: 1fr; }
}

/* ─── 좌: 직원/그룹 목록 카드 (프로토타입 .orgpick) ─── */
.rn-org .orgpick {
  background: var(--rn-card-bg);
  border: 1px solid var(--rn-border);
  border-radius: 12px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.rn-org .pgh {
  font-size: 11px; font-weight: 750; color: var(--rn-text-faint);
  letter-spacing: .04em; padding: 8px 2px 7px;
}
.rn-org .orgpick-sec._line { margin-top: 10px; border-top: 1px solid var(--rn-border-soft); padding-top: 4px; }

/* 직원 목록 컨테이너(#unaddedEmployee)는 트리→목록 복귀 드롭 대상 —
   비어 있어도 드롭할 면적을 확보 */
.rn-org #unaddedEmployee ul { min-height: 60px; }

/* 목록 스크롤 (treeView2.css max-height:400px 오버라이드) */
.rn-org .employee-list ul,
.rn-org .group-list ul { max-height: 300px; overflow-y: auto; padding: 0 0 2px; margin: 0; list-style: none; }

/* ─ 직원/그룹 항목 → 프로토타입 .orgchip 톤 ─
   li 마크업은 treeView.js 가 생성(클래스 employee/group 변경 불가).
   treeview.css(.employee 배경 #fffaf5·h50, .group 배경 #E1E9F1)와
   JS inline height:30px 를 여기서 덮는다. */
.rn-org li.employee,
.rn-org li.group {
  height: auto !important;      /* JS inline height:30px 무력화 */
  min-height: 40px;
  display: flex; align-items: center; gap: 8px;
  background: var(--rn-card-bg);
  border: 1px solid var(--rn-border-faint);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 5px;
  font-size: 12.5px; font-weight: 700; color: var(--rn-text);
  text-align: left;
}
.rn-org li.employee { cursor: grab; }               /* 실드래그 — grab 예외(결정 #7 예외 케이스) */
.rn-org li.employee:active { cursor: grabbing; }
.rn-org li.employee:hover,
.rn-org li.group:hover { border-color: var(--rn-brand); background: var(--rn-brand-faint); }
.rn-org li.group { cursor: pointer; justify-content: space-between; }
.rn-org li.group .group-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-org li.group .edit-input {
  flex: 1 1 auto; min-width: 0; width: 100%;
  border: 1px solid var(--rn-input-border); border-radius: 8px;
  padding: 4px 8px; font: inherit; font-size: 12.5px; background: var(--rn-card-bg);
}
.rn-org li.group .status-icon { width: 20px; height: 20px; flex: 0 0 auto; }

/* 그룹 추가 버튼(#addGroupButton — 대표 계정만 JS 가 visible 전환) */
.rn-org .orgadd {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 4px;
  border: 1px dashed var(--rn-input-border); background: var(--rn-card-bg); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 5px;
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--rn-text-sub);
  cursor: pointer;
}
.rn-org .orgadd:hover { border-color: var(--rn-brand); color: var(--rn-brand); background: var(--rn-brand-faint); }
.rn-org .orgadd .material-symbols-outlined { font-size: 16px; }

/* 그룹명 입력(#groupInputContainer — JS 가 display:flex 로 전환) */
.rn-org .orggrpinput { margin-bottom: 5px; }
.rn-org .orggrpinput input {
  flex: 1 1 auto; min-width: 0; width: 100%;
  border: 1px solid var(--rn-input-border); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 12.5px; color: var(--rn-text); background: var(--rn-card-bg);
}
.rn-org .orggrpinput input::placeholder { color: var(--rn-text-faint); }

.rn-org .orghint { font-size: 10.5px; color: var(--rn-text-faint); margin-top: 8px; line-height: 1.6; }

/* ─── 우: 트리 캔버스 카드 (프로토타입 .orgcanvas) ─── */
.rn-org .orgcanvas {
  background: var(--rn-card-bg);
  border: 1px solid var(--rn-border);
  border-radius: 12px;
  padding: 12px 14px 10px;
  min-width: 0;
  display: flex; flex-direction: column;
}
.rn-org .orgtools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 8px; }
.rn-org .orgtoggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--rn-text-sub); cursor: pointer;
}
.rn-org .orgtoggle input { width: 14px; height: 14px; accent-color: var(--rn-brand); cursor: pointer; margin: 0; }
.rn-org .orgrefresh {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--rn-border); border-radius: 8px;
  background: var(--rn-card-bg); color: var(--rn-text-sub); cursor: pointer;
}
.rn-org .orgrefresh:hover { border-color: var(--rn-brand); color: var(--rn-brand); background: var(--rn-brand-faint); }
.rn-org .orgrefresh .material-symbols-outlined { font-size: 18px; }

.rn-org .tree-container { flex: 1 1 auto; min-height: 0; }

/* 차트 영역 — treeView2.css(#chart-container 배경 #fbfafa)를 도트 그리드로 교체 */
.rn-org #chart-container {
  background-color: transparent;
  background-image: radial-gradient(var(--rn-border-soft) 1px, transparent 1px);
  background-size: 18px 18px;
  border-radius: 10px;
  min-height: 560px;
}

.rn-org .orgcanvas-note { text-align: center; font-size: 11px; color: var(--rn-text-faint); padding: 10px 0 2px; }

/* ─── 트리 노드/연결선 오버라이드 (jquery.orgchart.min.css · treeView2.css 대상) ───
   배경/보더 색은 treeView.js inline 값(그룹 파랑 · 직원/대표 인주)을 유지한다. */
.rn-org .orgchart { background: transparent; }      /* 빨간 격자 배경 이미지 제거 */
.rn-org .orgchart .node {
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(34, 30, 28, .06);
}
.rn-org .orgchart .node .title {
  width: auto; min-width: 96px; max-width: 190px;
  height: auto; line-height: 1.45;
  padding: 6px 12px !important;                     /* JS inline padding:2px 무력화 */
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
}

/* 연결선 — 라이브러리 기본 빨강(rgba(217,83,79,.8)) → 프로토타입 var(--rn-border-strong) */
.rn-org .orgchart .lines .topLine { border-top-color: var(--rn-border-strong); }
.rn-org .orgchart .lines .rightLine { border-right-color: var(--rn-border-strong); }
.rn-org .orgchart .lines .leftLine { border-left-color: var(--rn-border-strong); }
.rn-org .orgchart .lines .downLine { background-color: var(--rn-border-strong); }
/* treeView2.css 가 그리는 커스텀 선(#808080)도 동일 톤으로 */
.rn-org .orgchart .line { border-color: var(--rn-border-strong) !important; }
.rn-org .orgchart .line::before,
.rn-org .orgchart .line::after { background-color: var(--rn-border-strong); }
.rn-org .orgchart .right-line,
.rn-org .orgchart .left-line { background-color: var(--rn-border-strong) !important; border-top-color: var(--rn-border-strong) !important; }
