/* [2026-11-01] 조직도 «추천 / 배치» 탭 · 배치 팝업
   기존 org-sortbtn · tag · info-row 톤을 그대로 따른다. */

/* 조직도 타이틀 바로 아래 탭 — 전역 탭처럼 보이면 안 되므로
   섹션 안쪽 폭에 맞추고 높이를 정렬바보다 살짝 크게 둔다 */
.org-diagram-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.org-diagram-tab {
  border: 1px solid #dbe7f1;
  background: #fff;
  color: #698094;
  border-radius: 10px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  padding: 0 6px;
  cursor: pointer;
}
.org-diagram-tab.active {
  background: #087ed0;
  border-color: #087ed0;
  color: #fff;
}

/* 라인 칩 — A 는 파랑, B 는 초록. 트리의 라인 배지와 같은 색 */
.tag.blue { background: #dbeaff; color: #2679d4; }
.tag.green { background: #dff5e5; color: #219653; }

/* 이력 한 줄 */
.hist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid #edf2f6;
  font-size: 12px;
  color: #42526a;
}
.hist-row:last-child { border-bottom: 0; }
.hist-row .numbers { font-weight: 850; color: #153449; }

/* 새 상위 회원 고르기 */
.pick-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e3ebf3;
  background: #fff;
  border-radius: 10px;
  padding: 11px 12px;
  margin: 0 0 6px;
  color: #153449;
  font-size: 13px;
  cursor: pointer;
}
.pick-row:hover { border-color: #bed9eb; background: #fbfdff; }

/* ══════════ [2026-11-01] 시안 반영 2차 ══════════ */

/* 추천 탭 — 상태 필터 칩 */
.org-filterbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.org-chip {
  flex: 0 0 auto; margin: 0; padding: 8px 13px;
  border: 1px solid #e4edf5; background: #fff; color: #7a8da1;
  border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer;
}
.org-chip em { font-style: normal; opacity: .7; margin-left: 3px; }
.org-chip.active { background: #087ed0; border-color: #087ed0; color: #fff; }

/* 회원 카드 — 추천 리스트와 배치 트리가 «같은 카드» 를 쓴다.
   깊이마다 다른 모양이면 같은 조직으로 안 보인다. */
.org-list { display: grid; gap: 7px; }
.org-card {
  display: grid; grid-template-columns: auto 1fr auto auto;
  gap: 9px; align-items: center; width: 100%; margin: 0;
  padding: 10px 11px; text-align: left; cursor: pointer;
  border: 1px solid #e3ebf3; border-radius: 12px; background: #fff;
  transition: .14s ease;
}
.org-card:hover { border-color: #bed9eb; background: #fbfdff; }
.org-card-main { min-width: 0; }
.org-card-top {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  color: #153449; font-size: 12.5px; font-weight: 850;
}
.org-card-main small {
  display: block; margin-top: 3px; font-size: 10px; color: #7d91a3; font-weight: 600;
}
.org-card-val {
  text-align: right; font-size: 12px; font-weight: 850; color: #153449; white-space: nowrap;
}
.org-card-val em { display: block; font-style: normal; font-size: 8px; color: #8798a8; }
.org-card-arrow { color: #b4c4d2; font-size: 17px; }
.org-node-row { display: flex; align-items: center; gap: 6px; }
.org-node-row .org-card { flex: 1; min-width: 0; }

/* A/B 요약 두 칸 */
.org-linesum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.org-linesum-box {
  position: relative; border: 1px solid #e3ebf3; border-radius: 12px;
  padding: 11px 12px 12px; background: #fff;
}
.org-linesum-box.a { background: #f5f9ff; border-color: #dbeaff; }
.org-linesum-box.b { background: #f3fcf6; border-color: #dff5e5; }
.org-linesum-box .org-line-badge { width: 26px; height: 26px; font-size: 12px; }
.org-linesum-box.a .org-line-badge { background: #dbeaff; color: #2679d4; }
.org-linesum-box.b .org-line-badge { background: #dff5e5; color: #219653; }
.org-linesum-box b { display: block; margin-top: 7px; font-size: 12px; color: #153449; }
.org-linesum-box small { display: block; font-size: 10px; color: #75899c; margin-top: 2px; }
.org-linesum-box .numbers {
  display: block; margin-top: 6px; font-size: 14px; font-weight: 900; color: #153449;
}
.org-line.none .org-line-head { background: #fff7ed; }
.org-line.none .org-line-badge { background: #ffedd5; color: #c2410c; }

/* 하단 추가 버튼 */
.org-addbtn {
  width: 100%; margin: 12px 0 0; padding: 13px;
  border: 1.5px dashed #bcd9ee; border-radius: 12px;
  background: #f7fbff; color: #087ed0; font-size: 13px; font-weight: 800; cursor: pointer;
}
.org-addbtn:hover { background: #eef7ff; }

/* 팝업 머리 */
.pop-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 0 0; margin-top: 4px;
}
.pop-head .org-avatar { width: 40px; height: 40px; font-size: 15px; }
.pop-head b { display: block; font-size: 15px; color: #153449; }
.pop-head small { display: block; font-size: 11px; color: #7d91a3; margin-top: 2px; }
.pop-head .tag { margin-left: auto; }

/* 단계 제목 */
.step-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 850; color: #153449; margin-bottom: 7px;
}
.step-title em {
  font-style: normal; width: 19px; height: 19px; border-radius: 50%;
  background: #087ed0; color: #fff; font-size: 11px; font-weight: 900;
  display: grid; place-items: center;
}

/* 단계 표시줄 */
.stepper { display: flex; gap: 6px; margin-top: 14px; }
.stepper .step {
  flex: 1; display: flex; align-items: center; gap: 5px; justify-content: center;
  padding: 8px 4px; border-radius: 9px; background: #f2f6fa;
  font-size: 11px; font-weight: 800; color: #93a5b5;
}
.stepper .step em {
  font-style: normal; width: 17px; height: 17px; border-radius: 50%;
  background: #cfdbe6; color: #fff; font-size: 10px;
  display: grid; place-items: center;
}
.stepper .step.on { background: #eaf5ff; color: #087ed0; }
.stepper .step.on em { background: #087ed0; }
.stepper .step.done em { background: #7fc08f; }

/* 적용 시점 라디오 */
.radio-row { display: grid; gap: 7px; }
.radio-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 0;
  padding: 12px 13px; border: 1px solid #e3ebf3; border-radius: 11px;
  background: #fff; color: #42526a; font-size: 13px; font-weight: 700;
  text-align: left; cursor: pointer;
}
.radio-opt .dot {
  width: 17px; height: 17px; border-radius: 50%; border: 2px solid #cfdbe6; flex: 0 0 auto;
}
.radio-opt.on { border-color: #087ed0; background: #f7fbff; color: #0b2a4a; }
.radio-opt.on .dot { border-color: #087ed0; border-width: 5px; }

/* 후보 고르기 */
.pick-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center;
}
.pick-main { min-width: 0; }
.pick-main b { display: block; font-size: 13px; color: #153449; }
.pick-main small { display: block; font-size: 10px; color: #7d91a3; margin-top: 2px; }
.pick-row .numbers { font-size: 12px; font-weight: 850; color: #153449; }
.pick-cta {
  display: flex; justify-content: space-between; align-items: center;
  color: #087ed0; font-weight: 800;
}

/* A/B 이동 버튼 */
.btn-line-a { background: #087ed0; border-color: #087ed0; color: #fff; }
.btn-line-b { background: #219653; border-color: #219653; color: #fff; }

/* ══════════ [2026-11-01] 회원 카드 — 두 줄 고정 ══════════
   이름·코드·배지를 한 줄에 몰면 wrap 돼서 카드마다 높이가 달라지고,
   금액 칸이 넓게 잡히면 이름·인원이 잘린다.
   격자를 2행으로 못 박고, 금액은 제 폭만 쓰게 한다. */
.org-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 1px;
  align-items: center;
  padding: 9px 11px;
}
.org-card > .org-avatar { grid-row: 1 / 3; align-self: center; }

/* 1행 — 이름 (코드) ............ 금액 */
.oc-l1 {
  grid-column: 2; grid-row: 1;
  font-size: 13px; font-weight: 850; color: #153449; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-l1 i { font-style: normal; font-weight: 600; color: #93a5b5; font-size: 11px; }
.oc-v1 {
  grid-column: 3; grid-row: 1;
  font-size: 13px; font-weight: 900; color: #153449;
  text-align: right; white-space: nowrap; line-height: 1.35;
}

/* 2행 — 직급 · 직접 n · 전체 n ............ HANDY */
.oc-l2 {
  grid-column: 2; grid-row: 2;
  display: flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: #7d91a3; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-l2 > span { flex: 0 0 auto; }
.oc-l2 > span + span::before { content: '·'; margin-right: 4px; color: #c7d3de; }
.oc-l2 > .dot-tag + span::before { content: none; }
.oc-v2 {
  grid-column: 3; grid-row: 2;
  font-size: 9px; color: #8798a8; font-weight: 700;
  text-align: right; white-space: nowrap; line-height: 1.35;
}

/* 라인·상태 알약 */
.dot-tag {
  display: inline-block; padding: 1px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800; background: #eef2f7; color: #64748b;
}
.dot-tag.blue { background: #dbeaff; color: #2679d4; }
.dot-tag.green { background: #dff5e5; color: #219653; }
.dot-tag.amber { background: #fff4e0; color: #b97b12; }
.dot-tag.red { background: #ffeaea; color: #d64545; }

/* 카드 + 토글을 한 줄로, 토글은 세로 가운데 고정 */
.org-node-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center; gap: 8px;
}
.org-node-row > .org-card { min-width: 0; }
.org-node-row > .org-toggle,
.org-node-row > .org-toggle-spacer { justify-self: center; align-self: center; }

/* 좁은 화면에서는 아바타를 줄여 글자 칸을 더 준다 */
@media (max-width: 380px) {
  .org-card { column-gap: 7px; padding: 9px; }
  .org-card > .org-avatar { width: 26px; height: 26px; font-size: 11px; }
  .oc-l1, .oc-v1 { font-size: 12.5px; }
}

/* ══════════ [2026-11-01] 무엇을 바꿀지 먼저 ══════════ */
.mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode-opt {
  margin: 0; padding: 10px 4px; border: 1px solid #e3ebf3; border-radius: 11px;
  background: #fff; cursor: pointer; text-align: center;
}
.mode-opt b { display: block; font-size: 12.5px; font-weight: 850; color: #42526a; }
.mode-opt small { display: block; font-size: 9.5px; color: #93a5b5; margin-top: 2px; }
.mode-opt.on { border-color: #087ed0; background: #f3f9ff; }
.mode-opt.on b { color: #0b2a4a; }
.mode-opt.on small { color: #4f8fbf; }

/* 상위 선택 — 내 조직도를 그대로 */
.pick-tree {
  border: 1px solid #e3ebf3; border-radius: 12px; background: #fff;
  max-height: 46vh; overflow: auto;
}
.pick-node {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 8px;
  width: 100%; margin: 0; padding: 9px 10px; text-align: left;
  border: 0; border-bottom: 1px solid #f1f5f9; background: #fff; cursor: pointer;
}
.pick-node:last-child { border-bottom: 0; }
.pick-node:hover { background: #f8fbff; }
.pick-node.cur { background: #f3f9ff; }
.pick-dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 900; background: #e8f2ff; color: #347ed0;
}
.pick-dot.b { background: #e7f8ec; color: #2b9a58; }
.pick-nm {
  font-size: 12.5px; font-weight: 800; color: #153449;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-nm i { font-style: normal; font-weight: 600; color: #93a5b5; font-size: 10.5px; }
.pick-sub { font-size: 10px; color: #8ba0b2; font-weight: 700; white-space: nowrap; }
.pick-cur {
  font-size: 9px; font-weight: 800; color: #087ed0;
  background: #dbeaff; border-radius: 999px; padding: 2px 6px;
}
.link-btn {
  margin: 0 0 0 6px; padding: 0; border: 0; background: none;
  color: #087ed0; font-size: 11.5px; font-weight: 800;
  text-decoration: underline; cursor: pointer; width: auto;
}

/* ══════════ [2026-11-01] 조직도에서 바로 고치기 ══════════ */
.plc-editbtn {
  width: 100%; margin: 0; padding: 11px;
  border: 1px solid #bcd9ee; border-radius: 11px;
  background: #fff; color: #087ed0; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.plc-editbtn.on { background: #087ed0; border-color: #087ed0; color: #fff; }

/* 집어든 상태 안내 띠 */
.plc-moving {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 13px; border-radius: 11px;
  background: #fff7ed; border: 1px solid #fed7aa;
  font-size: 12.5px; color: #9a3412; font-weight: 700;
}
.plc-moving b { color: #7c2d12; }
.plc-moving .link-btn { margin-left: auto; color: #9a3412; }

/* 카드 밑 인라인 버튼 */
.plc-acts {
  display: flex; gap: 5px; margin: 5px 0 0 38px; flex-wrap: wrap;
}
.plc-act {
  margin: 0; padding: 5px 10px; border-radius: 999px;
  border: 1px solid #dbe7f1; background: #fff;
  font-size: 11px; font-weight: 800; color: #4a627a; cursor: pointer; width: auto;
}
.plc-act:hover { border-color: #bcd9ee; background: #f7fbff; }
.plc-act.drop-a { border-color: #9ec8f0; background: #eaf5ff; color: #1d6fc0; }
.plc-act.drop-b { border-color: #a5dcb9; background: #ecfbf1; color: #1b7a44; }
.plc-acts.picked span {
  padding: 5px 10px; border-radius: 999px;
  background: #fff7ed; border: 1px dashed #fdba74;
  font-size: 11px; font-weight: 800; color: #9a3412;
}
@media (max-width: 380px) { .plc-acts { margin-left: 32px; } }
