/* ════════════════════════════════════════════════════
   제품 어드민(prd) 전용 최소 보완 스타일
   원칙: 대시보드 common.css의 실제 컴포넌트(.shell/.sidebar/.sb-item/.btn/
   .modal-overlay/.modal-card/table.grid/.field/.table-card/.section-title-row/
   .ua-chip/.table-chip 등)를 그대로 재사용한다. 여기서는 common.css에 없는
   prd 고유 배치·여백만 최소로 보완한다(새 디자인 언어 금지 — 토큰은 전부
   common.css :root 변수를 그대로 쓴다).
   ════════════════════════════════════════════════════ */

/* ── 사이드바 하단 — 로그인 사용자 이메일 + 로그아웃 (구조는 .sidebar 그대로, 푸터 블록만 추가) ── */
.pd-sb-foot {
  flex: 0 0 auto;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-sb-foot .user-email { max-width: none; }

/* "+ 업체 추가" 버튼 — 사이드바 nav 안에서 풀폭(.btn/.btn-primary 그대로, 폭만 보완) */
.pd-add-vendor { width: 100%; margin: 2px 0 8px; }

/* 업체 목록 래퍼 — .sb-nav의 flex gap은 직계 자식에만 적용되므로, #vendorNavList 안에서도
   .sb-item 간 동일한 세로 간격(2px)을 유지하기 위해 보완 */
#vendorNavList { display: flex; flex-direction: column; gap: 2px; }

/* 업체 사이드바 항목 우측 상태칩 — 색은 .ua-chip 그대로, 위치만 sb-item 우측 정렬 */
.sb-item .pd-vendor-chip { margin-left: auto; flex: 0 0 auto; }

/* 카드 본문 패딩 — .table-card는 표(.table-scroll)를 전제라 자체 패딩이 없다.
   폼/텍스트 콘텐츠(기본정보·소통기록)를 담을 때만 패딩 보완 */
.pd-card-body { padding: 18px 20px; }

/* 기본정보 표시 그리드 — .field(라벨 스타일)는 그대로 재사용, 값 표시용 div만 추가 */
.pd-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.pd-info-grid .field { margin-bottom: 0; }
.pd-info-grid .field > div { font-size: 14px; color: var(--text); line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.pd-info-grid .pd-span2 { grid-column: 1 / -1; }

/* 통합 리스트(일정+소통기록) — 컴팩트 한 줄 리스트 + 클릭 드릴다운(아코디언). 기본은 행 하나
   (카테고리 배지·날짜·채널/유형·본문 미리보기)만 보이고, 클릭하면 그 아래로 전체 내용이
   펼쳐진다(여러 행 독립 토글). 달력 아래 항상 붙어 있어 위 캘린더 카드와 살짝 간격을 둔다. */
.pd-unified-list-wrap { margin-top: 14px; }
.pd-log-list { display: flex; flex-direction: column; }
.pd-log-item { border-bottom: 1px solid var(--line); }
.pd-log-item:last-child { border-bottom: none; }
.pd-log-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 6px; border-radius: var(--radius-md); cursor: pointer;
}
.pd-log-row:hover { background: var(--surface-2); }
.pd-log-row.is-open { background: var(--surface-2); }
/* 일정 행 강조(마감 임박·지난 미완료) — is-open이 뒤에 오므로 펼쳤을 때는 회색이 우선한다. */
.pd-log-row.pd-row-overdue-inline { background: var(--neg-bg); }
.pd-log-row.pd-row-soon-inline { background: var(--sage-tint); }
.pd-log-row.pd-row-overdue-inline:hover, .pd-log-row.pd-row-soon-inline:hover { filter: brightness(0.97); }

/* 카테고리 배지 — 달력 칩과 같은 톤(일정=세이지, 소통기록=파랑)으로 한눈에 구분.
   "일정"(2자)/"소통기록"(4자)로 텍스트 길이가 달라 그 뒤 날짜 열이 행마다 어긋나던 문제 —
   고정폭(flex: 0 0 <폭>)으로 묶어 캐럿 다음 칸이 모든 행에서 같은 x에서 시작하게 한다. */
.pd-entry-badge {
  flex: 0 0 60px; box-sizing: border-box; text-align: center;
  font-size: 10.5px; font-weight: 700; line-height: 1.6;
  padding: 1px 8px; border-radius: var(--radius-pill); letter-spacing: .01em;
}
.pd-entry-badge.is-sched { background: var(--sage-tint); color: var(--brand-ink); }
.pd-entry-badge.is-log { background: #e9f1fc; color: #255aa8; }

/* 강조 행(마감임박=세이지·지남=핑크)·hover 배경 위에서 태그가 같은 톤에 파묻히는 문제 —
   행 안의 배지/유형칩/상태칩은 흰 바탕 + 글자색 링으로 어떤 행 배경에서도 또렷하게. */
.pd-log-row .pd-entry-badge,
.pd-log-row .table-chip,
.pd-log-row .ua-chip {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px currentColor;
}

/* 배지 다음 유형/채널 칩 칸 — 있든 없든 고정폭 슬롯에 담아, 배지·날짜에 이어 이 칸도 정렬되게 한다
   (긴 값 "연구/개발"까지 잘림 없이 들어가는 폭). 값이 없는 행은 빈 슬롯만 차지. */
.pd-log-type-slot { flex: 0 0 82px; }

/* 업체명(전체 일정 뷰의 통합 리스트에서만 표시) — 고정폭 열(업체명 길이가 달라도 뒤 열 정렬 유지) */
.pd-log-vendor { flex: 0 0 120px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 오른쪽 끝 열(상태 칩·📎 첨부 배지)도 고정 슬롯 — 상태 없는 소통기록·첨부 없는 행도
   빈 슬롯을 차지해 모든 행에서 같은 x에 정렬(들쭉날쭉 해소). */
.pd-log-status-slot { flex: 0 0 56px; display: flex; justify-content: flex-end; }
.pd-log-attach-slot { flex: 0 0 44px; display: flex; justify-content: flex-end; }
/* 드릴다운 쉐브론 — 대시보드 셰브론 SVG(finance .exp) 이식. 기본 오른쪽(›), 펼침 시 rotate90(⌄). */
.pd-log-caret {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--muted);
  transition: transform .16s ease, color .16s ease;
}
.pd-log-caret svg {
  width: 14px; height: 14px; display: block; stroke: currentColor; fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.pd-log-row.is-open .pd-log-caret { transform: rotate(90deg); color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .pd-log-caret { transition: none; } }
.pd-log-date { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--text); }
.pd-log-preview {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pd-log-attach-badge { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); }
.pd-log-detail { padding: 4px 6px 16px 26px; }
.pd-log-body { font-size: 13.5px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin: 0 0 8px; }
.pd-log-meta { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0 0 2px; }
.pd-log-meta strong { color: var(--text-2); font-weight: 600; }
.pd-log-detail-actions { display: flex; gap: 6px; margin-top: 12px; }

/* 표/카드 행 액션(수정·삭제·완료) — .btn.btn-ghost 그대로, 크기만 축소 */
.btn.pd-btn-sm { padding: 4px 11px; font-size: 12px; }
.pd-td-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 업체명 클릭 이동(전체 일정 뷰) */
.pd-vendor-link { color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: none; }
.pd-vendor-link:hover { text-decoration: underline; }

/* 빈 상태 */
.pd-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* "+ 추가" → 카테고리 선택(일정/소통기록) — 모달 첫 화면의 큰 버튼 두 개 */
.pd-entry-choice { display: flex; gap: 12px; padding: 4px 0 10px; }
.pd-entry-choice-btn {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: background .12s ease, border-color .12s ease;
}
.pd-entry-choice-btn:hover { background: var(--surface-2); border-color: var(--brand); }
.pd-entry-choice-ico {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-size: 22px; line-height: 1;
}
.pd-entry-choice-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* 폼 textarea/select — .field input은 공용 정의돼 있으나 textarea/select는 없어 동일 톤으로 보완 */
.field textarea {
  width: 100%; min-height: 84px; resize: vertical; font: inherit; font-size: 14px;
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); line-height: 1.5;
}
.field textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }

