@import "tailwindcss";

:root {
  --app-header-bg: linear-gradient(180deg, #37a184 0%, #29724f 20%, #07412e 100%);
  --app-header-border: #135643;
  --app-header-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  --board-cal-accent: #059669;
  --board-cal-accent-dark: #047857;
  --board-cal-accent-deep: #065f46;
  --board-cal-border: #a7d7c5;
  --board-cal-surface: #ecfdf5;
  --board-cal-surface-hover: #d1fae5;
  --board-cal-muted: #64748b;
}

html,
body,
#root {
  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
}

/* F12 — side-polygon-stats (가운데 통계 바) */
.side-polygon-stats {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 40px;
  min-height: 40px;
  padding: 0 48px;
  margin: 0;
  border: none;
  border-bottom: 1px solid #135643;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(90deg, #093023 20%, #074833 50%, #093023 80%);
  box-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transform: translateX(-50%);
}

/* 상단 통계 바 — Design Planning Hub 스타일 곡면 장식 */
.header-stats-bar::before,
.header-stats-bar::after,
.side-polygon-stats::before,
.side-polygon-stats::after {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 36px;
  height: 30px;
  background: transparent;
  z-index: 101;
}

.header-stats-bar::before,
.side-polygon-stats::before {
  left: -35px;
  border-top-right-radius: 20px;
  box-shadow: 18px 0 #093023;
}

.header-stats-bar::after,
.side-polygon-stats::after {
  right: -35px;
  border-top-left-radius: 20px;
  box-shadow: -18px 0 #093023;
}

