/* =============================================
   Verdi CRM — Report Detail Readability Fix
   ─────────────────────────────────────────────
   🎯 목적: 일일보고서 열람(상세) 페이지의 가독성 확보
   🐛 해결: v4.18 다크 테마(body color: #F3F7FF)가 보고서 상세 카드
            (배경 #fff)의 텍스트까지 흰색으로 만드는 문제 수정
   🎨 원칙: 밝은 배경(.rpt-dt-card 등) 내부는 어두운 텍스트로 강제 지정
            WCAG AA 4.5:1 콘트라스트 확보
   🔁 롤백: index.html에서 이 link 1줄 제거
   ============================================= */

/* ── 보고서 상세 카드 전체 — 어두운 텍스트 강제 ── */
.rpt-dt-card {
  color: #1e293b !important;
  background: #ffffff !important;
}

/* ── 작성자 이름 ── */
.rpt-dt-card .rpt-dt-author-name {
  color: #111827 !important;
}

/* ── 날짜 ── */
.rpt-dt-card .rpt-dt-date {
  color: #475569 !important;
}

/* ── 업무 항목 제목 ── */
.rpt-dt-card .rpt-work-title {
  color: #1e293b !important;
}

/* ── 업무 상세 설명 ── */
.rpt-dt-card .rpt-work-detail {
  color: #374151 !important;
}

/* ── 업무 항목 박스 ── */
.rpt-dt-card .rpt-dt-item {
  background: #fdfdff !important;
  color: #1e293b !important;
}

.rpt-dt-card .rpt-dt-item-main {
  background: #ffffff !important;
  color: #1e293b !important;
}

/* ── 태그 행 (고객/제품) ── */
.rpt-dt-card .rpt-tag-row {
  color: #475569 !important;
}
.rpt-dt-card .rpt-customer-tag {
  color: #1e40af !important;
}
.rpt-dt-card .rpt-customer-tag.tag-internal {
  color: #6b7280 !important;
}
.rpt-dt-card .rpt-product-tag {
  color: #7c3aed !important;
}

/* ── 시간 배지 ── */
.rpt-dt-card .rpt-duration-badge {
  color: #1e293b !important;
}

/* ── 섹션 라벨 (내일 계획, 보충설명, 코멘트 등) ── */
.rpt-dt-card .rpt-section-label {
  color: #475569 !important;
}
.rpt-dt-card .rpt-section-label i {
  color: #6366f1 !important;
}

/* ── 내일 계획 ── */
.rpt-dt-card .rpt-tomorrow {
  color: #1e293b !important;
  background: #f0fdf4 !important;
}
.rpt-dt-card .rpt-tomorrow-text {
  color: #1e293b !important;
}

/* ── 항목별 코멘트 영역 ── */
.rpt-dt-card .rpt-wi-cmt-section {
  background: #f8fafc !important;
  color: #1e293b !important;
}
.rpt-dt-card .rpt-wi-cmt-label {
  color: #475569 !important;
}
.rpt-dt-card .rpt-wi-cmt-label i {
  color: #4f46e5 !important;
}

/* ── 코멘트 ── */
.rpt-dt-card .rpt-comment {
  background: #ffffff !important;
  color: #1e293b !important;
}
.rpt-dt-card .rpt-comment-author {
  color: #111827 !important;
}
.rpt-dt-card .rpt-comment-time {
  color: #6b7280 !important;
}
.rpt-dt-card .rpt-comment-text {
  color: #374151 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: pre-wrap !important;
}
.rpt-dt-card .rpt-comment-empty,
.rpt-dt-card .rpt-comment-empty-sm {
  color: #9ca3af !important;
}

/* ── 코멘트 입력 ── */
.rpt-dt-card .rpt-comment-input,
.rpt-dt-card .rpt-wi-cmt-form textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
.rpt-dt-card .rpt-comment-input::placeholder,
.rpt-dt-card .rpt-wi-cmt-form textarea::placeholder {
  color: #94a3b8 !important;
}
.rpt-dt-card .rpt-comment-input:focus,
.rpt-dt-card .rpt-wi-cmt-form textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* ── 코멘트 섹션 (보고서 전체) ── */
.rpt-dt-card .rpt-comments-section {
  background: #fafafa !important;
  color: #1e293b !important;
}

/* ── 보충설명 섹션 ── */
.rpt-dt-card .rpt-supplement-section {
  background: #f0fdf4 !important;
  color: #1e293b !important;
}
.rpt-dt-card .rpt-supplement-item {
  background: #ffffff !important;
  color: #1e293b !important;
}
.rpt-dt-card .rpt-supplement-meta {
  color: #475569 !important;
}
.rpt-dt-card .rpt-supplement-author {
  color: #2d6a4f !important;
}
.rpt-dt-card .rpt-supplement-body {
  color: #374151 !important;
}

/* ── 카드 메타 (시간/항목수 칩) ── */
.rpt-dt-card .rpt-hours-chip,
.rpt-dt-card .rpt-items-chip {
  color: #475569 !important;
}

/* ── 첨부파일 링크 ── */
.rpt-dt-card .rpt-attach-item {
  color: #1e40af !important;
}
.rpt-dt-card .rpt-att-type-badge {
  color: #ffffff !important;
}
.rpt-dt-card .rpt-att-label {
  color: #1e40af !important;
}