/* ── 커스텀 셀렉트(.table-target/.ctp-opt 이식) — 모달 폼 필드에서 네이티브 select 자리를 대신한다.
   .table-target-btn은 기본이 inline-flex(내용 폭)이라 폼 필드에선 .pd-cal .cal-trigger와 같은 패턴으로
   버튼을 필드 폭 100%로 늘리고, 팝오버도 우측정렬 대신 버튼과 같은 좌측 기준 전체폭으로 편다
   (헤더 툴바용 우측정렬 원본과 달리 폼 안에서는 네이티브 select처럼 보여야 자연스럽다). */
.pd-cs { width: 100%; }
.pd-cs .table-target-btn { width: 100%; box-sizing: border-box; justify-content: space-between; }
.pd-cs .table-target-pop { left: 0; right: auto; min-width: 100%; width: 100%; max-width: none; }
/* z-index는 common.css 기본값 그대로 둔다 — .table-target-pop(60)은 .modal-overlay(120)가 이미
   새 스태킹 컨텍스트를 열어줘 모달 안에서는 자동으로 그 위(모달 자체가 120이므로)에 뜨고,
   폰 전용 하단시트 모드(<640px)는 common.css가 130으로 올려 Cally .cal-pop(130)과 같은 급으로 맞춘다. */