.poly-stat-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.poly-stat-dot-orange {
  background-color: #ff8b13;
  box-shadow: 0 0 8px #ff8b13, inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.poly-stat-dot-red {
  background-color: red;
  box-shadow: 0 0 8px red, inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.poly-stat-dot-yellow {
  background-color: #ffeb3b;
  box-shadow: 0 0 8px #ffeb3b, inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

/* F12 aside.side — 헤더 바 전체 */
.dashboard-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  overflow: visible;
  height: 48px;
  min-height: 48px;
  padding: 0 22px 0 20px;
  background: var(--app-header-bg);
  border-bottom: 1px solid var(--app-header-border);
  box-shadow: var(--app-header-shadow);
  color: #fff;
}

.header-calendar-slot {
  position: relative;
  z-index: 101;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

.board-calendar-ref-text {
  padding: 6px 14px;
  border: 1px solid rgba(186, 216, 202, 0.35);
  border-radius: 999px;
  background: rgba(7, 65, 46, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.board-calendar-popover {
  position: fixed;
  z-index: 10000;
  width: min(400px, calc(100vw - 24px));
  padding: 14px 14px 12px;
  border: 1px solid var(--board-cal-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(7, 65, 46, 0.16);
  color: #1f2937;
}

.board-calendar-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.board-calendar-month {
  font-size: 16px;
  font-weight: 800;
  color: var(--board-cal-accent-deep);
}

.board-calendar-nav {
  width: 30px;
  height: 30px;
  border: 1px solid var(--board-cal-border);
  border-radius: 8px;
  background: var(--board-cal-surface);
  color: var(--board-cal-accent);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.board-calendar-nav:hover {
  background: var(--board-cal-surface-hover);
  border-color: var(--board-cal-accent);
}

.board-calendar-quarter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.board-calendar-quarter-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: 1px solid var(--board-cal-border);
  border-radius: 8px;
  background: #fff;
  color: var(--board-cal-accent-deep);
  cursor: pointer;
}

.board-calendar-quarter-chip:hover {
  background: var(--board-cal-surface);
  border-color: var(--board-cal-accent);
}

.board-calendar-quarter-chip.is-selected {
  border-color: var(--board-cal-accent-dark);
  background: linear-gradient(180deg, #37a184 0%, #047857 100%);
  color: #fff;
}

.board-calendar-quarter-chip-title {
  font-size: 13px;
  font-weight: 800;
}

.board-calendar-quarter-chip-range {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
}

.board-calendar-grid tbody tr {
  cursor: pointer;
}

.board-calendar-grid tbody tr:hover {
  background: var(--board-cal-surface);
}

.board-calendar-grid tr.is-selected-week {
  background: rgba(55, 161, 132, 0.12);
}

.board-calendar-grid tr.is-selected-week .board-calendar-week-label-btn {
  color: var(--board-cal-accent-dark);
  font-weight: 800;
}

.board-calendar-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}

.board-calendar-day-cell.is-outside {
  color: #cbd5e1;
  font-weight: 500;
}

.board-calendar-day-cell.is-today {
  box-shadow: inset 0 0 0 1px var(--board-cal-accent);
  border-radius: 6px;
  color: var(--board-cal-accent);
}

.board-calendar-grid-wrap {
  overflow-x: auto;
}

.board-calendar-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.board-calendar-grid th {
  padding: 4px 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--board-cal-muted);
  text-align: center;
}

.board-calendar-grid-week-col {
  width: 72px;
  text-align: left;
}

.board-calendar-week-label-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--board-cal-accent);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.board-calendar-week-label-btn:hover {
  color: var(--board-cal-accent-dark);
  text-decoration: underline;
}

.board-calendar-day-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}

.board-calendar-day-btn.is-outside {
  color: #cbd5e1;
  font-weight: 500;
}

.board-calendar-day-btn.is-ref {
  background: linear-gradient(180deg, #37a184 0%, #047857 100%);
  color: #fff;
}

.board-calendar-day-btn.is-today:not(.is-ref) {
  box-shadow: inset 0 0 0 1px var(--board-cal-accent);
  color: var(--board-cal-accent);
}

.board-calendar-day-btn:hover:not(.is-ref) {
  background: var(--board-cal-surface);
}

.board-calendar-grid tr.is-selected-week .board-calendar-week-label-btn {
  color: var(--board-cal-accent-dark);
}

.board-calendar-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.board-calendar-foot button {
  padding: 6px 14px;
  border: 1px solid var(--board-cal-border);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--board-cal-accent-deep);
  cursor: pointer;
}

.board-calendar-foot button:hover {
  background: var(--board-cal-surface);
  border-color: var(--board-cal-accent);
  color: var(--board-cal-accent-dark);
}

.side-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.side-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* F12 — 헤더 원형 아이콘 버튼 (team / + / 듀얼모니터) */
.header-action-btn-new,
.header-view-btn-new,
.header-calendar-btn-new,
.team-status-btn-new {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid #1a4d42;
  border-radius: 50%;
  color: #cef1eb;
  cursor: pointer;
  background: linear-gradient(180deg, #0d3f34 0%, #051f19 100%);
  box-shadow: 0 0 0 1px #000, 0 2px 2px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease-in-out;
}

.header-action-btn-new svg,
.header-view-btn-new svg,
.header-calendar-btn-new svg,
.team-status-btn-new svg {
  color: inherit;
  filter: none;
}

.header-action-btn-new:hover,
.header-view-btn-new:hover,
.header-calendar-btn-new:hover,
.team-status-btn-new:hover {
  color: #fff;
  border-color: #36816d;
  background: linear-gradient(180deg, #115244 0%, #072b23 100%);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px #000,
    0 0 8px rgba(36, 204, 158, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.7);
}

.header-action-btn-new:active,
.header-action-btn-new.active,
.header-view-btn-new.active,
.header-calendar-btn-new.active,
.team-status-btn-new.active {
  color: #cef1eb;
  border-color: #1a4d42;
  background: linear-gradient(180deg, #072b23 0%, #051f19 100%);
  transform: translateY(0);
  box-shadow: 0 0 0 1px #000, 0 1px 2px rgba(0, 0, 0, 0.6);
}

.dual-monitor-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dual-monitor-icon-wrap .m-icon {
  position: absolute;
}

.dual-monitor-icon-wrap .m-back {
  top: 0;
  left: -3px;
  opacity: 0.5;
}

.dual-monitor-icon-wrap .m-front {
  right: -3px;
  bottom: 0;
}

/* F12 Design Planning Hub — 타이틀 */
.main_tit {
  color: #bad8ca;
  font-weight: 700;
  text-shadow:
    -1px -1px 1px rgba(0, 0, 0, 0.25),
    1px -1px 1px rgba(0, 0, 0, 0.25),
    -1px 1px 1px rgba(0, 0, 0, 0.25),
    1px 1px 1px rgba(0, 0, 0, 0.25);
}

/* F12 — 통계 영역 텍스트 그림자 */
.header-stat-text {
  text-shadow:
    -1px -1px 0 #00000040,
    1px -1px 0 #00000040,
    -1px 1px 0 #00000040,
    1px 1px 0 #00000040;
}

/* F12 — poly-stat-item (중앙 통계 한 줄) */
.poly-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.3px;
  white-space: nowrap;
  color: #eeeae3;
}

.poly-stat-quarter {
  flex-shrink: 0;
  font-weight: 600;
  color: #ffffffc4;
}

.poly-stat-bullet {
  flex-shrink: 0;
  color: rgba(238, 234, 227, 0.4);
}

.poly-stat-divider {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background-color: rgba(238, 234, 227, 0.4);
}

/* F12 — poly-click-stat (기본 / hover / active) — padding·radius는 JS 인라인과 동일 */
.poly-click-stat {
  display: inline;
  box-sizing: border-box;
  line-height: 21px;
  vertical-align: middle;
  color: #fffc;
  user-select: none;
  font-size: 18px;
  font-weight: 400;
  border: 1px solid #1d6947;
  background: linear-gradient(180deg, #337c5f 0%, #1c4638 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

.poly-stat-val {
  font-weight: 800;
}

.poly-stat-unit {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.5;
}

.poly-click-stat:hover {
  color: #fff;
  background: #1b543b;
  border-color: #1d6947;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.poly-click-stat.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.54) 0%,
    rgba(0, 0, 0, 0.25) 20%,
    rgba(0, 0, 0, 0.09) 80%,
    rgba(0, 0, 0, 0.54) 100%
  );
  border: 1px solid rgba(0, 0, 0, 0.86);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
}

/* ─── 팀 인원 현황 패널 (참고 사이트) ─── */
:root {
  --bg-beige: #f4f1ea;
  --brown-main: #6b4c35;
}

.team-overlay {
  position: absolute;
  inset: 48px 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--bg-beige);
  animation: teamFadeSlideIn 0.22s ease;
}

@keyframes teamFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-panel-header {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
  padding: 12px 40px 0;
  background: transparent;
  border-bottom: none;
}

.team-panel-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--brown-main);
}

.team-total-badge {
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--brown-main);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.team-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #174c3a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px #0000000d;
}

.team-view-toggle:hover {
  background: #286953;
  border-color: #577e71;
}

.team-view-toggle.active {
  border: 2px solid #53af90;
  background: #174c3a;
  color: #cdffee;
  box-shadow: 0 4px 12px #064b3626;
}

.team-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #e6e1dc;
  border-radius: 8px;
  background: #f4f6f4;
  color: #555;
  cursor: pointer;
  transition: background 0.15s;
}