/* ── 뒤로가기 버튼 (카드 위 툴바) ── */
.rpt-dt-toolbar .rpt-back-btn {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  backdrop-filter: blur(4px) !important;
  transition: background 0.2s, border-color 0.2s !important;
}
.rpt-dt-toolbar .rpt-back-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

/* ── 헤더 배경 그라데이션 내 텍스트 보정 ── */
.rpt-dt-card .rpt-dt-header {
  background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.05) 100%) !important;
}

/* ── 카드 리스트(갤러리) 보기의 카드들도 동일 수정 ── */
.rpt-card {
  color: #1e293b !important;
  background: #ffffff !important;
}
.rpt-card .rpt-card-header {
  color: #111827 !important;
}
.rpt-card .rpt-card-body {
  color: #374151 !important;
}
.rpt-card .rpt-section-label {
  color: #475569 !important;
}
.rpt-card .rpt-work-item {
  background: #f9fafb !important;
  color: #1e293b !important;
}
.rpt-card .rpt-work-title,
.rpt-card .rpt-work-detail {
  color: #374151 !important;
}
.rpt-card .rpt-tomorrow {
  color: #1e293b !important;
  background: #f0fdf4 !important;
}

/* ── 카드 카운트 배지 ── */
.rpt-cmt-count {
  background: #6366f1 !important;
  color: #ffffff !important;
}

/* ── 빈 상태 안내 메시지 ── */
.rpt-empty {
  color: #6b7280 !important;
}
.rpt-empty i {
  color: #9ca3af !important;
}
.rpt-empty p {
  color: #6b7280 !important;
}

/* ── 탭 바 영역 (보고서 탭 버튼들) ── */
.rpt-tab-bar {
  color: #f3f7ff !important;
}
.rpt-tab-bar .rpt-tab {
  color: rgba(243, 247, 255, 0.7) !important;
}
.rpt-tab-bar .rpt-tab.active {
  color: #ffffff !important;
}

/* ── 갤러리 카드 내부 헤더 ── */
.rpt-card .rpt-card-header {
  background: #fafafa !important;
  color: #1e293b !important;
}
.rpt-card .rpt-author-name {
  color: #111827 !important;
}
.rpt-card .rpt-card-date {
  color: #6b7280 !important;
}
.rpt-card .rpt-card-author {
  color: #111827 !important;
}
.rpt-card .rpt-hours-chip,
.rpt-card .rpt-items-chip {
  color: #475569 !important;
}
.rpt-card .rpt-comment-author {
  color: #111827 !important;
}
.rpt-card .rpt-comment-time {
  color: #6b7280 !important;
}
.rpt-card .rpt-comment-text {
  color: #374151 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: pre-wrap !important;
}
.rpt-card .rpt-comment {
  background: #ffffff !important;
  color: #1e293b !important;
}
.rpt-card .rpt-comment-empty {
  color: #9ca3af !important;
}
.rpt-card .rpt-supplement-section {
  background: #f0fdf4 !important;
  color: #1e293b !important;
}
.rpt-card .rpt-supplement-item {
  background: #ffffff !important;
  color: #1e293b !important;
}
.rpt-card .rpt-supplement-meta {
  color: #475569 !important;
}
.rpt-card .rpt-supplement-body {
  color: #374151 !important;
}
.rpt-card .rpt-comments-section {
  background: #fafafa !important;
  color: #1e293b !important;
}

/* ── 답글 영역 ── */
.rpt-dt-card .rpt-reply,
.rpt-card .rpt-reply {
  color: #1e293b !important;
}
.rpt-dt-card .rpt-reply-meta,
.rpt-card .rpt-reply-meta {
  color: #475569 !important;
}
.rpt-dt-card .rpt-reply-author,
.rpt-card .rpt-reply-author {
  color: #111827 !important;
}
.rpt-dt-card .rpt-reply-body,
.rpt-card .rpt-reply-body {
  color: #374151 !important;
}
.rpt-dt-card .rpt-reply-input,
.rpt-card .rpt-reply-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
.rpt-dt-card .rpt-reply-input::placeholder,
.rpt-card .rpt-reply-input::placeholder {
  color: #94a3b8 !important;
}

/* ── 코멘트 컨텍스트 칩 ── */
.rpt-dt-card .rpt-cmt-context,
.rpt-card .rpt-cmt-context {
  color: #475569 !important;
}
.rpt-dt-card .rpt-cmt-context-title,
.rpt-card .rpt-cmt-context-title {
  color: #1e293b !important;
}

/* ── text-muted 클래스 ── */
.rpt-dt-card .text-muted,
.rpt-card .text-muted {
  color: #9ca3af !important;
}

/* ── v4.21.2: 코멘트 본문 줄바꿈 강제 (긴 문자열 overflow 방지) ── */
.rpt-dt-card .rpt-comment-body,
.rpt-dt-card .rpt-wi-cmt-section .rpt-comment-body,
.rpt-card .rpt-comment-body {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: pre-wrap !important;
  max-width: 100% !important;
}

/* 항목별 코멘트 텍스트 (하위 모든 텍스트 요소에 적용) */
.rpt-wi-cmt-section p,
.rpt-wi-cmt-section span,
.rpt-wi-cmt-section div {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* ── v4.21.1: 그리드 카드 수정 버튼 (다크 테마 호환) ── */
.rpt-mygc-edit-btn {
  color: #ffffff !important;
}
.rpt-mygc-foot {
  color: #1e293b !important;
}