/* 모달 폼 2열 배치(날짜+유형/담당자+연락처 등) */
.pd-form-row { display: flex; gap: 10px; }
.pd-form-row .field { flex: 1 1 0; min-width: 0; }

@media (max-width: 639px) {
  .pd-info-grid { grid-template-columns: 1fr; }
  .pd-form-row { flex-direction: column; gap: 0; }
}

/* ── 날짜 필드: Cally 단일 날짜 캘린더(대시보드 비용관리 costDate와 동일 패턴) ──
   값 보관용 네이티브 input[type=date](.pd-date-native)는 정상 시 숨기고 트리거(.cal-trigger)가
   표시를 담당. Cally 로드 실패(.no-cally) 시에만 네이티브 input을 노출하는 최후 폴백. */
.pd-cal { position: relative; display: inline-flex; width: 100%; min-width: 0; }
.pd-cal .cal-trigger { width: 100%; box-sizing: border-box; justify-content: space-between; }
.pd-date-native { display: none; }
.no-cally .pd-date-native { display: block; }
.no-cally .pd-cal { display: none; }

/* ════════════════════════════════════════════════════
   Claude 보조 — 우측 하단 플로팅 미니 대화창
   토큰은 common.css :root 변수 그대로 재사용(색·라운드·그림자 새로 정의하지 않음).
   z-index 115 — .toast(100/110)보다 위, .modal-overlay(120)·.cal-pop(130)보다는 아래.
   ════════════════════════════════════════════════════ */
.pd-chat-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 115;
  width: 52px; height: 52px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border: none; cursor: pointer;
  box-shadow: var(--shadow-badge);
  transition: background .15s ease, transform .15s ease;
}
.pd-chat-launcher:hover { background: var(--brand-2); transform: translateY(-1px); }
.pd-chat-launcher svg { width: 24px; height: 24px; }