.team-close-btn:hover {
  background: #eee;
}

.team-tree-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px 32px;
  overflow: auto;
  background-image: radial-gradient(#d0dfd8 1px, transparent 1px);
  background-size: 32px 32px;
  scrollbar-width: none;
}

.team-tree-scroll::-webkit-scrollbar {
  display: none;
}

.team-empty-state {
  justify-content: center;
  color: #5a6b62;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  gap: 8px;
}

.team-empty-hint {
  font-size: 14px;
  font-weight: 500;
  color: #8a9a92;
}

.tree-leaders-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: 16px;
}

.tree-root-vline {
  width: 2px;
  height: 12px;
  background: #064b3680;
}

.tree-cells-row {
  display: flex;
  justify-content: center;
  gap: 0;
  width: 100%;
  position: relative;
}

.tree-cell-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-width: 280px;
  max-width: 360px;
  padding: 0 8px;
  position: relative;
}

.tree-cell-hline-wrap {
  height: 16px;
}

.tree-cell-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  border: 1px solid #e0ece7;
  border-radius: 12px;
  background: #fff;
  color: #064b36;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 2px 8px #0000000f;
}

.tree-cell-name {
  flex: 1;
  text-align: left;
}

.tree-badge {
  padding: 3px 10px;
  border-radius: 20px;
  background: #24694a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tree-members-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 10px;
}

