/* ===== 직원 얼굴·사진 (js/staff-profile.js) =====
   앱 CSS 보다 먼저 읽는다: 크기·색은 .ms-avatar 처럼 쓰는 곳의 클래스가 정한다. */
.sp-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #8fa3b7;
  color: #fff;
  font-size: 13px;
  vertical-align: middle;
}
/* 크롭 틀: 동그란 칸과 네모 칸이 같은 위치·배율로 사진을 놓는다 (js/staff-profile.js cropStyle) */
.sp-crop { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.sp-crop > .sp-img { position: absolute; display: block; max-width: none; height: auto; }

.sp-face.sp-card { border-radius: 6px; font-size: 28px; }

[data-sp-zoom] { cursor: zoom-in; }

/* 확대 보기: 원래 구도 그대로 */
.sp-view { height: 100%; display: flex; align-items: center; justify-content: center; background: #1b1d21; }
.sp-view img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }

/* 한빛톡 머리글 */
.ms-header-face { width: 30px; height: 30px; margin-right: 8px; align-self: center; }

/* 통화 */
.call-headrow { display: flex; align-items: center; gap: 12px; }
.call-face { width: 44px; height: 44px; }
.ph-item-face { width: 28px; height: 28px; }
.toast-face { width: 36px; height: 36px; }

/* ERP 직원 검색 이름 칸 · 인사카드 */
.erp-hr-name { display: inline-flex; align-items: center; gap: 8px; }
.erp-hr-avatar { width: 26px; height: 26px; }
.erp-detail-face { width: 36px; height: 36px; margin-right: 10px; }
.erp-hrcard { display: flex; gap: 16px; align-items: flex-start; }
.erp-hrcard > .erp-fields { flex: 1 1 auto; min-width: 0; }
.erp-hrcard-photo { flex: 0 0 auto; width: 112px; margin-bottom: 14px; padding: 6px 6px 5px; border: 1px solid #d6dbe2; background: #f4f6f9; text-align: center; }
.erp-hrcard-img { width: 98px; height: 98px; }
.erp-hrcard-cap { margin-top: 5px; font-size: 11px; color: #6b7280; }
@container win (max-width: 1000px) {
  .erp-hrcard > .erp-fields { grid-template-columns: 90px minmax(0, 1fr); }
  .erp-hrcard .erp-field-v.is-wide { grid-column: 2 / 3; }
}
@container win (max-width: 620px) {
  .erp-hrcard { flex-direction: column; }
  .erp-hrcard > .erp-fields { width: 100%; }
}

/* 감사 수첩: 관련 인물 · 보고서 인물 고르기 (식별용 기본 초상) */
.cb-person { display: inline-flex; align-items: center; gap: 8px; }
.cb-person-avatar { width: 28px; height: 28px; }
.cb-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.cb-face { position: relative; display: block; cursor: pointer; }
.cb-face input { position: absolute; opacity: 0; pointer-events: none; }
.cb-face-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 8px; border: 1.5px solid #cfc6b0; border-radius: 8px; background: #fffdf8; text-align: center; }
.cb-face:hover .cb-face-card { border-color: #a0522d; }
.cb-face input:focus-visible + .cb-face-card { outline: 2px solid #3a6ea5; outline-offset: 2px; }
.cb-face input:checked + .cb-face-card { border-color: #2f6f5e; box-shadow: 0 0 0 2px rgba(47, 111, 94, 0.3); background: #f1f8f4; }
.cb-face input:checked + .cb-face-card::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: #2f6f5e; color: #fff; font-size: 11px; line-height: 18px; }
.cb-face-img { display: flex; width: 100%; height: auto; aspect-ratio: 1 / 1; margin-bottom: 4px; }
.cb-face-name { font-size: 13px; font-weight: 700; }
.cb-face-title { font-size: 11.5px; color: #4a4a4a; }
.cb-face-dept { font-size: 11px; color: #7a7260; }

/* 내 사진 편집 */
.sp-edit { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px 20px 14px; overflow: auto; background: #fff; }
.sp-edit-stage { position: relative; flex: none; width: 260px; height: 260px; margin: 0 auto; overflow: hidden; border-radius: 6px; background: #eceff3; cursor: grab; touch-action: none; user-select: none; }
.sp-edit-stage:active { cursor: grabbing; }
.sp-edit-img { position: absolute; display: block; max-width: none; height: auto; pointer-events: none; }
.sp-edit-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 40px; color: #6b7280; font-size: 13px; text-align: center; }
/* 동그란 칸에 보일 범위 */
.sp-edit-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgba(255, 255, 255, 0.55); outline: 1px solid rgba(255, 255, 255, 0.9); pointer-events: none; }
.sp-edit-zoom { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #4b5563; }
.sp-edit-zoom input { flex: 1 1 auto; min-width: 0; }
.sp-edit-note { font-size: 12px; line-height: 1.5; color: #6b7280; }
.sp-edit-error { min-height: 16px; font-size: 12px; color: #c42b1c; }
.sp-edit-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.sp-edit-gap { flex: 1 1 auto; }
.sp-edit-buttons .dlg-btn { min-width: 64px; padding: 0 10px; }
.sp-edit-buttons .dlg-btn:disabled { opacity: 0.5; }
.erp-hrcard-edit { width: 100%; min-width: 0; margin-top: 6px; padding: 0 4px; }
.sm-user.is-editable { cursor: pointer; }