.pd-chat-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 115;
  width: 360px; height: 520px; max-height: calc(100vh - 116px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(10px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.pd-chat-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }

.pd-chat-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.pd-chat-title { font-size: 14px; font-weight: 700; color: var(--text); }
.pd-chat-x {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border: none; background: transparent; color: var(--muted); cursor: pointer; border-radius: var(--radius-sm);
}
.pd-chat-x:hover { background: var(--surface-2); color: var(--text); }
.pd-chat-x svg { width: 16px; height: 16px; }

.pd-chat-messages { flex: 1 1 auto; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.pd-chat-empty { padding: 24px 8px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.pd-chat-row { display: flex; }
.pd-chat-row.is-user { justify-content: flex-end; }
.pd-chat-row.is-bot { flex-direction: column; align-items: flex-start; }

.pd-chat-bubble { max-width: 84%; padding: 9px 12px; border-radius: var(--radius-md); font-size: 13px; line-height: 1.55; word-break: break-word; }
.pd-chat-bubble.is-user { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.pd-chat-bubble.is-bot { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.pd-chat-bubble.is-error { background: var(--neg-bg); border-color: var(--neg); color: var(--neg-strong); }

.pd-chat-tool-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.pd-typing-dots { display: inline-flex; gap: 3px; align-items: center; height: 14px; }
.pd-typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); display: inline-block; animation: pdTypingBounce 1.1s infinite ease-in-out; }
.pd-typing-dots i:nth-child(2) { animation-delay: .15s; }
.pd-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pdTypingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

.pd-chat-inputbar { flex: 0 0 auto; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.pd-chat-input {
  flex: 1 1 auto; resize: none; max-height: 100px; min-height: 36px; font: inherit; font-size: 13px;
  padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text); line-height: 1.4;
}
.pd-chat-input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.pd-chat-send { flex: 0 0 auto; width: auto; padding: 8px 14px; font-size: 12.5px; min-height: 36px; }

/* 입력대행 draft 미리보기 카드 — [저장] 클릭 전까지 DB에 아무 것도 쓰지 않는다 */
.pd-draft-card {
  margin-top: 6px; width: 100%; max-width: 84%;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--sage-tint); padding: 10px 12px;
}
.pd-draft-head { font-size: 12px; font-weight: 700; color: var(--brand-ink); margin-bottom: 6px; }
.pd-draft-row { display: flex; gap: 8px; font-size: 12px; padding: 2px 0; line-height: 1.5; }
.pd-draft-k { flex: 0 0 64px; color: var(--muted); }
.pd-draft-v { flex: 1 1 auto; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.pd-draft-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.pd-draft-actions .btn { width: auto; }
.pd-draft-saved { font-size: 12px; font-weight: 700; color: var(--pos); }

@media (max-width: 639px) {
  .pd-chat-panel { right: 10px; left: 10px; bottom: 78px; width: auto; height: calc(100vh - 96px); max-height: none; }
  .pd-chat-launcher { right: 16px; bottom: 16px; }
}

/* ════════════════════════════════════════════════════
   월 달력(month grid) — 전체 일정 기본 뷰 + 업체 상세 일정 섹션 공용.
   대시보드에 원본 컴포넌트가 없어 새로 그리되, 색·라운드·칩·버튼 토큰은
   common.css :root 변수를 그대로 쓴다(새 팔레트 도입 금지).
   ════════════════════════════════════════════════════ */

/* 달력 카드 여백 — .table-card는 표 전제라 자체 패딩이 없으므로 보완 */
.pd-cal-card { padding: 14px 14px 18px; }

/* 상단: ‹ 오늘 › + "YYYY년 M월" 제목 */
.pd-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pd-cal-nav { display: flex; align-items: center; gap: 6px; order: 2; }
.pd-cal-nav .btn { width: auto; padding: 4px 10px; }
.pd-cal-title { order: 1; margin: 0; font-size: 16px; font-weight: 800; color: var(--text); }

/* 범례 — "● 일정 / 💬 소통기록 / ● 공휴일". flex-basis:100%로 강제 줄바꿈시켜 제목 줄 아래 별도 줄에 놓는다. */
.pd-cal-legend { order: 3; flex: 1 0 100%; display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--muted); }
.pd-cal-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.pd-cal-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; font-style: normal; }
.pd-cal-legend-dot.is-sched { background: var(--sage-tint-2); }
.pd-cal-legend-dot.is-hol { background: var(--neg); }
/* 범례의 소통기록 아이콘도 이모지가 아니라 ICON_CHAT SVG — 점(●) 대신 작은 말풍선 라인 아이콘. */
.pd-cal-legend-dot.is-log {
  width: 11px; height: 11px; border-radius: 0; background: none;
  display: inline-flex; align-items: center; justify-content: center; color: #2f6fd6;
}
.pd-cal-legend-dot.is-log svg {
  width: 100%; height: 100%; display: block;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}

/* 그리드 — 7열, gap을 얇은 보더처럼 사용(칸 사이에 var(--line) 선이 보이게) */
.pd-cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden;
}
.pd-cal-dow {
  background: var(--surface-2); text-align: center; padding: 8px 4px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.pd-cal-dow.is-sun { color: var(--neg-strong); }
.pd-cal-dow.is-sat { color: #2f6fd6; }   /* 토요일 파랑(한국 달력 관례) — 디자인 시스템에 파랑 토큰이 없어 직접 지정 */

.pd-cal-cell {
  background: var(--surface); min-height: 96px; padding: 6px 5px;
  display: flex; flex-direction: column; gap: 3px; cursor: pointer;
  transition: background .12s ease;
}
.pd-cal-cell:hover { background: var(--surface-3); }
.pd-cal-cell.is-other { background: var(--surface-2); }
.pd-cal-cell.is-other .pd-cal-daynum { color: var(--muted); }
.pd-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
/* 공휴일 셀 — 아주 옅은 빨강 톤으로 살짝 강조(과하지 않게). is-today가 함께 있으면 링이 우선 보임 */
.pd-cal-cell.is-holiday { background: var(--neg-bg); }
.pd-cal-cell.is-holiday:hover { filter: brightness(0.98); }
.pd-cal-cell.is-holiday.is-other { background: var(--surface-2); }

.pd-cal-daynum {
  font-size: 12px; font-weight: 700; color: var(--text); flex: 0 0 auto;
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
}
.pd-cal-cell.is-sun .pd-cal-daynum { color: var(--neg-strong); }
.pd-cal-cell.is-sat .pd-cal-daynum { color: #2f6fd6; }   /* 토요일 파랑 */
.pd-cal-cell.is-holiday .pd-cal-daynum { color: var(--neg-strong); }
.pd-cal-cell.is-today .pd-cal-daynum {
  background: var(--brand); color: #fff; border-radius: var(--radius-pill);
}

/* 공휴일 라벨 — 날짜 숫자 바로 아래, 일정 칩과는 분리된 얇은 줄(국기/국가로 KR·CN 구분).
   같은 날 KR+CN이면 항목마다 줄바꿈(세로 스택)되어 "🇰🇷설날 / 🇨🇳春节"처럼 두 줄로 보인다. */
.pd-cal-hol-label {
  display: flex; flex-direction: column; gap: 0; flex: 0 0 auto;
  font-size: 10.5px; line-height: 1.35; font-weight: 700; color: var(--neg-strong);
}
.pd-cal-hol-item {
  display: flex; align-items: baseline; gap: 2px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.pd-cal-hol-name { overflow: hidden; text-overflow: ellipsis; }
.pd-cal-hol-item.is-kr { color: var(--neg); }
/* 중국 공휴일(공장 휴무) — 한국보다 진한 톤 + 굵게로 특히 눈에 띄게 */
.pd-cal-hol-item.is-cn { color: var(--neg-strong); font-weight: 800; }

.pd-cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pd-cal-chip {
  font-size: 11px; line-height: 1.5; padding: 2px 6px; border-radius: var(--radius-sm);
  background: var(--sage-tint); color: var(--brand-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.pd-cal-chip:hover { filter: brightness(0.96); }
.pd-cal-chip.is-planned { background: var(--sage-tint); color: var(--brand-ink); }
.pd-cal-chip.is-soon { background: var(--sage-tint-2); color: var(--brand-ink); font-weight: 700; }
.pd-cal-chip.is-overdue { background: var(--neg-bg); color: var(--neg-strong); font-weight: 700; }
.pd-cal-chip.is-done { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }

/* 소통기록 칩 — 일정(세이지)·완료(회색)·공휴일(빨강)과 확실히 구분되는 파랑 계열(토요일 파랑 #2f6fd6과 동일 계열)
   + 왼쪽 세로 바 + 말풍선 SVG 아이콘(ICON_CHAT, calLogChipHtml). 회색은 일정 완료칩과 겹쳐서 파랑으로 분리. */
.pd-cal-chip.pd-cal-chip-log {
  background: #e9f1fc; color: #255aa8; font-weight: 500;
  border-left: 2px solid #2f6fd6; text-decoration: none;
}
.pd-cal-chip.pd-cal-chip-log:hover { filter: none; background: #dbe8fa; }
/* 칩 안 아이콘 — 이모지 대신 라인 SVG. 색은 상속(파랑 #255aa8), 텍스트 높이에 맞춰 작게(12px). */
.pd-cal-chip-ico { display: inline-flex; vertical-align: -2px; margin-right: 3px; }
.pd-cal-chip-ico svg {
  width: 12px; height: 12px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

.pd-cal-more { font-size: 10.5px; color: var(--muted); padding: 1px 6px; cursor: pointer; }
.pd-cal-more:hover { color: var(--text-2); text-decoration: underline; }

@media (max-width: 639px) {
  .pd-cal-card { padding: 10px 8px 14px; }
  .pd-cal-title { font-size: 14px; }
  .pd-cal-cell { min-height: 64px; padding: 4px 3px; gap: 2px; }
  .pd-cal-daynum { font-size: 11px; width: 18px; height: 18px; }
  .pd-cal-dow { font-size: 11px; padding: 6px 2px; }
  .pd-cal-chip { font-size: 9.5px; padding: 1px 4px; border-radius: 6px; }
  .pd-cal-more { font-size: 9px; }
  .pd-cal-legend { gap: 8px; font-size: 10px; }

  /* 공간 부족 — 공휴일명은 숨기고 국기(국가 구분)만 한 줄로 표시 */
  .pd-cal-hol-label { flex-direction: row; flex-wrap: wrap; gap: 1px; font-size: 10px; }
  .pd-cal-hol-name { display: none; }
  .pd-cal-hol-item { gap: 0; }
}

/* ── 소통기록 첨부 ── */
.pd-attach-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; }
.pd-attach-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.pd-attach-name { font-size: 12.5px; color: var(--text); font-weight: 600; word-break: break-all; }
.pd-attach-size { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; white-space: nowrap; }
.pd-attach-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }

/* 첨부 업로드 — 버튼 하나만 노출. 클릭하면 숨긴 input[type=file]을 프로그램적으로 열고,
   파일 선택 즉시(change) 자동 업로드된다(별도 "업로드" 클릭 없음). */
.pd-attach-upload { margin-top: 10px; }
.pd-attach-btn[disabled] { opacity: .6; cursor: default; }