.tree-leader-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 320px;
  padding: 16px 32px;
  border: 1.5px solid #c8dfd5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px #064b361f;
  transition: all 0.15s;
}

.tree-member-card {
  position: relative;
  display: grid;
  grid-template-areas:
    "avatar info"
    "tasks tasks";
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 18px;
  min-width: 280px;
  margin-left: 0;
  padding: 4px 24px 12px;
  border: 1px solid #e9ede9;
  border-radius: 14px;
  background: #ffffffb3;
  transition: all 0.14s;
}

.leader-avatar,
.member-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #064b36;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px #064b3640;
}

.leader-avatar {
  width: 68px;
  height: 68px;
  font-size: 24px;
  background: linear-gradient(135deg, #064b36, #0a7a57);
}

.leader-avatar img,
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar {
  grid-area: avatar;
  width: 52px;
  height: 52px;
  margin-top: 8px;
  font-size: 18px;
}

.leader-info,
.member-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.member-info-wrap {
  grid-area: info;
}

.leader-name-row,
.member-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.leader-name {
  font-size: 22px;
  font-weight: 800;
  color: #111;
}

.leader-sub,
.member-role {
  font-size: 14px;
  font-weight: 500;
  color: #2f5e44;
}

.member-name {
  font-size: 19px;
  font-weight: 700;
  color: #111;
}

.member-rank {
  font-size: 14px;
  font-weight: 500;
  color: #2f5e44;
}

.member-contact {
  margin-top: 1px;
  font-size: 14px;
  color: #666;
}

.highlighted-member {
  border-color: #53af90 !important;
  background: #f0faf5 !important;
  box-shadow: 0 0 0 2px #53af9066, 0 8px 24px #064b3626 !important;
}

/* 툴팁 — hover */
.member-tooltip {
  position: absolute;
  top: 12px;
  left: 95%;
  z-index: 1000;
  width: 300px;
  padding: 8px 12px 12px;
  border: 2px solid #0000001a;
  border-radius: 0 16px 16px 32px;
  background: #064b36f5;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px #0000004d;
  transition: opacity 0.25s, visibility 0.25s;
}

.tree-member-card:hover .member-tooltip,
.tree-leader-card:hover .member-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.member-tooltip.is-static {
  position: relative;
  top: auto;
  left: auto;
  grid-area: tasks;
  width: 100%;
  margin-top: 2px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  border-radius: 12px;
  background: #f8fcfa;
  color: #064b36;
  border: 1px solid #c8dfd5;
  box-shadow: none;
}

.team-tree-scroll.show-all-tooltips .member-tooltip.is-static {
  grid-area: tooltip;
  align-self: stretch;
  min-width: 0;
  margin-top: 0;
  padding: 8px 12px 10px;
}

.tooltip-header {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ffffff1a;
  font-size: 15px;
  font-weight: 800;
  color: #a8dec0;
}

.member-tooltip.is-static .tooltip-header {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom-color: #e1ece7;
  color: #064b36;
}

.tooltip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tooltip-item {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.tooltip-item:hover,
.tooltip-item.active {
  background: #ffffff14;
}

.member-tooltip.is-static .tooltip-item:hover,
.member-tooltip.is-static .tooltip-item.active {
  background: #e8f5ef;
}

.tooltip-item-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 8px;
  width: 100%;
}

.tooltip-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: #14a873;
}

