@import './header.css?v=20260804-summary-detail';

:root {
  --bg-beige: #f0ede6;
  --card-white: #ffffff;
  --border-light: #e5e2db;
  --brown-dark: #3e332c;
  --brown-main: #684e42;

  --red: #ff3b30;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --green: #2e7d32;
  --blue: #1565c0;
  --grey: #6d645e;

  /* 팀 셀 구분색 — 캘린더 tcal-cell-* · 대시보드 블릿(--dept-tone) 공통 */
  --team-cell-collab: #85672C;
  --team-cell-ux: #198856;
  --team-cell-video: #3B4FA2;
  --team-cell-edit: #9233B7;

  --text-main: #1e1b18;
  --text-muted: #8e8780;

  /* 다크 패널(상세/업무) 텍스트·표면 계열 — 기존 인라인 하드코딩 값과 동일 */
  --panel-text: #f9fafb;
  --panel-text-soft: #d1d5db;
  --panel-text-muted: #9ca3af;
  --panel-border: #4b5563;
  --panel-surface: #374151;

  /* 브랜드 그린 액센트 — 기존 인라인 하드코딩 값과 동일 */
  --green-brand: #064b36;
  --green-emerald: #10b981;

  /* 편집 모달 멤버 목록 구분선/라벨 — 기존 인라인 하드코딩 값과 동일 */
  --edit-divider: #eae8e2;
  --edit-label: #8a7d75;

  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    Roboto,
    "Helvetica Neue",
    "Segoe UI",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Malgun Gothic",
    sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

body {
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

/* 이 크기 미만에서는 화면을 줄이지 않고 문서 스크롤로 넘긴다 */
:root {
  --wd-min-w: 1120px;
  --wd-min-h: 630px;
}

/* 문서 스크롤: html/body 는 overflow 를 건드리지 않는다(기본 visible → 뷰포트 auto).
   body 가 min 이상으로 커지면 브라우저 문서 스크롤바가 생긴다.
   앱 내부 클립은 #app 만 담당. body overflow:hidden / body::-webkit-scrollbar 숨김은
   뷰포트 스크롤을 막거나 스크롤바를 지울 수 있어 금지. */
html {
  min-width: var(--wd-min-w);
  min-height: var(--wd-min-h);
  background: var(--bg-beige);
  font-family: inherit;
  color: var(--text-main);
  overscroll-behavior: none;
  /* 문서 스크롤(html) 전용. 상속되므로 내부 커스텀 스크롤러는 scrollbar-color: auto 로 끊는다 */
  scrollbar-color: #e0d9d2 transparent; /* Firefox — Chrome에서는 webkit 규칙 사용 */
}

/* 문서 스크롤바 — 내부(.tcal-body 등)와 동일 톤. display:none / scrollbar-width:none 금지 */
html::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background: #e0d9d2;
  border-radius: 3px;
}
html::-webkit-scrollbar-thumb:hover {
  background: #b0a79e;
}

body {
  width: max(100%, var(--wd-min-w));
  min-width: var(--wd-min-w);
  height: max(100dvh, var(--wd-min-h));
  min-height: var(--wd-min-h);
  background: var(--bg-beige);
  font-family: inherit;
  color: var(--text-main);
  overflow: visible;
  overscroll-behavior: none;
}

#root,
#app {
  width: 100%;
  min-width: var(--wd-min-w);
  height: 100%;
  background: var(--bg-beige);
  font-family: inherit;
  color: var(--text-main);
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* 앱 셸 내부 스크롤바만 숨김. body/html 에는 적용하지 않음(문서 스크롤바 유지). */
#root::-webkit-scrollbar,
#app::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.app {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* 100vw/100dvh 대신 셸(#app) 기준 — 뷰포트가 최소 크기보다 작아도 줄지 않는다 */
  width: 100%;
  min-width: var(--wd-min-w);
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.main {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-beige);
  overflow: hidden;
}

