/* =========================================================
   목표관리(MBO) 보드 — 스캐폴딩 스타일 (2026-07-14)
   view-mode-milestone / view-mode-common-competency 패턴 답습.
   ========================================================= */

/* 목표관리 진입 시 칸반 기본 UI 숨김 */
#mainBoardContent.view-mode-goal > .top-app-bar,
#mainBoardContent.view-mode-goal > .progress-section,
#mainBoardContent.view-mode-goal > .input-area-wrapper,
#mainBoardContent.view-mode-goal > .board {
  display: none !important;
}

#goalBoard {
  display: none;
  position: absolute;
  inset: 0 0 24px 0;
  z-index: 24;
  box-sizing: border-box;
  background: var(--lobby-rd-bg, #f5f7fa);
  overflow: auto;
}

#goalBoard .goal-shell {
  width: 100%;
  min-height: 100%;
  padding: 0 var(--app-gutter, 24px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* 헤더 — 다른 보드(마일스톤/역량평가)와 동일한 도트+제목 톤 */
#goalBoard .goal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 0 0 0;
  flex: 0 0 auto;
}
#goalBoard .proj-dot-lg {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--board-title-dot-color, var(--lobby-rd-primary, #0061a4));
  flex: 0 0 auto;
}
#goalBoard .goal-title {
  font-size: 26px;
  font-weight: 700;
  color: #1c2128;
  margin: 0;
  line-height: 1.2;
}

/* 개발 중 플레이스홀더 (빈 상태) */
#goalBoard .goal-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: #6b7280;
  padding: 40px 0 80px;
}
#goalBoard .goal-empty-icon {
  color: var(--lobby-rd-primary, #0061a4);
  opacity: 0.85;
}
#goalBoard .goal-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #1c2128;
}
#goalBoard .goal-empty-desc {
  font-size: 13.5px;
  line-height: 1.7;
  margin: 0;
}

/* 다크 톤 */
html[data-theme="dark"] #goalBoard .goal-title,
html[data-theme="dark"] #goalBoard .goal-empty-title {
  color: rgba(255, 255, 255, 0.9);
}
html[data-theme="dark"] #goalBoard .goal-empty {
  color: rgba(255, 255, 255, 0.55);
}

/* =========================================================
   목표 세분화 세팅 화면 (2026-07-14) — 로비 톤
   ========================================================= */
#goalBoard .goal-top {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 0 14px; flex: 0 0 auto;
}
#goalBoard .goal-title { font-size: 26px; font-weight: 700; color: #1c2128; margin: 0; line-height: 1.2; }
#goalBoard .goal-sub { font-weight: 600; color: #98a1b0; font-size: 16px; }
#goalBoard .goal-top-ctrl { margin-left: auto; display: flex; align-items: center; gap: 10px; }
#goalBoard .goal-tab { display: flex; background: #eef1f6; border-radius: 10px; padding: 3px; }
#goalBoard .goal-tab button {
  border: none; background: transparent; padding: 7px 15px; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 500; color: #6b7684; cursor: pointer;
}
#goalBoard .goal-tab button.on {
  background: #fff; color: var(--lobby-rd-primary, #0061a4);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); font-weight: 600;
}
#goalBoard .goal-save {
  border: none; background: var(--lobby-rd-primary, #0061a4); color: #fff;
  border-radius: 9px; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
#goalBoard .goal-save.is-dirty { box-shadow: 0 0 0 3px rgba(0, 97, 164, 0.18); }

#goalBoard .gf-hint { font-size: 12.5px; color: #6b7684; margin: 0 0 18px; }
#goalBoard .gf-hint b { color: var(--lobby-rd-primary, #0061a4); }
#goalBoard .gf-rolock { color: #c77700; font-weight: 600; }

/* 계층 레인(연결선) */
#goalBoard .gf-lane { position: relative; padding-left: 26px; margin-bottom: 16px; }
#goalBoard .gf-lane::before { content: ""; position: absolute; left: 9px; top: 34px; bottom: 8px; width: 2px; background: #e9edf3; }
#goalBoard .gf-lane:last-child { margin-bottom: 48px; }
#goalBoard .gf-lane-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #fff;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 12px; position: relative; z-index: 1;
}
#goalBoard .gf-lane-tag .en { opacity: 0.85; font-weight: 500; }
#goalBoard .gf-lv1 .gf-lane-tag { background: #0f4c81; }
#goalBoard .gf-lv2 .gf-lane-tag { background: var(--lobby-rd-primary, #0061a4); }
#goalBoard .gf-lv3 .gf-lane-tag { background: #4a8fd0; }
#goalBoard .gf-lane-dot { position: absolute; left: 3px; top: 5px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--lobby-rd-bg, #f5f7fa); z-index: 2; }
#goalBoard .gf-lv1 .gf-lane-dot { background: #0f4c81; }
#goalBoard .gf-lv2 .gf-lane-dot { background: var(--lobby-rd-primary, #0061a4); }
#goalBoard .gf-lv3 .gf-lane-dot { background: #4a8fd0; }