.member-tooltip.is-static .tooltip-dot {
  background: #10b981;
}

.tooltip-item-body {
  flex: 1;
  min-width: 0;
}

.tooltip-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  word-break: keep-all;
}

.member-tooltip.is-static .tooltip-title {
  font-size: 14px;
  color: #444;
}

.tooltip-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
}

.tooltip-project-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.85;
}

.member-tooltip.is-static .tooltip-project-detail {
  color: #5a7a6a;
}

.member-tooltip:not(.is-static) .tooltip-project-detail {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #ffffff18;
  opacity: 1;
}

.tooltip-detail-sep {
  opacity: 0.5;
  font-weight: 700;
}

.tooltip-project-detail strong {
  color: inherit;
  font-weight: 800;
}

.tooltip-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tooltip-badge-always,
.tooltip-badge-progress {
  background: #14a87333;
  color: #a8f0d0;
}

.member-tooltip.is-static .tooltip-badge-always,
.member-tooltip.is-static .tooltip-badge-progress {
  background: #d1fae5;
  color: #047857;
}

.tooltip-badge-hold,
.tooltip-badge-wait {
  background: #f59e0b33;
  color: #fde68a;
}

.member-tooltip.is-static .tooltip-badge-hold,
.member-tooltip.is-static .tooltip-badge-wait {
  background: #fef3c7;
  color: #b45309;
}

.tooltip-badge-done {
  background: #ffffff22;
  color: #e5e7eb;
}

/* 업무 전체보기 모드 — 좌: 프로필, 우: 참여 업무 */
.team-tree-scroll.show-all-tooltips .tree-member-card,
.team-tree-scroll.show-all-tooltips .tree-leader-card {
  display: grid;
  grid-template-areas:
    "avatar tooltip"
    "info tooltip";
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px 16px;
  height: auto;
  min-height: unset;
  padding: 16px 20px;
  border: 1.5px solid #c8dfd5;
  border-radius: 18px;
  background: #fff;
}

.team-tree-scroll.show-all-tooltips .tree-cell-col {
  min-width: 350px;
  max-width: 530px;
}

.team-tree-scroll.show-all-tooltips .member-info-wrap,
.team-tree-scroll.show-all-tooltips .leader-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
}

.team-tree-scroll.show-all-tooltips .leader-avatar,
.team-tree-scroll.show-all-tooltips .member-avatar {
  grid-area: avatar;
  justify-self: start;
  margin-bottom: 0;
}

.team-tree-scroll.show-all-tooltips .member-contact {
  white-space: nowrap;
}

.team-status-btn-new.active {
  color: #cef1eb;
  background: linear-gradient(#072b23 0%, #051f19 100%);
  border-color: #53af90;
  box-shadow: 0 0 0 1px #000, 0 0 8px #24cc9e66, 0 1px 2px #0009;
}

/* ─── /admin 팀원 관리 ─── */
.admin-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-beige);
  background-image: radial-gradient(#d0dfd8 1px, transparent 1px);
  background-size: 32px 32px;
  color: #1a2e28;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 24px;
  background: linear-gradient(180deg, #37a184 0%, #29724f 20%, #07412e 100%);
  border-bottom: 1px solid #135643;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-back-link {
  font-size: 13px;
  font-weight: 600;
  color: #cef1eb;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.admin-back-link:hover {
  opacity: 1;
  color: #fff;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.admin-header-org {
  color: #bad8ca;
}

.admin-header-sep {
  opacity: 0.5;
}

.admin-header-actions {
  display: flex;
  gap: 10px;
}

.admin-toolbar {
  padding: 16px 32px 8px;
}

.admin-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #c8dfd5;
  font-size: 14px;
  color: #2f5e44;
  box-shadow: 0 2px 6px #064b3614;
}