/* ─── 팀 현황 패널 ─── */
.team-overlay {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--bg-beige);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.team-overlay.is-entering {
  animation: fadeSlideIn 0.22s ease;
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.team-panel-header {
  display: flex;
  align-items: center;
  padding: 12px 40px 0 40px;
  height: 48px;
  flex: 0 0 48px;
  background: transparent;
  border-bottom: none;
  gap: 16px;
}
.team-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--brown-main);
  flex: 1;
}
.team-total-badge {
  background: var(--brown-main);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.rank-status-card {
  position: absolute;
  top: 56px;
  right: 56px;
  z-index: 20;
  width: 378px;
  color: #13233b;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 3px 7px rgba(26, 68, 120, 0.14));
}

.rank-status-title {
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #075ca5 0%, #004487 100%);
  color: #fff;
  border-radius: 3px 3px 0 0;
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.rank-status-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #c8d8ea;
  border-top: none;
  border-radius: 0 0 5px 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.rank-status-table th,
.rank-status-table td {
  height: 22px;
  padding: 0 6px;
  border-right: 1px solid #d4e0ed;
  border-bottom: 1px solid #d4e0ed;
  text-align: center;
  vertical-align: middle;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

.rank-status-table thead th {
  height: 18px;
  padding: 0 4px;
  color: #162845;
  background: rgba(243, 248, 255, 0.9);
  font-weight: 500;
  line-height: 18px;
}

.table-header-row-parent .header-cell-group {
  grid-template-rows: 1fr;
}

.table-header-row-parent .header-cell-group > div {
  min-height: 0;
  height: 18px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-status-table tbody th {
  color: #12233d;
  font-weight: 600;
  text-align: center;
}

.rank-status-table th:first-child,
.rank-status-table td:first-child {
  width: 96px;
}

.rank-status-table th:last-child,
.rank-status-table td:last-child {
  border-right: none;
}

.rank-status-table tbody tr:last-child th,
.rank-status-table tbody tr:last-child td {
  border-bottom: none;
}

.rank-status-table .total-row th,
.rank-status-table .total-row td {
  background: rgba(231, 242, 255, 0.9);
  font-weight: 800;
}

.rank-status-table .total-row th {
  font-style: italic;
}

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

.team-tree-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0 ;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: radial-gradient(#d0dfd8 1px, transparent 1px);
  background-size: 32px 32px;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.team-tree-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* 루트 노드 */
.tree-badge {
  background: #064b36;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.tree-root-vline {
  width: 2px;
  height: 12px;
  background: rgba(6, 75, 54, 0.5);
}

/* 팀장 행 */
.tree-leaders-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
  width: 100%;
  margin-top: 16px;
}
.tree-leader-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1.5px solid #c8dfd5;
  border-radius: 18px;
  padding: 16px 32px;
  min-width: 320px;
  box-shadow: 0 6px 20px rgba(6, 75, 54, 0.12);
  transition: all 0.15s;
  position: relative;
}
.tree-leader-card:hover {
  box-shadow: 0 10px 30px rgba(6, 75, 54, 0.16);
  transform: translateY(-2px);
  z-index: 100;
}
.leader-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #064b36, #0a7a57);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 75, 54, 0.25);
  overflow: hidden;
}
.leader-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leader-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}
.show-all-tooltips .leader-name-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.leader-name {
  font-size: 22px;
  font-weight: 800;
  color: #111;
}
.leader-name-row .member-rank,
.leader-name-row .member-role {
  font-size: 16px;
  color: #2f5e44;
  font-weight: 500;
}

/* 셀 수평 레이아웃 */
.tree-cells-row {
  display: flex;
  width: 100%;
  justify-content: center;
  position: relative;
  gap: 0;
}
.tree-cells-row::before {
  display: none;
} /* 기존 하드코딩 라인 제거 */
.tree-cell-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  padding: 0 8px;
  position: relative;
}
.tree-cell-col::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(6, 75, 54, 0.5);
}
.tree-cell-col:first-child::after {
  left: 50%;
}
.tree-cell-col:last-child::after {
  right: 50%;
}
/* 단일 셀일 경우 선 제거 */
.tree-cell-col:first-child:last-child::after {
  display: none;
}