/* 카드 */
#goalBoard .gf-card {
  background: #fff; border: 1px solid #e9edf3; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 22px -14px rgba(16, 32, 64, 0.15);
  padding: 16px 18px; margin-bottom: 12px;
}
#goalBoard .gf-org { border-left: 3px solid var(--lobby-rd-primary, #0061a4); }
#goalBoard .gf-job { border-left: 3px solid #4a8fd0; }
#goalBoard .gf-cardhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#goalBoard .gf-no { width: 22px; height: 22px; border-radius: 6px; background: #eef4fb; color: var(--lobby-rd-primary, #0061a4); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
#goalBoard .gf-cardtitle { font-weight: 700; font-size: 14.5px; color: #1c2128; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#goalBoard .gf-del { margin-left: auto; border: none; background: transparent; color: #b6bec9; cursor: pointer; padding: 4px; border-radius: 7px; display: flex; flex: 0 0 auto; }
#goalBoard .gf-del:hover { background: #fdecec; color: #e5484d; }

/* 입력 행 */
#goalBoard .gf-row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
#goalBoard .gf-row:last-child { margin-bottom: 0; }
#goalBoard .gf-row > label { width: 120px; flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: #6b7684; }
#goalBoard .gf-row > label small { display: block; font-weight: 400; font-size: 11px; color: #9aa3b0; }
#goalBoard .gf-fld { flex: 1; min-width: 0; border: 1px solid #e9edf3; border-radius: 9px; padding: 9px 12px; font: inherit; font-size: 13.5px; color: #1c2128; background: #fbfcfd; }
#goalBoard .gf-fld:focus { outline: none; border-color: var(--lobby-rd-primary, #0061a4); background: #fff; }
#goalBoard .gf-fld[readonly] { background: #f5f7fa; color: #5b6472; }
#goalBoard .gf-row2 .gf-wt { flex: 0 0 130px; }
#goalBoard .gf-assignee { flex: 0 0 200px; font-weight: 600; }
#goalBoard .gf-orgref { flex: 1; min-width: 0; border: 1px solid #e9edf3; border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 12.5px; color: #4a5360; background: #f5f7fa; cursor: pointer; }

/* 추가 버튼 / 빈 상태 */
#goalBoard .gf-add { width: 100%; border: 1px dashed #d7dee7; background: #fff; color: var(--lobby-rd-primary, #0061a4); border-radius: 12px; padding: 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
#goalBoard .gf-add:hover { background: #f4f8fc; }
#goalBoard .gf-empty { color: #9aa3b0; font-size: 13px; padding: 14px 4px; }

/* 다크 */
html[data-theme="dark"] #goalBoard .goal-title { color: rgba(255, 255, 255, 0.9); }
html[data-theme="dark"] #goalBoard .gf-card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
html[data-theme="dark"] #goalBoard .gf-fld { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.88); }
html[data-theme="dark"] #goalBoard .gf-fld[readonly] { background: rgba(255, 255, 255, 0.02); }