.admin-stat-chip strong {
  font-weight: 800;
  color: #064b36;
}

.admin-stat-total {
  background: #064b36;
  border-color: #064b36;
  color: #e8f5ef;
}

.admin-stat-total strong {
  color: #fff;
}

.admin-toolbar-hint {
  font-size: 13px;
  color: #5a6b62;
  margin: 0;
}

.admin-main {
  flex: 1;
  padding: 8px 32px 40px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.admin-empty {
  text-align: center;
  padding: 48px;
  color: #6b7c74;
  font-size: 16px;
}

.admin-empty-card {
  text-align: center;
  padding: 48px 32px;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid #c8dfd5;
  box-shadow: 0 6px 20px #064b3614;
}

.admin-empty-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #064b36;
}

.admin-empty-card p {
  margin: 0 0 24px;
  color: #5a6b62;
  font-size: 15px;
}

.admin-quick-add {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.admin-section {
  margin-bottom: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid #c8dfd5;
  overflow: hidden;
  box-shadow: 0 4px 16px #064b3612;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(90deg, #f0faf5 0%, #fff 100%);
  border-bottom: 1px solid #e0ece7;
}

.admin-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #064b36;
}

.admin-section-badge {
  padding: 3px 10px;
  border-radius: 20px;
  background: #24694a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-member-table-wrap {
  overflow-x: auto;
}

.admin-member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-member-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #5a6b62;
  background: #f8fcfa;
  border-bottom: 1px solid #e8efeb;
}

.admin-member-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f4f2;
  vertical-align: middle;
}

.admin-member-table tr:last-child td {
  border-bottom: none;
}

.admin-member-table tr:hover td {
  background: #f8fcfa;
}

.admin-member-table .w-avatar {
  width: 64px;
}

.admin-member-table .w-actions {
  width: 88px;
}

.admin-member-name {
  display: block;
  font-weight: 700;
  color: #111;
  font-size: 15px;
}

.admin-member-cell-tag {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #e8f5ef;
  color: #064b36;
  font-size: 11px;
  font-weight: 600;
}

.admin-contact {
  color: #555;
  white-space: nowrap;
}

.admin-sort {
  color: #888;
  text-align: center;
}

.admin-row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.admin-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e0ece7;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.admin-icon-btn:hover {
  background: #e8f5ef;
  border-color: #53af90;
}

.admin-icon-btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.admin-btn-primary {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: #174c3a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 2px 6px #064b3626;
}

.admin-btn-primary:hover {
  background: #286953;
}

.admin-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-btn-outline {
  padding: 8px 16px;
  border: 1.5px solid #53af90;
  border-radius: 8px;
  background: #fff;
  color: #064b36;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-btn-outline:hover {
  background: #e8f5ef;
}

.admin-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.admin-footer-note {
  margin-top: 16px;
  text-align: center;
}

.admin-preview-link {
  font-size: 14px;
  font-weight: 600;
  color: #064b36;
  text-decoration: none;
}

.admin-preview-link:hover {
  text-decoration: underline;
}

/* 관리 모달 */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 75, 54, 0.45);
  backdrop-filter: blur(4px);
}

.admin-modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px #00000040;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8efeb;
  background: linear-gradient(90deg, #f0faf5, #fff);
}

.admin-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #064b36;
}

.admin-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #888;
  font-size: 18px;
  cursor: pointer;
}

.admin-modal-close:hover {
  background: #f0f4f2;
}

.admin-modal-body {
  padding: 20px;
}

.admin-form-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 14px;
  background: #f8fcfa;
  border: 1.5px solid #c8dfd5;
}