.tree-cell-col::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 16px;
  background: rgba(6, 75, 54, 0.5);
  transform: translateX(-50%);
}
.tree-cell-hline-wrap {
  height: 16px;
}

/* 셀 카드 */
.tree-cell-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e0ece7;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #064b36;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.tree-cell-card.static {
  cursor: default;
  background: #f4f8f6;
  border: 1px solid #d0dfd8;
  color: #555;
  box-shadow: none;
}
.tree-cell-card.static:hover {
  background: #f4f8f6;
  box-shadow: none;
}
.tree-cell-card.static .tree-badge {
  background: #24694a;
}
.tree-cell-name {
  flex: 1;
  text-align: left;
}

/* 멤버 리스트 */
.tree-members-list {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.tree-member-card {
  display: grid;
  grid-template-areas: "avatar info" "tasks tasks";
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e9ede9;
  border-radius: 14px;
  padding: 4px 24px 12px;
  margin-left: 0;
  transition: all 0.14s;
  min-width: 280px;
  position: relative;
  z-index: 1;
}
.tree-member-card:hover {
  background: linear-gradient(180deg, #e7f1ed 0%, #ffffff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 100;
  border: 1px solid #064b365d;
}
.member-avatar {
  grid-area: avatar;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #064b36;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  margin-top: 8px;
}
.member-info-wrap {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* 카드 내 미니 업무 리스트 */

@keyframes memberTaskFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.member-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.show-all-tooltips .member-name-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.member-name {
  font-size: 19px;
  font-weight: 700;
  color: #111;
}
.member-rank,
.member-role {
  font-size: 14px;
  color: #2f5e44;
  font-weight: 500;
}
/* 접힘: 직급 · 역할 / 펼침: 세로 분리라 구분점 숨김 */
.member-name-row .member-rank + .member-role::before,
.leader-name-row .member-rank + .member-role::before {
  content: "·";
  margin: 0 6px 0 0;
}
.show-all-tooltips .member-name-row .member-rank + .member-role::before,
.show-all-tooltips .leader-name-row .member-rank + .member-role::before {
  content: none;
  margin: 0;
}
.member-contact {
  font-size: 14px;
  color: #666;
  margin-top: 1px;
}

/* 인원 카드 툴팁 */
.tree-leader-card,
.tree-member-card {
  position: relative;
}

.member-tooltip {
  position: absolute;
  left: 95%;
  top: 12px;
  transform: none;
  width: 300px;
  background: rgba(6, 75, 54, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 0 16px 16px 32px;
  padding: 8px 12px 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: #fff;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.tree-leader-card:hover .member-tooltip,
.tree-member-card:hover .member-tooltip {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.tooltip-header {
  font-size: 15px;
  font-weight: 800;
  color: #a8dec0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

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

.tooltip-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

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

.tooltip-name {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.dashboard {
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
  width: 100%;
  background: var(--bg-beige);
}

.top-card-wrapper {
  width: 100%;
  background: linear-gradient(180deg, #d5dfdb 0%, #ffffff 20%);
  border-top: 1.5px solid rgba(255, 255, 255, 1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.top-card {
  width: 100%;
  height: auto;
  min-height: 125px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 12px;
  align-items: center;
  padding: 16px var(--panel-pad-x);
  overflow: visible;
}

.top-left {
  display: contents;
}

.top-left > div:first-child {
  width: 100%;
  min-width: 0;
  padding-inline: var(--top-cell-pad-x);
  padding-left: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.top-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.top-title small {
  font-size: 13px;
  color: #777;
}

.progress-track {
  width: 100%;
  max-width: 400px;
  height: 28px;
  border-radius: 50px;
  background: #d9dedb;
  overflow: hidden;
  margin-top: auto;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #064b36, #14a873);
  border-radius: 50px;
  transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: bar-shine 2s infinite linear;
}

@keyframes bar-shine {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.progress-bottom {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: auto;
  line-height: 1;
}

.percent {
  font-size: 20px;
  font-weight: 900;
}

.percent span {
  font-size: 14px;
}

.count {
  font-size: 20px;
  font-weight: 400;
}

.count-num {
  font-weight: 900;
}

.issue-lines {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  padding: 0 var(--top-cell-pad-x);
  align-self: stretch;
  min-width: 0;
  position: relative;
  z-index: 10;
  background: transparent;
}

.issue-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: auto;
  padding: 0;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color 0.2s ease;
  font-size: 15px;
}

.issue-title-row:hover {
  color: #ff3b30; /* 텍스트 색상만 변경 */
}

.issue-title-row.active {
  color: #ff3b30;
}

.issue-title {
  width: auto;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.issue-visible-items {
  width: 100%;
}

.issue-list {
  position: absolute;
  top: 28px;
  left: 0;
  width: 100%;
  min-width: 400px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 100;
  padding: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.issue-list.open {
  max-height: 80vh;
  opacity: 1;
  padding: 8px;
  overflow-y: auto;
}

.issue-list .issue-row {
  border-bottom: 1px solid #f0f0f0;
  padding: 6px 0;
}

.issue-list .issue-row:last-child {
  border-bottom: none;
}

.status-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  border-radius: 3px;
  color: #888;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.status-toggle-btn.open {
  transform: rotate(180deg);
}

.issue {
  color: inherit;
  font-weight: 900;
}

.issue-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; /* 12px 폰트를 담기 위해 약간 키움 */
  height: 16px;
  border-radius: 50%;
  background: #ff3b30;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 16px;
  vertical-align: middle;
}

/* 프로젝트 카드 내 이슈 아이콘 별도 조정 */
.task-issue-text .issue-icon {
  width: 12px;
  height: 12px;
  font-size: 9px;
  margin-right: 0;
  flex: 0 0 12px;
  margin-top: 4px
}

.issue-row {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 24px;
  min-width: 0;
}

.issue-item-new {
  display: flex;
  flex-direction: column;
  gap: 0px;
  padding: 2px 0 4px 0;
  min-width: 0;
  flex: 1;
}

.issue-detail {
  font-weight: 800;
  font-size: 14px;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  max-width: 100%;
}

.issue-project-name {
  font-size: 12px;
  color: #8a8a8a;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-toggle-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.toggle-arrow {
  width: 12px;
  height: 12px;
  display: block;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.status-toggle-btn.open .toggle-arrow {
  transform: rotate(180deg);
}

.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 통합된 요약 리스트 아이템 스타일 (이슈, 지연, 임박) */
.issue-row.clickable {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: 10px;
  margin: 1px 0;
}

.issue-row.clickable:hover {
  background: rgba(6, 75, 54, 0.04);
  color: #064b36;
  border-left-color: rgba(6, 75, 54, 0.3);
}

.issue-row.clickable.active {
  background: rgba(6, 75, 54, 0.08);
  color: #064b36;
  font-weight: 800;
  border-left-color: #064b36;
}

.delay {
  color: var(--red);
}

.tooltip-title {
  font-size: 17px;
  font-weight: 850;
  color: #168044;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
}

.board-title {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 22px;
  font-weight: 600;
}

.board-summary-stats {
  display: flex;
  align-items: center;
  gap: 4px;
}

.summary-stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 20px;
  font-weight: 700;
  color: #000;
}

.summary-stat-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.summary-stat-btn.active {
  color: #ff3b30;
}

.summary-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.summary-icon.issue {
  background-color: #ff3b30;
}
.summary-icon.delay {
  background-color: #ff6830;
}
.summary-icon.upcoming {
  background-color: #ffd500;
}

.summary-stat-btn .count {
  font-weight: 900;
  margin-left: 0px;
}

.board-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #7d8983;
  font-size: 14px;
  font-weight: 800;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f8f9fa; /* Consistent button background */
  color: #666;
  gap: 8px;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.filter-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #333333;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-btn:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.08);
}

.filter-btn.active {
  font-weight: 700;
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-btn.active .filter-bullet {
  transform: scale(1.3);
  box-shadow: 0 0 2px currentColor;
  border: 1px solid #ffffff8c;
}


/* ── Date Range Filter Popover (.drf-*) ── */
.drf-popover {
  --drf-accent: #168044;
  --drf-accent-dark: #1a6e4c;
  /* 옅은 초록 표면 — 호버(버튼)와 선택 채움(날짜 칸·주차 행)에 공통으로 쓴다.
     둘을 미세하게 다른 값으로 두면 구분 정보를 주지 못하고 정리 안 된 인상만 남는다. */
  --drf-accent-soft: rgba(22, 128, 68, 0.12);
  --drf-accent-muted: rgba(22, 128, 68, 0.16);
  --drf-accent-preview: rgba(22, 128, 68, 0.52);
  --drf-brown-soft: rgba(104, 78, 66, 0.1);
  --drf-grid-line: #e6e6e6;
  /* 분기 탭·주간 격자 바깥 테두리 (box-sizing:border-box 라 안쪽에 그려진다) */
  --drf-box-border: rgba(0, 0, 0, 0.1);
  --drf-today-bg: #ffdc9a;
  /* 주차·분기명은 강조, 요일(월~금)·분기 기간은 보조 톤 */
  --drf-text-strong: #000;
  --drf-text-sub: #555;
  /* 참고 시안 실측 타이포 (팝오버 540px 기준)
     base = 일자 24/500, emphasis = 월 표시 26/700, guide = 주차·요일·푸터 18/500 */
  --drf-fs-base: 24px;
  --drf-fs-emphasis: 26px;
  --drf-fs-guide: 18px;

  position: fixed;
  z-index: 10000;
  background: #FAFAFA;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 48px -16px rgba(62, 51, 44, 0.28), 0 2px 8px rgba(62, 51, 44, 0.06);
  border: 1px solid var(--border-light);
  animation: drf-in 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
  font-family: inherit;
  font-size: var(--drf-fs-base);
  color: var(--text-main);
}

@keyframes drf-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.drf-quarter-tabs {
  display: flex;
  border: 1px solid var(--drf-box-border);
  border-radius: 8px;
  margin-bottom: 24px;
}

.drf-quarter-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 2px;
  border: none;
  border-radius: 0;
  background: var(--card-white);
  color: var(--brown-main);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

/* 칸 사이는 1px 실선으로 나눈다. 활성 칸은 초록 테두리를 덮어 그리므로 양옆 구분선을 감춘다 */
.drf-quarter-tab + .drf-quarter-tab::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--drf-grid-line);
}

.drf-quarter-tab.active::before,
.drf-quarter-tab.active + .drf-quarter-tab::before {
  background: transparent;
}

/* 연속 선택된 두 분기 사이는 세그먼트 컨트롤처럼 구분선을 남긴다 (색은 미선택 구분선과 동일) */
.drf-quarter-tab.active + .drf-quarter-tab.active::before {
  background: var(--drf-grid-line);
}

/* 컨테이너 테두리 1px 안쪽에 놓이므로 8px - 1px = 7px이어야 바깥 곡선과 맞물린다 */
.drf-quarter-tab:first-child {
  border-radius: 7px 0 0 7px;
}

.drf-quarter-tab:last-child {
  border-radius: 0 7px 7px 0;
}

.drf-quarter-tab:hover:not(.active) {
  background: var(--drf-accent-soft);
  color: var(--drf-accent-dark);
}

/* 활성 분기는 그룹 위에 얹힌 독립 카드처럼 보이도록 초록 테두리를 4면 모두 두른다.
   box-shadow가 아니라 실제 border를 쓰는 이유: 연속 선택 시 맞닿는 면만 없애야 하기 때문. */
.drf-quarter-tab.active {
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.3) 100%
  ), #45946E;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
  color: #ffffff;
  border: 1px solid #45946E;
  border-radius: 8px;
}

/* 연속 선택 구간은 세그먼트 버튼처럼 이어 붙는다 — 맞닿는 쪽 라운드와 경계선 제거 */
.drf-quarter-tab.active.merge-left {
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.drf-quarter-tab.active.merge-right {
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.drf-quarter-tab.active .drf-quarter-tab-label {
  font-weight: 700;
}

.drf-quarter-tab:focus-visible {
  outline: 2px solid var(--drf-accent-dark);
  outline-offset: -3px;
}

/* 미선택 분기 라벨 — 검정(--drf-text-strong)보다 한 단계 낮춘 #333 */
.drf-quarter-tab-label {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

.drf-quarter-tab-range {
  font-size: 18px;
  color: var(--drf-text-sub);
}

/* 활성 분기는 초록으로 채우므로 라벨·기간을 흰색으로 (자식 색 지정이 부모보다 우선) */
.drf-quarter-tab.active .drf-quarter-tab-label,
.drf-quarter-tab.active .drf-quarter-tab-range {
  color: #ffffff;
}

.drf-quarter-tab:hover:not(.active) .drf-quarter-tab-label,
.drf-quarter-tab:hover:not(.active) .drf-quarter-tab-range {
  color: var(--drf-accent-dark);
}

/* 월 탐색(‹ 제목 ›)은 왼쪽에 묶고, '이번달'은 오른쪽 끝에 둔다 */
/* 참고 시안: `‹ 2026.08 ›` 묶음이 팝오버 가운데, `이번달`만 오른쪽.
   3열 그리드로 양옆 1fr 을 두면 `이번달` 버튼 폭과 무관하게 가운데가 유지된다. */
.drf-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.drf-nav .drf-nav-month {
  grid-column: 2;
  justify-self: center;
}

.drf-nav .drf-this-month-btn {
  grid-column: 3;
  justify-self: end;
}

.drf-nav-month {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ‹ › 글리프는 baseline 기준이라 line-height만으로는 세로 중앙이 어긋난다 → flex로 정렬.
   flex 는 텍스트 박스(em box)를 기준으로 맞추는데, 이 글리프의 실제 잉크는
   x-height 부근에 그려져 박스 중심보다 1.5px 아래에 놓인다(캔버스 실측).
   그만큼 위로 올려 광학적 중앙을 맞춘다. */
.drf-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* box-sizing:border-box 라 아래 여백만큼 콘텐츠 영역이 줄어 중앙이 위로 1.5px 올라간다.
     (전체 높이 32px 는 그대로 유지) */
  padding: 0 0 3px;
  border-radius: 8px;
  border: 1px solid var(--drf-grid-line);
  background: var(--card-white);
  color:var(--drf-text-strong);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

.drf-nav-btn:hover {
  background: var(--drf-accent-soft);
  color: var(--drf-accent-dark);
  border-color: var(--drf-accent-dark);
}

.drf-month-title {
  font-size: var(--drf-fs-emphasis);
  font-weight: 700;
  color: var(--drf-text-strong);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* 높이는 ‹ › 버튼(32px)과 맞춘다. padding 으로 키우면 폰트 크기에 따라 달라지므로
   높이를 직접 지정하고 좌우 여백만 padding 으로 준다. */
.drf-this-month-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1px solid var(--drf-grid-line);
  border-radius: 8px;
  background: var(--card-white);
  color: var(--drf-text-strong);
  font-size: var(--drf-fs-guide);
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.drf-this-month-btn:hover:not(:disabled) {
  background: var(--drf-accent-soft);
  color: var(--drf-accent-dark);
  border-color: var(--drf-accent-dark);
}

/* 이미 현재 월을 보고 있으면 이동할 곳이 없으므로 비활성 */
.drf-this-month-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 날짜 격자와 열을 정확히 맞춘다.
   .drf-weeks 가 좌우 1px 테두리를, .drf-days 가 border-left 1px 을 더 갖는다.
   → 주차 라벨 열은 96px + 그 1px 만큼 넓게 잡아야 7개 날짜 열의 시작점이 일치한다.
   (이 1px 을 빠뜨리면 열마다 약 0.14px 씩 어긋나 오른쪽으로 갈수록 밀린다) */
.drf-weekdays {
  display: grid;
  grid-template-columns: 69px repeat(7, 1fr);
  gap: 0;
  height: 22px;
  overflow: hidden;
  padding: 0 1px;
  margin-bottom: 6px;
}

.drf-weekday-corner {
  min-width: 0;
}

/* 월~금은 보조 톤, 토·일만 아래에서 파랑/빨강으로 덮어쓴다 */
/* 컨테이너(.drf-weekdays) 높이 22px 안에 정확히 맞춘다.
   padding 을 두면 셀이 29px 로 커져 아래가 잘린다(overflow:hidden). */
.drf-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  font-size: var(--drf-fs-guide);
  font-weight: 700;
  line-height: 1;
  /* 월~금 */
  color: #000;
}

/* 토·일은 보조 톤으로 낮춘다 (파랑·빨강 강조는 쓰지 않음) */
.drf-weekday.sat,
.drf-weekday.sun {
  color: var(--drf-text-sub);
}

.drf-weeks {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--drf-box-border);
  border-radius: 8px;
  background: var(--card-white);
}

/* 행에는 보더를 두지 않는다. 가로 구분선과 선택 링을 모두 오버레이로 그려야
   자식(.drf-days 세로선)과 겹치는 지점에서 초록 링이 끊겨 보이지 않는다. */
.drf-week-row {
  position: relative;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0;
  align-items: stretch;
  transition: background 0.12s ease;
}

/* 행 사이 가로 구분선 (레이아웃에 영향 없는 오버레이) */
.drf-week-row + .drf-week-row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--drf-grid-line);
  z-index: 1;
}

.drf-week-row.active {
  background: var(--drf-accent-soft);
  border-radius: 6px;
}

/* 선택 링 — z-index로 자식 보더·구분선보다 위에 얹어 끊김 없이 한 줄로 이어지게 한다 */
.drf-week-row.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid #168044;
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
}

/* 연속 선택 구간은 위/아래로 이어 붙는다 — 맞닿는 쪽 라운드와 링만 제거하고,
   그 자리에는 위의 회색 가로 구분선이 그대로 남아 세그먼트처럼 보인다. */
.drf-week-row.active.merge-top,
.drf-week-row.active.merge-top::after {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.drf-week-row.active.merge-top::after {
  border-top: none;
}

.drf-week-row.active.merge-bottom,
.drf-week-row.active.merge-bottom::after {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.drf-week-row.active.merge-bottom::after {
  border-bottom: none;
}

.drf-week-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: none;
  background: transparent;
  font-size: var(--drf-fs-guide);
  font-weight: 500;
  color: var(--drf-text-strong);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  font-family: inherit;
  white-space: nowrap;
  text-align: left;
}

/* 앞뒤 달에 귀속된 주차는 글자만 흐리게 한다 (선택하면 다시 또렷해짐).
   주차열 구분선은 .drf-days가 그리므로 이 opacity에 영향받지 않는다. */
.drf-week-label.other-month:not(.active) {
  opacity: 0.35;
}

/* 호버 표현은 상단 분기탭(.drf-quarter-tab:hover:not(.active))과 동일하게 맞춘다.
   선택 상태를 제외하는 이유: 라벨 배경이 행의 inset 링 위에 덮여 테두리가 끊겨 보인다. */
.drf-week-label:hover:not(.active) {
  background: var(--drf-accent-soft);
  color: var(--drf-accent-dark);
  opacity: 1;
}

/* 선택된 주차 라벨은 분기 탭과 같이 초록으로 채운다 */
.drf-week-label.active {
  background: linear-gradient(
  180deg,
  rgba(0, 0, 0, 0) 50%,
  rgba(0, 0, 0, 0.3) 100%
), #45946E;
  color: #ffffff;
  font-weight: 700;
  border-radius: 6px 0 0 6px;
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
}

.drf-week-row.active.merge-top .drf-week-label.active {
  border-top-left-radius: 0;
}

.drf-week-row.active.merge-bottom .drf-week-label.active {
  border-bottom-left-radius: 0;
}

/* 주차 라벨열과의 구분선. 라벨이 아니라 여기에 둬야 라벨을 흐리게 해도 선은 또렷하다 */
.drf-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border-left: 1px solid var(--drf-grid-line);
}

/* 팝오버 540px 기준 시안 실측: 칸 높이 48px, 그 안의 원형 마커 40px */
.drf-cell-wrap {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 선택 분기에 걸친 날짜 칸은 칸 전체를 옅은 초록으로 채운다 */
.drf-cell-wrap.in-quarter {
  background: var(--drf-accent-soft);
}

.drf-range-bg {
  position: absolute;
  inset: 0;
  background: var(--drf-accent-muted);
  z-index: 0;
  border-radius: 0;
}

.drf-range-bg.preview {
  opacity: 0.5;
}

.drf-range-bg[data-start="true"][data-end="true"] {
  border-radius: 50%;
}

.drf-range-bg[data-start="true"]:not([data-end="true"]) {
  border-radius: 50% 0 0 50%;
}

.drf-range-bg[data-end="true"]:not([data-start="true"]) {
  border-radius: 0 50% 50% 0;
}

/* 칸(.drf-cell-wrap)은 사각형 채움, 버튼은 그 안의 정원(正圓) 마커 역할 */
.drf-day {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  height: 40px;
  border: none;
  background: transparent;
  font-size: var(--drf-fs-base);
  font-weight: 500;
  border-radius: 50%;
  transition: background 0.12s ease, font-size 0.12s ease;
  font-family: inherit;
  color: var(--text-main);
  padding: 0;
}

.drf-day.other-month {
  opacity: 0.35;
}

.drf-day.selected {
  background: var(--drf-accent);
  color: var(--card-white) !important;
  font-size: var(--drf-fs-emphasis);
  font-weight: 700;
}

.drf-day.in-range {
  color: var(--text-main);
}

/* 참고 시안: 주말 날짜는 파랑·빨강 대신 보조 톤으로 낮춘다 */
.drf-day.sun:not(.selected),
.drf-day.sat:not(.selected) {
  color: var(--drf-text-sub);
}

.drf-day.preview-end {
  background: var(--drf-accent-preview);
  color: var(--card-white) !important;
}

/* 오늘은 선택 상태와 무관하게 항상 알아볼 수 있도록 앰버 원형 마커로 표시 */
.drf-day.today:not(.selected) {
  background: var(--drf-today-bg);
  color: var(--brown-dark) !important;
  font-weight: 800;
}

.drf-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}

/* 캘린더 상세로 넘어가는 링크형 버튼 (테두리 없음) */
.drf-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--drf-text-strong);
  font-size: var(--drf-fs-guide);
  font-weight: 500;
  cursor: pointer;
  padding: 0px 2px;
  font-family: inherit;
  transition: color 0.15s ease;
}

.drf-footer-link:hover {
  color: var(--drf-accent-dark);
}