.admin-preview-name {
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

.admin-preview-sub {
  font-size: 13px;
  color: #2f5e44;
  margin-top: 2px;
}

.admin-preview-cell {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 6px;
  background: #064b36;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field-full {
  grid-column: 1 / -1;
}

.admin-field span {
  font-size: 12px;
  font-weight: 700;
  color: #5a6b62;
}

.admin-field input,
.admin-field select {
  padding: 10px 12px;
  border: 1px solid #d8e8e0;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.admin-field input:focus,
.admin-field select:focus {
  border-color: #53af90;
  box-shadow: 0 0 0 3px #53af9022;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f4f2;
}

.admin-btn-ghost {
  padding: 8px 16px;
  border: 1px solid #e0ece7;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.admin-btn-ghost:hover {
  background: #f8fcfa;
}

.admin-team-manage-link {
  font-size: 13px;
  font-weight: 600;
  color: #064b36;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-team-manage-link:hover {
  color: #286953;
}

.admin-photo-field {
  gap: 8px !important;
}

.admin-photo-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-photo-file-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px dashed #53af90;
  background: #f0faf5;
  color: #064b36;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-photo-file-btn:hover {
  background: #e0f5ec;
}

.admin-photo-hint {
  font-size: 12px;
  color: #6b7c74;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ─── 앱 셸: 보드 + 우측 상세 도킹 (dashboard-260504 참고) ─── */
.app-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.app-main {
  display: flex;
  flex-direction: column;
  flex: auto;
  width: 100%;
  min-width: 0;
  height: 100dvh;
  overflow: hidden;
}

.app-shell:not(.detail-docked) .app-main {
  flex: 0 0 100vw;
  width: 100vw;
  min-width: 100vw;
}

.app-shell.detail-docked .app-main {
  flex: auto;
  width: auto;
  min-width: 0;
}

.app-shell.dual-mode-parent .app-right {
  display: none !important;
}

.app-shell.dual-mode-parent .app-main {
  flex: 0 0 100vw;
  width: 100vw;
  min-width: 100vw;
}

.app-right {
  position: relative;
  flex: auto;
  min-width: 0;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(135deg, #fbfaf8, #eef5f1);
  border-left: 1px solid #e5e5e5;
}

.app-right:not(.detail-open) {
  display: none;
}

.app-right.detail-open {
  z-index: 1000;
  display: block;
  flex: 0 0 clamp(400px, 35vw, 600px);
  width: clamp(400px, 35vw, 600px);
  box-shadow: -10px 0 30px #0000000d;
}

.detail-popup-view {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.detail-popup-view .app-right {
  display: block;
  flex: auto;
  width: 100vw;
  min-width: 100vw;
  border-left: none;
}

/* ─── 대시보드 3부문 보드 — 상단 헤더 그린 톤 통일 ─── */
.board-main {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.board-grid {
  display: grid;
  height: 100%;
  min-height: 0;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border-top: 1px solid #135643;
}

.board-dept-column {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  border: none;
  border-right: 1px solid #c8dfd5;
  background: #f8fcfa;
  box-shadow: none;
}

.board-dept-column:last-child {
  border-right: none;
}

.board-dept-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 20px 10px;
  border-bottom: 3px solid #29724f;
  background: linear-gradient(180deg, #f8fcfa 0%, #f0f7f4 100%);
}

.board-dept-header-main {
  min-width: 0;
  flex: 1;
}

.board-dept-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.board-dept-title {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.board-dept-title-en {
  font-size: 20px;
  font-weight: 700;
  opacity: 0.85;
}

.board-dept-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #5a6b62;
}

/* 상단 현황판(poly-stat)처럼 — 숫자 크게, 건은 오른쪽 */
.board-dept-count-badge {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-end;
  flex-shrink: 0;
  line-height: 1;
  text-align: right;
}

.board-dept-count-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.board-dept-count-unit {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.55;
}

.board-project-list {
  min-height: 0;
  flex: 1 1 0;
  overflow-y: auto;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fcfa;
  transition: background 0.2s;
}

.board-project-list.is-over {
  background: #eef6f2;
}

.board-empty {
  display: flex;
  height: 120px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: #8a9a92;
}

/* 상태 점 — 헤더 통계 색과 동일 계열 */
.board-status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 9px;
  border-radius: 50%;
}

.board-status-dot--ongoing {
  background-color: #37a184;
}

.board-status-dot--hold {
  background-color: #ff8b13;
}

.board-status-dot--done {
  background-color: #73726f;
}

.board-project-card {
  cursor: grab;
  user-select: none;
  position: relative;
  padding: 10px 4px 12px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #dce8e3;
  background: transparent;
  transition: background 0.2s;
}

.board-project-card:last-child {
  border-bottom: none;
}

.board-project-card:hover {
  background: linear-gradient(180deg, #f2f9f6 0%, #eaf3ef 100%);
}

.board-project-card--overlay {
  opacity: 0.92;
  background: #f8fcfa;
  border: 1px solid #a8cfc0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(7, 65, 46, 0.12);
  padding: 12px 16px;
}

.board-project-card:active {
  cursor: grabbing;
}

.board-project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.board-project-main {
  min-width: 0;
  flex: 1;
}

.board-project-title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.board-project-title {
  color: #0a2e24;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.board-project-date {
  margin: 5px 0 0 18px;
  color: #5a6b62;
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-project-desc {
  margin: 4px 0 0 18px;
  color: #3d5248;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.board-project-issue {
  margin: 4px 0 0 18px;
  color: #c0392b;
  font-size: 20px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 반원 진행률 */
.board-gauge {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 56px;
}

.board-gauge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.board-gauge-value {
  position: absolute;
  left: 50%;
  top: var(--gauge-cy, 82%);
  transform: translate(-50%, -50%);
  color: #29724f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

/* 기반업무 — 3부문 동일: 약 4줄 높이 고정, 초과 시 스크롤 */
.board-routine-section {
  --routine-row-h: 40px;
  --routine-visible-rows: 4;
  --routine-row-gap: 6px;
  --routine-pad-y: 28px;
  flex: 0 0 calc(
    var(--routine-row-h) * var(--routine-visible-rows) +
    var(--routine-row-gap) * (var(--routine-visible-rows) - 1) +
    var(--routine-pad-y) + 2px
  );
  height: calc(
    var(--routine-row-h) * var(--routine-visible-rows) +
    var(--routine-row-gap) * (var(--routine-visible-rows) - 1) +
    var(--routine-pad-y) + 2px
  );
  max-height: calc(
    var(--routine-row-h) * var(--routine-visible-rows) +
    var(--routine-row-gap) * (var(--routine-visible-rows) - 1) +
    var(--routine-pad-y) + 2px
  );
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 16px 16px;
  border-top: 2px solid #c8dfd5;
  transition: background 0.2s, filter 0.2s;
}

.board-routine-section.is-over {
  filter: brightness(0.98);
  background-color: #e4f2ec !important;
}

.board-routine-list {
  min-height: 0;
  flex: 1 1 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--routine-row-gap, 6px);
}

.board-routine-empty {
  height: 24px;
}

.board-routine-item {
  cursor: grab;
  user-select: none;
  display: block;
  flex-shrink: 0;
  padding: 10px 12px;
  border: 1px solid #c8dfd5;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.board-routine-item .board-project-title-row {
  align-items: flex-start;
}

.board-routine-item .board-status-dot {
  margin-top: 8px;
}

.board-routine-item .board-project-desc {
  margin-top: 4px;
}

.board-routine-item:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: #a8cfc0;
  transform: translateX(2px);
}

.board-routine-item:active {
  cursor: grabbing;
}

.board-project-list::-webkit-scrollbar,
.board-routine-list::-webkit-scrollbar {
  width: 6px;
}

.board-project-list::-webkit-scrollbar-thumb,
.board-routine-list::-webkit-scrollbar-thumb {
  background: #c8dfd5;
  border-radius: 3px;
}

.board-project-list::-webkit-scrollbar-thumb:hover,
.board-routine-list::-webkit-scrollbar-thumb:hover {
  background: #a8cfc0;
}

