/* ═════════════════════════════════════════════════════════════════
   RentEasy — 자산 제안서 모듈 / 스타일시트
   proposals.css

   [원칙]
   - 모든 셀렉터는 #page-proposals 또는 .prop- 접두어로 시작
   - 기존 style.css의 CSS 변수(--navy, --accent 등) 재사용
   - 기존 클래스(.btn, .card 등)를 오버라이드하지 않음
   - 인쇄용 스타일은 6단계(proposals-pdf.js)에서 확장
════════════════════════════════════════════════════════════════ */

/* ── 신뢰감 색상 팔레트 (투자 보고서 브랜드) ── */
:root {
  --prop-navy:   #1a2b4a;   /* 메인 네이비 */
  --prop-gold:   #a57c2b;   /* 강조 골드 (수익률 등) */
  --prop-green:  #2d5a3d;   /* 긍정 지표 (ROE, 현금흐름) */
  --prop-line:   #e5e8ef;   /* 보조선 */
  --prop-cream:  #faf7f0;   /* 강조 박스 배경 */
}

/* ──────────────────────────────
   페이지 헤더
────────────────────────────── */
#page-proposals .prop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

#page-proposals .prop-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--prop-navy);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

#page-proposals .prop-desc {
  color: var(--text3);
  font-size: 12.5px;
  font-weight: 300;
}

#page-proposals .prop-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ──────────────────────────────
   중개사무소 미입력 안내 배너
────────────────────────────── */
.prop-broker-alert {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.prop-broker-alert .ba-text {
  color: #78350f;
  font-size: 12.5px;
  line-height: 1.5;
}
.prop-broker-alert .ba-text strong { font-weight: 700; }

/* ──────────────────────────────
   필터 바
────────────────────────────── */
.prop-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.prop-filters .prop-search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: white;
  outline: none;
  transition: border-color .15s;
}
.prop-filters .prop-search:focus {
  border-color: var(--prop-navy);
}
.prop-filters select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: white;
  cursor: pointer;
  min-width: 110px;
}

/* ──────────────────────────────
   제안서 카드 목록
────────────────────────────── */
.prop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.prop-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}
.prop-card:hover {
  border-color: var(--prop-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* 썸네일 영역 */
.prop-card .prop-thumb {
  height: 120px;
  background: linear-gradient(135deg, #e8eef7 0%, #f5f7fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--prop-navy);
  position: relative;
}
.prop-card .prop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 상태 배지 */
.prop-card .prop-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.prop-status.draft    { background: #f1f5f9; color: var(--gray); }
.prop-status.active   { background: var(--green-bg); color: var(--green); }
.prop-status.archived { background: #e2e8f0; color: var(--text3); }

/* 카드 메뉴 버튼 (좌상단 ⋮) */
.prop-card-menu {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 16px;
  color: var(--text3);
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.prop-card-menu:hover {
  background: white;
  color: var(--prop-navy);
}

/* 카드 본문 */
.prop-card .prop-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prop-card .prop-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.prop-card .prop-card-addr {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 카드 하단 숫자 */
.prop-card .prop-card-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--prop-line);
}
.prop-card .prop-num {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prop-card .prop-num-label {
  font-size: 10px;
  color: var(--gray);
  letter-spacing: .02em;
  font-weight: 400;
}
.prop-card .prop-num-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--prop-navy);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prop-card .prop-num-value.accent {
  color: var(--prop-gold);
}

/* ──────────────────────────────
   빈 상태 (제안서 0건)
────────────────────────────── */
.prop-empty {
  background: var(--bg2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 56px 20px;
  text-align: center;
}
.prop-empty .prop-empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: .45;
}
.prop-empty .prop-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}
.prop-empty .prop-empty-desc {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ──────────────────────────────
   플레이스홀더 (5단계 이후 채울 자리)
────────────────────────────── */
.prop-placeholder {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
  line-height: 1.7;
}
.prop-placeholder .ph-badge {
  display: inline-block;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

/* ──────────────────────────────
   반응형
────────────────────────────── */
@media (max-width: 720px) {
  #page-proposals .prop-header {
    flex-direction: column;
    align-items: stretch;
  }
  #page-proposals .prop-actions {
    justify-content: flex-end;
  }
  .prop-filters .prop-search {
    max-width: none;
  }
  .prop-list {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   독립 모달 (기존 #modal-overlay와 분리된 제안서 전용 모달)
══════════════════════════════════════════════════════════ */
.prop-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: propFadeIn .15s ease;
}
.prop-modal-overlay.active { display: flex; }

@keyframes propFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.prop-modal {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
  animation: propSlideUp .18s ease;
}

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

.prop-modal-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--prop-navy);
  flex-shrink: 0;
}

.prop-modal-close {
  background: transparent;
  border: none;
  font-size: 17px;
  color: var(--gray);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
}
.prop-modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

.prop-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

/* ══════════════════════════════════════════════════════════
   제안서 폼 공통 스타일 (pf- = proposal form)
══════════════════════════════════════════════════════════ */
.pf-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--prop-line);
}
.pf-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 12px;
}

.pf-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--prop-navy);
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.pf-section-desc {
  font-size: 11.5px;
  color: var(--text3);
  margin-bottom: 12px;
  line-height: 1.55;
  font-weight: 300;
}

/* 필드 */
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.pf-field label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: -.01em;
}

.pf-field input[type="text"],
.pf-field input[type="email"],
.pf-field input[type="number"],
.pf-field input[type="date"],
.pf-field select,
.pf-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 400;
  background: white;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  color: var(--text);
}

.pf-field input:focus,
.pf-field select:focus,
.pf-field textarea:focus {
  border-color: var(--prop-navy);
  box-shadow: 0 0 0 2px rgba(26, 43, 74, 0.08);
}

.pf-field textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.pf-field input[type="file"] {
  padding: 6px;
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  background: #fafbfc;
}

/* 필수 표시 */
.pf-req {
  color: var(--red);
  font-weight: 700;
  margin-left: 2px;
}

/* 인라인 힌트 (label 옆에 표시) */
.pf-hint-inline {
  font-size: 10.5px;
  color: var(--gray);
  font-weight: 400;
  margin-left: 4px;
}

/* 블록 힌트 (field 아래) */
.pf-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  line-height: 1.5;
}

/* 그리드 레이아웃 */
.pf-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.pf-grid-2 { grid-template-columns: 1fr 1fr; }
.pf-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 600px) {
  .pf-grid-2, .pf-grid-3 { grid-template-columns: 1fr; }
}

/* 로고 미리보기 */
.pf-logo-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px;
  background: #fafbfc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 60px;
}
.pf-logo-preview img {
  max-width: 140px;
  max-height: 80px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
  background: white;
  object-fit: contain;
}
.pf-logo-preview.pf-logo-empty {
  color: var(--gray2);
  font-size: 12px;
  justify-content: center;
  align-items: center;
  font-weight: 300;
}
.pf-logo-note {
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 500;
}

/* 모달 푸터 */
.pf-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 14px;
}

/* 반응형 모달 */
@media (max-width: 600px) {
  .prop-modal-overlay {
    padding: 0;
  }
  .prop-modal {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
  }
}

/* ══════════════════════════════════════════════════════════
   Phase 2 — 편집기 전용 스타일
══════════════════════════════════════════════════════════ */

/* 편집기는 모달을 넓게 */
.prop-modal-wide {
  max-width: 1180px !important;
}

/* 편집기 전체 레이아웃 */
.pf-editor {
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.pf-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.pf-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.pf-title-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--prop-navy);
  background: transparent;
  outline: none;
  transition: all .15s;
}
.pf-title-input:hover  { background: #f7f9fc; }
.pf-title-input:focus  { background: white; border-color: var(--prop-navy); box-shadow: 0 0 0 2px rgba(26,43,74,.08); }

/* 상태 배지 */
.pf-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pf-badge-draft    { background: #f1f5f9; color: var(--text2); }
.pf-badge-active   { background: #ecfdf5; color: var(--prop-green); }
.pf-badge-archived { background: #f3f4f6; color: var(--gray); }

/* 자동저장 표시 */
.pf-autosave-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gray);
  white-space: nowrap;
}
.pf-autosave-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray2);
}
.pf-autosave-dot.pf-autosave-ok {
  background: var(--prop-green);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, .12);
}

/* ─── 탭 바 ─── */
.pf-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin: 12px -20px 0 -20px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pf-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  font-family: var(--font);
}
.pf-tab:hover {
  color: var(--text);
  background: #f7f9fc;
}
.pf-tab.active {
  color: var(--prop-navy);
  border-bottom-color: var(--prop-navy);
  background: transparent;
  font-weight: 600;
}
.pf-tab-icon {
  font-size: 14px;
  line-height: 1;
}

/* ─── 탭 콘텐츠 영역 ─── */
.pf-tab-content {
  padding: 18px 2px 8px;
  min-height: 380px;
}

/* ─── 편집기 푸터 ─── */
.pf-editor-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ─── 그리드 추가 ─── */
.pf-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 720px) {
  .pf-grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ─── 체크박스 필드 ─── */
.pf-checkbox-field {
  padding: 4px 0;
}
.pf-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text2);
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  transition: all .15s;
  user-select: none;
}
.pf-checkbox-inline:hover {
  border-color: var(--prop-navy);
  background: #f7f9fc;
}
.pf-checkbox-inline input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}
.pf-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* 경고 텍스트 */
.pf-warn-text {
  color: var(--prop-gold) !important;
  background: #fef9e7;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--prop-gold);
  font-weight: 500 !important;
}

/* ══════════════════════════════════════════════════════════
   수익분석 / 가치평가 탭 — 2단 레이아웃
══════════════════════════════════════════════════════════ */
.pf-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pf-split-inputs {
  min-width: 0;
}

.pf-split-preview {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  max-height: 720px;
  overflow-y: auto;
  position: sticky;
  top: 0;
}

.pf-preview-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--prop-navy);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--prop-navy);
}

@media (max-width: 900px) {
  .pf-split-layout { grid-template-columns: 1fr; }
  .pf-split-preview { position: static; max-height: none; }
}

/* ─── 4대 핵심 숫자 박스 ─── */
.pf-big-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.pf-big-num {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.pf-big-num.pf-big-gold {
  background: linear-gradient(135deg, #fef9e7 0%, #fdf4d3 100%);
  border-color: var(--prop-gold);
}

.pf-big-num.pf-big-green {
  background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%);
  border-color: var(--prop-green);
}

.pf-big-label {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 2px;
  letter-spacing: -.01em;
  font-weight: 500;
}

.pf-big-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--prop-navy);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.pf-big-gold .pf-big-value { color: var(--prop-gold); }
.pf-big-green .pf-big-value { color: var(--prop-green); }

/* ─── 프리뷰 섹션/테이블 ─── */
.pf-preview-section {
  margin-bottom: 14px;
}
.pf-preview-section:last-child { margin-bottom: 0; }

.pf-preview-section-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--prop-navy);
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.pf-preview-sub-title {
  font-size: 10.5px;
  color: var(--text3);
  margin: 6px 0 2px;
  font-weight: 500;
}

.pf-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pf-preview-table td,
.pf-preview-table th {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.pf-preview-table tr:last-child td { border-bottom: none; }
.pf-preview-table td:last-child,
.pf-preview-table th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.pf-preview-table th {
  background: #f7f9fc;
  font-weight: 600;
  color: var(--text2);
  font-size: 10.5px;
}
.pf-row-emphasis {
  background: #f7f9fc;
  font-weight: 600;
}
.pf-row-emphasis td { color: var(--prop-navy); }

.pf-table-scenarios td,
.pf-table-scenarios th {
  padding: 4px 6px;
  font-size: 11px;
}

/* DSCR 상태 pill */
.pf-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 600;
  margin-left: 4px;
}
.pf-pill-ok   { background: #ecfdf5; color: var(--prop-green); }
.pf-pill-warn { background: #fef9e7; color: var(--prop-gold); }
.pf-pill-bad  { background: #fee2e2; color: var(--red); }

.pf-muted {
  color: var(--gray2);
  font-style: italic;
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════
   가치평가 탭 — 3방식 UI
══════════════════════════════════════════════════════════ */
.pf-val-method {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.pf-val-method-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--prop-navy);
  margin-bottom: 2px;
}

/* 거래사례 카드 */
.pf-comparison-cases {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.pf-case-card {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.pf-case-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--prop-navy);
}

.pf-case-remove {
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--gray);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.pf-case-remove:hover {
  background: #fee2e2;
  color: var(--red);
}

.pf-case-adj {
  padding: 8px;
  background: white;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin: 6px 0;
}

.pf-case-adj-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 4px;
}

.pf-empty-cases {
  text-align: center;
  padding: 20px;
  color: var(--gray2);
  font-size: 12px;
  font-style: italic;
}

/* 가치평가 결과 */
.pf-val-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-val-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

.pf-val-result-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

.pf-val-result-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--prop-navy);
  font-variant-numeric: tabular-nums;
}

.pf-val-result-value.pf-big { font-size: 22px; }

.pf-val-result-detail {
  font-size: 10.5px;
  color: var(--text3);
  padding: 2px 10px 6px;
  margin-top: -2px;
  background: white;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-bottom: 4px;
}

.pf-val-synthesis {
  background: linear-gradient(135deg, var(--prop-navy) 0%, #243a5e 100%);
  color: white;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  text-align: center;
}
.pf-val-synthesis .pf-val-result-label {
  color: rgba(255,255,255,.85);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}
.pf-val-synthesis .pf-val-result-value {
  color: white;
  font-size: 26px;
}
.pf-val-synthesis .pf-val-result-detail {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: none;
  padding: 2px 0 0;
  margin: 0;
  font-size: 10.5px;
}

.pf-val-empty {
  text-align: center;
  padding: 20px;
  background: #f7f9fc;
  border-radius: var(--radius-sm);
  color: var(--gray);
  font-size: 12px;
}

.pf-val-disclaimer {
  margin-top: 10px;
  padding: 8px 10px;
  background: #fef9e7;
  border: 1px solid var(--prop-gold);
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  color: var(--prop-gold);
  font-weight: 500;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   리스크 탭
══════════════════════════════════════════════════════════ */
.pf-risk-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.pf-risk-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.pf-risk-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--prop-navy) 0%, var(--prop-green) 100%);
  transition: width .3s ease;
}

.pf-risk-progress-text {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
  white-space: nowrap;
}

.pf-risk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-risk-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: all .15s;
}

.pf-risk-item.pf-risk-checked {
  background: #ecfdf5;
  border-color: var(--prop-green);
}

.pf-risk-label {
  display: flex;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 6px;
}

.pf-risk-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.pf-risk-content {
  flex: 1;
  min-width: 0;
}

.pf-risk-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--prop-navy);
  margin-bottom: 1px;
}

.pf-risk-desc {
  font-size: 11.5px;
  color: var(--text3);
  margin-bottom: 2px;
}

.pf-risk-docs {
  font-size: 10.5px;
  color: var(--gray);
}

.pf-risk-note {
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-family: var(--font);
  background: white;
  outline: none;
}
.pf-risk-note:focus {
  border-color: var(--prop-navy);
  box-shadow: 0 0 0 2px rgba(26, 43, 74, .08);
}

/* ══════════════════════════════════════════════════════════
   자료 첨부 탭 — 사진 카드
══════════════════════════════════════════════════════════ */
.pf-photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.pf-photo-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.pf-photo-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  overflow: hidden;
}
.pf-photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-photo-main-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--prop-gold);
  color: white;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: .02em;
}

.pf-photo-actions {
  padding: 6px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.pf-photo-actions input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font);
  outline: none;
}
.pf-photo-actions input:focus {
  border-color: var(--prop-navy);
}

/* ══════════════════════════════════════════════════════════
   작은 버튼 추가 (.btn-xs)
══════════════════════════════════════════════════════════ */
#page-proposals .btn-xs,
.prop-modal .btn-xs {
  padding: 3px 8px;
  font-size: 10.5px;
  border-radius: 4px;
  font-weight: 500;
}

.prop-modal .btn-danger {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.prop-modal .btn-danger:hover {
  background: #c12a1a;
  border-color: #c12a1a;
}

/* ══════════════════════════════════════════════════════════
   반응형 — 편집기 모바일
══════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .pf-editor-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pf-autosave-status {
    align-self: flex-start;
  }
  .pf-tabs {
    margin: 10px -16px 0 -16px;
    padding: 0 16px;
  }
  .pf-tab {
    padding: 8px 10px;
    font-size: 11.5px;
  }
  .pf-tab-icon { display: none; }

  .pf-big-nums {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   미리보기 모달 (Preview) - pp- 접두어
══════════════════════════════════════════════════════════ */
.pp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 10001;
  overflow: hidden;
}
.pp-overlay.active { display: block; }
body.pp-body-lock { overflow: hidden; }

.pp-shell {
  position: absolute;
  inset: 20px;
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
}
.pp-head-title {
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.pp-head-title strong {
  color: var(--prop-navy);
  font-weight: 700;
}
.pp-head-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.pp-tab {
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text2);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.pp-tab:hover { background: #f1f5f9; }
.pp-tab.active {
  background: var(--prop-navy);
  color: white;
  border-color: var(--prop-navy);
}
.pp-head-actions { flex-shrink: 0; }

.pp-toolbar {
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.pp-toolbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}
.pp-toolbar-left, .pp-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pp-toolbar-hint {
  font-size: 11px;
  color: var(--text3);
  margin-right: 4px;
}

.pp-subtab {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.pp-subtab:hover { background: #f1f5f9; }
.pp-subtab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.pp-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.pp-section-toggle.off {
  opacity: 0.55;
  text-decoration: line-through;
}
.pp-section-toggle input { margin: 0; }

.pp-body {
  flex: 1;
  overflow-y: auto;
  background: #e8edf3;
  padding: 20px;
}

/* A4 페이지 프레임 */
.pp-page-wrap {
  display: flex;
  justify-content: center;
}
.pp-page {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.pp-page-a4 {
  width: 210mm;
  min-height: 297mm;
  padding: 20mm 15mm;
  box-sizing: border-box;
}

/* 요약본 영역 */
.pp-summary-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.pp-summary-meta {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.pp-meta-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.pp-meta-ok {
  background: #d1fae5;
  color: #047857;
}
.pp-meta-warn {
  background: #fef3c7;
  color: #b45309;
}
.pp-summary-text {
  width: 100%;
  min-height: 360px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  background: #fafbfc;
  color: var(--text);
  box-sizing: border-box;
}
.pp-summary-hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.5;
}

/* 플레이스홀더 */
.pp-placeholder {
  max-width: 560px;
  margin: 40px auto;
  background: white;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.pp-placeholder-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.pp-placeholder h3 {
  color: var(--prop-navy);
  margin: 0 0 10px 0;
  font-size: 16px;
}
.pp-placeholder p {
  color: var(--text2);
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}
.pp-placeholder ul {
  text-align: left;
  max-width: 340px;
  margin: 12px auto;
  color: var(--text2);
  font-size: 12.5px;
  line-height: 1.8;
}
.pp-placeholder-hint {
  background: #f0f7ff;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 4px;
  text-align: left;
  margin-top: 16px;
  font-size: 12px;
}

/* ══════════════════════════════════════════════════════════
   문서 스타일 (.prop-doc) — 매물장·보고서 공통
══════════════════════════════════════════════════════════ */
.prop-doc {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif;
  font-size: 10pt;
  line-height: 1.5;
  color: #1f2937;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* 헤더 */
.pd-header {
  border-bottom: 2px solid var(--prop-navy);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.pd-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pd-broker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-logo {
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}
.pd-broker-name {
  font-weight: 700;
  color: var(--prop-navy);
  font-size: 11pt;
}
.pd-broker-contact {
  font-size: 9pt;
  color: #6b7280;
  margin-top: 1px;
}
.pd-doctype {
  background: var(--prop-navy);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.pd-title {
  font-size: 17pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin: 6px 0 4px 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.pd-subtitle {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 10pt;
}
.pd-chip {
  background: #eff4f9;
  color: var(--prop-navy);
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 9pt;
  font-weight: 600;
}
.pd-addr {
  color: #4b5563;
  font-size: 10pt;
}

/* 핵심 숫자 박스 */
.pd-keynums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.pd-keynum {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 10px;
  text-align: center;
}
.pd-keynum-label {
  font-size: 8.5pt;
  color: #6b7280;
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.pd-keynum-value {
  font-size: 14pt;
  font-weight: 700;
  color: var(--prop-navy);
  letter-spacing: -0.02em;
}
.pd-keynum-small { font-size: 10pt; }
.pd-keynum-gold {
  background: #fef8e7;
  border-color: #f0e0b0;
}
.pd-keynum-gold .pd-keynum-value { color: var(--prop-gold); }
.pd-keynum-green {
  background: #e7f5ec;
  border-color: #b8d8c2;
}
.pd-keynum-green .pd-keynum-value { color: var(--prop-green); }

@media (max-width: 700px) {
  .pd-keynums { grid-template-columns: repeat(2, 1fr); }
}

/* 섹션 공통 */
.pd-section {
  margin-bottom: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pd-section-title {
  font-size: 11pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #cbd5e1;
  letter-spacing: -0.01em;
}

/* 표 공통 */
.pd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
}
.pd-table th, .pd-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.pd-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: left;
  width: 18%;
}
.pd-table td {
  color: #1e293b;
  width: 32%;
}
.pd-table-2col th { width: 17%; }
.pd-table-2col td { width: 33%; }
.pd-table-row th { width: 30%; }
.pd-table-row td { width: 70%; }
.pd-row-emph {
  background: #fef8e7;
  font-weight: 700;
}
.pd-row-emph td, .pd-row-emph th { border-bottom-color: #d4b35c; }
.pd-hint {
  color: #9ca3af;
  font-size: 8.5pt;
  margin-left: 6px;
  font-weight: 400;
}

/* 강점 리스트 */
.pd-bullet {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pd-bullet li {
  padding: 4px 0 4px 18px;
  position: relative;
  font-size: 10pt;
  color: #1e293b;
}
.pd-bullet li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  color: var(--prop-gold);
  font-weight: 700;
}

/* 사진 그리드 — 최대 4장 반응형 */
.pd-photos {
  margin-top: 10pt;
  page-break-inside: avoid;
  break-inside: avoid;
}
.pd-photo-grid {
  display: grid;
  gap: 4pt;
}

/* 1장: 단일 크게 (가로형, 16:9에 가까운 비율) */
.pd-photo-grid-1 {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
}
.pd-photo-grid-1 .pd-photo img {
  aspect-ratio: 16 / 9;
  max-height: 95mm;
}

/* 2장: 좌우 동등 분할 */
.pd-photo-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.pd-photo-grid-2 .pd-photo img {
  aspect-ratio: 4 / 3;
  max-height: 70mm;
}

/* 3장: 대표 사진 크게 + 나머지 2장 세로 스택 */
.pd-photo-grid-3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
}
.pd-photo-grid-3 .pd-photo-hero {
  grid-row: 1 / 3;
}
.pd-photo-grid-3 .pd-photo-hero img {
  aspect-ratio: 4 / 3;
  max-height: 95mm;
}
.pd-photo-grid-3 .pd-photo:not(.pd-photo-hero) img {
  aspect-ratio: 4 / 3;
  max-height: 45mm;
}

/* 4장: 2x2 그리드 */
.pd-photo-grid-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
}
.pd-photo-grid-4 .pd-photo img {
  aspect-ratio: 4 / 3;
  max-height: 55mm;
}

.pd-photo {
  margin: 0;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}
.pd-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  display: block;
  /* 인쇄 품질 보장 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.pd-photo figcaption {
  text-align: center;
  font-size: 8.5pt;
  color: #6b7280;
  margin-top: 2pt;
  font-style: italic;
}

/* 좁은 화면 대응 — 미리보기 창이 좁으면 모두 1열 */
@media (max-width: 500px) {
  .pd-photo-grid-2,
  .pd-photo-grid-3,
  .pd-photo-grid-4 {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .pd-photo-grid-3 .pd-photo-hero {
    grid-row: auto !important;
  }
  .pd-photo img {
    aspect-ratio: 4 / 3 !important;
    max-height: 60mm !important;
  }
}

/* 인쇄 시 최적 비율 보장 */
@media print {
  .pd-photos {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .pd-photo {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .pd-photo img {
    image-rendering: auto;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


/* 중립 pill */
.pd-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 8.5pt;
  font-weight: 700;
  margin-left: 4px;
}
.pd-pill-ok   { background: #d1fae5; color: #047857; }
.pd-pill-warn { background: #fef3c7; color: #b45309; }
.pd-pill-bad  { background: #fee2e2; color: #b91c1c; }
.pd-muted { color: #9ca3af; }

/* 푸터 (법정 표시 + 면책) */
.pd-footer {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1.5px solid var(--prop-navy);
  font-size: 8.5pt;
  color: #4b5563;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pd-footer-title {
  font-weight: 700;
  color: var(--prop-navy);
  margin-bottom: 6px;
  font-size: 9pt;
  letter-spacing: -0.01em;
}
.pd-footer-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 0 0 8px 0;
}
.pd-footer-grid dt {
  font-weight: 600;
  color: #6b7280;
  font-size: 8.5pt;
}
.pd-footer-grid dd {
  margin: 0;
  color: #1e293b;
  font-size: 8.5pt;
}
.pd-disclaimer {
  background: #f8fafc;
  border-left: 2px solid #cbd5e1;
  padding: 6px 10px;
  font-size: 8pt;
  line-height: 1.6;
  color: #6b7280;
  margin: 6px 0;
  font-style: italic;
}
.pd-footer-meta {
  text-align: right;
  font-size: 8pt;
  color: #9ca3af;
  margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════
   @media print — 인쇄 시 전용 스타일
══════════════════════════════════════════════════════════ */
@media print {
  /* 인쇄 모드 활성화 시 오버레이 외 모든 페이지 UI 숨김 */
  body.pp-printing > *:not(#prop-preview-overlay) { display: none !important; }
  body.pp-printing #prop-preview-overlay > *:not(.pp-shell),
  body.pp-printing .pp-head,
  body.pp-printing .pp-toolbar { display: none !important; }

  body.pp-printing .pp-overlay,
  body.pp-printing .pp-shell,
  body.pp-printing .pp-body {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    background: white !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.pp-printing .pp-page {
    box-shadow: none !important;
    width: auto !important;
    min-height: auto !important;
    padding: 0 !important;
  }

  body.pp-printing .pp-page-wrap { justify-content: flex-start; }

  @page {
    size: A4;
    margin: 20mm 15mm;
  }
}

/* ══════════════════════════════════════════════════════════
   투자자용 보고서 (pr- 접두어, prop-doc-report)
══════════════════════════════════════════════════════════ */
.prop-doc-report {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif;
  color: #1f2937;
}

/* 각 페이지: A4 한 장 */
.pr-page {
  min-height: 257mm;
  padding: 0 0 10mm 0;
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
  position: relative;
}
.pr-page:last-of-type {
  page-break-after: auto;
  break-after: auto;
}

/* ───── Page 1: 표지 ───── */
.pr-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 257mm;
  padding: 0 !important;
}
.pr-cover-head {
  padding-bottom: 10pt;
  border-bottom: 1px solid #cbd5e1;
  text-align: center;
}
.pr-cover-logo {
  max-width: 100px;
  max-height: 70px;
  object-fit: contain;
  margin: 0 auto 8pt;
}
.pr-cover-logo-text {
  font-size: 14pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin-bottom: 6pt;
  letter-spacing: -0.01em;
}
.pr-cover-broker-line {
  font-size: 10pt;
  color: #6b7280;
}

.pr-cover-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 20pt 10pt;
}
.pr-cover-eyebrow {
  font-size: 9pt;
  color: var(--prop-gold);
  letter-spacing: 0.3em;
  font-weight: 600;
  margin-bottom: 12pt;
  text-transform: uppercase;
}
.pr-cover-doctype {
  font-size: 12pt;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8pt;
  letter-spacing: -0.01em;
}
.pr-cover-title {
  font-size: 26pt;
  font-weight: 700;
  color: var(--prop-navy);
  line-height: 1.25;
  margin: 0 0 14pt 0;
  letter-spacing: -0.02em;
}
.pr-cover-subtitle {
  font-size: 11pt;
  color: #4b5563;
  margin-bottom: 18pt;
}
.pr-cover-meta {
  display: flex;
  justify-content: center;
  gap: 6pt;
  margin-bottom: 28pt;
  flex-wrap: wrap;
}
.pr-cover-chip {
  background: var(--prop-navy);
  color: white;
  padding: 4px 14px;
  border-radius: 3px;
  font-size: 9pt;
  font-weight: 600;
}
.pr-cover-chip-muted {
  background: #eff4f9;
  color: var(--prop-navy);
  padding: 4px 14px;
  border-radius: 3px;
  font-size: 9pt;
  font-weight: 500;
}
.pr-cover-keys {
  display: flex;
  justify-content: center;
  gap: 30pt;
  margin-top: 16pt;
}
.pr-cover-key {
  text-align: center;
  min-width: 110px;
}
.pr-cover-key-label {
  font-size: 9pt;
  color: #6b7280;
  margin-bottom: 4pt;
}
.pr-cover-key-value {
  font-size: 20pt;
  font-weight: 700;
  color: var(--prop-navy);
  letter-spacing: -0.02em;
}

.pr-cover-foot {
  padding-top: 12pt;
  border-top: 1px solid #cbd5e1;
  font-size: 9pt;
  color: #4b5563;
}
.pr-cover-foot-row {
  display: flex;
  justify-content: space-between;
  padding: 3pt 0;
}
.pr-cover-foot-label {
  color: #9ca3af;
  font-weight: 600;
  min-width: 60pt;
}

/* ───── 본문 페이지 공통 ───── */
.pr-page-title {
  font-size: 18pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin: 0 0 14pt 0;
  padding-bottom: 6pt;
  border-bottom: 2.5px solid var(--prop-navy);
  letter-spacing: -0.01em;
}
.pr-h2 {
  font-size: 11.5pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin: 14pt 0 6pt 0;
  padding-left: 8pt;
  border-left: 3px solid var(--prop-gold);
  letter-spacing: -0.01em;
}
.pr-section { margin-bottom: 14pt; }
.pr-lead {
  font-size: 10.5pt;
  line-height: 1.7;
  color: #374151;
  margin: 0 0 16pt 0;
  padding: 10pt 14pt;
  background: #f8fafc;
  border-left: 3px solid var(--prop-navy);
}

/* 6개 핵심 숫자 카드 그리드 */
.pr-nums-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8pt;
  margin-bottom: 16pt;
}
.pr-num {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 10pt;
  text-align: center;
}
.pr-num-label {
  font-size: 8.5pt;
  color: #6b7280;
  margin-bottom: 4pt;
  font-weight: 500;
}
.pr-num-value {
  font-size: 14pt;
  font-weight: 700;
  color: var(--prop-navy);
  letter-spacing: -0.02em;
}
.pr-num-gold {
  background: #fef8e7;
  border-color: #f0e0b0;
}
.pr-num-gold .pr-num-value { color: var(--prop-gold); }
.pr-num-green {
  background: #e7f5ec;
  border-color: #b8d8c2;
}
.pr-num-green .pr-num-value { color: var(--prop-green); }

/* 가치평가 Executive Summary 박스 */
.pr-val-highlight {
  background: linear-gradient(to right, #fef8e7, #fafbfc);
  border: 1.5px solid var(--prop-gold);
  border-radius: 5px;
  padding: 14pt;
  margin: 14pt 0;
  text-align: center;
}
.pr-val-highlight-label {
  font-size: 9pt;
  color: #6b7280;
  margin-bottom: 6pt;
  font-weight: 500;
}
.pr-val-highlight-value {
  font-size: 22pt;
  font-weight: 700;
  color: var(--prop-gold);
  letter-spacing: -0.02em;
}
.pr-val-highlight-breakdown {
  font-size: 9pt;
  color: #6b7280;
  margin-top: 6pt;
}

/* 블록 공통 */
.pr-block {
  padding: 10pt 12pt;
  background: #fafbfc;
  border-left: 3px solid #cbd5e1;
  font-size: 10pt;
  line-height: 1.6;
  color: #374151;
  border-radius: 0 3px 3px 0;
  margin-top: 6pt;
}
.pr-block-warn {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #7c2d12;
}

/* 안내 문구 */
.pr-notice {
  padding: 16pt;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #6b7280;
  font-size: 10pt;
  text-align: center;
  border-radius: 4px;
}

/* 가치평가 방식 블록 */
.pr-val-disclaimer {
  background: #fff8dc;
  border: 1px solid #f0e0b0;
  color: #8b6914;
  padding: 8pt 12pt;
  font-size: 9.5pt;
  border-radius: 4px;
  margin-bottom: 14pt;
  line-height: 1.6;
}
.pr-val-method {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--prop-navy);
  padding: 12pt;
  margin-bottom: 10pt;
  border-radius: 0 4px 4px 0;
}
.pr-val-empty {
  border-left-color: #cbd5e1;
  background: #f8fafc;
}
.pr-val-method-head {
  font-size: 11pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin-bottom: 4pt;
}
.pr-val-num {
  display: inline-block;
  width: 20px;
  color: var(--prop-gold);
  font-weight: 800;
}
.pr-val-method-formula {
  font-size: 9pt;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 8pt;
  padding-left: 24px;
}
.pr-val-final {
  background: linear-gradient(135deg, #eff4f9, #ffffff);
  border: 2px solid var(--prop-navy);
  border-radius: 6px;
  padding: 18pt;
  text-align: center;
  margin-top: 14pt;
}
.pr-val-final-label {
  font-size: 10pt;
  color: #6b7280;
  margin-bottom: 6pt;
  font-weight: 500;
}
.pr-val-final-value {
  font-size: 26pt;
  font-weight: 700;
  color: var(--prop-navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pr-val-final-weights {
  font-size: 9pt;
  color: #6b7280;
  margin-top: 8pt;
  line-height: 1.5;
}
.pr-val-final-note {
  font-size: 8pt;
  color: #9ca3af;
  font-style: italic;
}

/* 시나리오 표 */
.pd-table-scenarios th,
.pd-table-scenarios td {
  text-align: right;
  width: auto !important;
}
.pd-table-scenarios th:first-child,
.pd-table-scenarios td:first-child {
  text-align: left;
}
.pd-table-scenarios thead th {
  background: var(--prop-navy);
  color: white;
  font-weight: 600;
  font-size: 9pt;
}

/* 리스크 */
.pr-risk-list { margin-bottom: 12pt; }
.pr-risk-item {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 8pt 12pt;
  margin-bottom: 6pt;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pr-risk-checked {
  border-left: 3px solid var(--prop-green);
  background: #f0f9f4;
}
.pr-risk-item-head {
  display: flex;
  align-items: center;
  gap: 8pt;
  margin-bottom: 2pt;
}
.pr-risk-badge {
  background: var(--prop-green);
  color: white;
  font-size: 8pt;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  flex-shrink: 0;
}
.pr-risk-label {
  font-size: 10.5pt;
  font-weight: 700;
  color: var(--prop-navy);
}
.pr-risk-desc {
  font-size: 9pt;
  color: #6b7280;
  margin-bottom: 4pt;
}
.pr-risk-note {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 6pt 8pt;
  font-size: 9.5pt;
  color: #374151;
  border-radius: 3px;
  margin-top: 4pt;
}

.pr-risk-pending {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 10pt 12pt;
  margin-top: 12pt;
}
.pr-risk-pending-head {
  font-weight: 700;
  color: #b45309;
  font-size: 10pt;
  margin-bottom: 4pt;
}
.pr-risk-pending-list {
  font-size: 9.5pt;
  color: #78350f;
  padding-left: 20pt;
  margin: 6pt 0;
  line-height: 1.7;
}
.pr-risk-pending-hint {
  font-size: 8.5pt;
  color: #92400e;
  font-style: italic;
  margin-top: 4pt;
}

/* 썸네일 그리드 */
.pr-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6pt;
}
.pr-thumb {
  margin: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pr-thumb img {
  width: 100%;
  height: 56mm;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
}
.pr-thumb figcaption {
  text-align: center;
  font-size: 8pt;
  color: #6b7280;
  margin-top: 3pt;
  font-style: italic;
}

/* 문서 끝 푸터 */
.pr-final-footer {
  margin-top: 0;
  padding-top: 16pt;
  page-break-inside: avoid;
}

/* ══════════════════════════════════════════════════════════
   건물·호실 탭 (다가구/빌딩 전용)
══════════════════════════════════════════════════════════ */
.pf-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pf-unit-summary {
  font-size: 11.5px;
  color: var(--text2);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.pf-unit-summary strong {
  color: var(--prop-navy);
  font-weight: 700;
}
.pf-unit-floor {
  margin-bottom: 14px;
}
.pf-unit-floor-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--prop-navy);
  margin-bottom: 5px;
  padding-left: 4px;
  border-left: 3px solid var(--prop-gold);
  padding: 2px 0 2px 8px;
}
.pf-unit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}
.pf-unit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 780px;
}
.pf-unit-table thead th {
  background: #f1f5f9;
  color: var(--text2);
  font-weight: 600;
  font-size: 11px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}
.pf-unit-table tbody td {
  padding: 3px 3px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.pf-unit-table tbody tr:hover { background: #fafbfc; }
.pf-unit-table input,
.pf-unit-table select {
  width: 100%;
  padding: 5px 6px;
  font-size: 11.5px;
  font-family: var(--font);
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: white;
  box-sizing: border-box;
}
.pf-unit-table input:focus,
.pf-unit-table select:focus {
  outline: none;
  border-color: var(--prop-navy);
  box-shadow: 0 0 0 2px rgba(26, 43, 74, 0.08);
}
.pf-num-cell {
  text-align: right !important;
}
.pf-unit-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* 수익분석 탭의 건물 모드 배지 */
.pf-building-notice {
  background: linear-gradient(135deg, #eff4f9, #fafbfc);
  border: 1px solid var(--prop-navy);
  border-left: 3px solid var(--prop-navy);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--prop-navy);
  font-weight: 600;
}
.pf-building-notice-detail {
  font-size: 11px;
  color: var(--text2);
  font-weight: 400;
  margin-top: 4px;
  letter-spacing: -0.01em;
}

/* ══════════════════════════════════════════════════════════
   매물장 - 건물 블록 (pb-* 접두어, 두 번째 이미지 양식)
══════════════════════════════════════════════════════════ */
.pd-building-block { margin-top: 12pt; }
.pd-unit-note {
  font-size: 8.5pt;
  color: #6b7280;
  font-weight: 400;
  margin-left: 6pt;
}

.pb-top-grid {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 6pt;
  margin-bottom: 10pt;
}

.pb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
  border: 1.5px solid var(--prop-navy);
}
.pb-table thead th {
  background: var(--prop-navy);
  color: white;
  padding: 5pt;
  text-align: center;
  font-weight: 700;
  font-size: 10pt;
  border: 1px solid var(--prop-navy);
  letter-spacing: 0.04em;
}
.pb-table tbody th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
  padding: 4pt 6pt;
  text-align: center;
  border: 1px solid #cbd5e1;
  width: 28%;
  white-space: nowrap;
}
.pb-table tbody td {
  padding: 4pt 6pt;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  background: white;
}
.pb-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 개요 좌측 */
.pb-overview th { width: 32%; }
.pb-comp-cell {
  padding: 2pt 6pt !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10pt;
}
.pb-comp-cell span:last-child {
  font-weight: 700;
  color: var(--prop-navy);
  min-width: 30px;
  text-align: right;
}

/* 수익성 분석 우측 */
.pb-profit th {
  width: 45%;
  letter-spacing: 0.1em;
}
.pb-profit td {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pb-profit-highlight {
  background: #fef8e7 !important;
}
.pb-profit-highlight th {
  background: #fef3c7 !important;
  color: var(--prop-navy) !important;
  font-weight: 700 !important;
}
.pb-profit-highlight td {
  background: #fef8e7 !important;
  color: var(--prop-gold);
  font-weight: 800 !important;
}

/* 임대현황 표 */
.pb-unit-table-title {
  text-align: center;
  font-size: 10.5pt;
  font-weight: 700;
  color: white;
  background: var(--prop-navy);
  padding: 4pt;
  margin: 0;
  border: 1.5px solid var(--prop-navy);
  border-bottom: none;
  letter-spacing: 0.3em;
}
.pb-unit-table thead th {
  background: #eff4f9;
  color: var(--prop-navy);
  font-size: 9.5pt;
  padding: 4pt;
  border: 1px solid #cbd5e1;
}
.pb-unit-table tbody td {
  padding: 3pt 5pt;
  text-align: center;
  font-size: 9pt;
}
.pb-unit-table .pb-floor-cell {
  background: #f8fafc;
  font-weight: 700;
  color: var(--prop-navy);
  vertical-align: middle;
  width: 6%;
}
.pb-unit-table .pb-note {
  text-align: center;
  color: #6b7280;
  font-size: 8.5pt;
}
.pb-totals-row td {
  background: #fef8e7 !important;
  font-weight: 700 !important;
  border-top: 1.5px solid var(--prop-gold) !important;
  color: var(--prop-navy);
}
.pb-totals-label {
  text-align: center !important;
  letter-spacing: 0.5em;
}

/* 인쇄 최적화 */
@media print {
  .pd-building-block { break-inside: avoid; page-break-inside: avoid; }
  .pb-top-grid { page-break-inside: avoid; }
  .pb-unit-table { page-break-inside: auto; }
  .pb-unit-table tr { page-break-inside: avoid; }
}

/* 매물장/보고서 — 공시가격·토지이용계획 표시 */
.pd-subhead {
  font-size: 10.5pt;
  font-weight: 700;
  color: var(--prop-navy);
  margin: 10pt 0 5pt 0;
  padding-left: 8pt;
  border-left: 3px solid var(--prop-gold);
}
.pd-land-use-plan {
  padding: 8pt 10pt;
  background: #fafbfc;
  border-left: 3px solid #cbd5e1;
  font-size: 9.5pt;
  line-height: 1.7;
  color: #374151;
  border-radius: 0 3px 3px 0;
  white-space: pre-wrap;
}
.pd-source-line {
  text-align: right;
  font-size: 8.5pt;
  color: #9ca3af;
  margin-top: 3pt;
  font-style: italic;
}
.pr-source-line {
  text-align: right;
  font-size: 9pt;
  color: #9ca3af;
  margin-top: 4pt;
  font-style: italic;
}

/* 편집기 기본정보 탭 — 레이아웃 분기 힌트 */
.pf-field .pf-hint { display: block; }

/* ══════════════════════════════════════════════════════════
   매물장 A4 1페이지 맞춤 — 다가구 건물 모드 압축 모드
══════════════════════════════════════════════════════════ */

/* 편집기/미리보기에서 A4 폭 프레임 제공 */
.prop-doc-list {
  max-width: 210mm;
  margin: 0 auto;
  background: white;
}

/* 건물 모드 — 타이트 모드: A4 1페이지 맞춤 */
.pd-building-block {
  font-size: 8.5pt !important;
  line-height: 1.35;
}
.pd-building-block .pd-section-title {
  font-size: 10.5pt;
  margin: 6pt 0 4pt 0;
  padding-bottom: 2pt;
}

/* 건축물 개요 / 수익성 분석 박스 */
.pb-top-grid {
  gap: 4pt !important;
  margin-bottom: 6pt !important;
}
.pb-table thead th {
  padding: 3pt !important;
  font-size: 9pt !important;
}
.pb-table tbody th,
.pb-table tbody td {
  padding: 2pt 5pt !important;
  font-size: 8.5pt !important;
}
.pb-comp-cell {
  padding: 1.5pt 5pt !important;
  font-size: 8.5pt !important;
}

/* 임대현황 표 — 호실이 많을 때 크게 압축 */
.pb-unit-table-title {
  font-size: 10pt !important;
  padding: 3pt !important;
  margin-top: 4pt !important;
}
.pb-unit-table thead th {
  font-size: 8.5pt !important;
  padding: 2pt 3pt !important;
}
.pb-unit-table tbody td {
  padding: 1.5pt 3pt !important;
  font-size: 8.5pt !important;
}

/* 호실이 20개 이상이면 더 압축 (초타이트 모드) */
.pb-unit-table.pb-dense tbody td {
  padding: 0.8pt 3pt !important;
  font-size: 8pt !important;
  line-height: 1.2 !important;
}
.pb-unit-table.pb-dense thead th {
  padding: 1pt 3pt !important;
  font-size: 8pt !important;
}

/* 빈 행/셀 너무 크지 않게 */
.pb-totals-row td { padding: 2.5pt 5pt !important; }

/* 인쇄 시 — A4 1페이지 강제 (다가구 매물장 전용) */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 10mm 8mm 10mm;
  }
  .prop-doc-list {
    font-size: 8.5pt;
  }
  .pd-building-block {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .pb-unit-table tr {
    page-break-inside: avoid;
  }
  /* 헤더·푸터 여백 축소 */
  .pd-header {
    padding-bottom: 6pt !important;
    margin-bottom: 8pt !important;
  }
  .pd-footer {
    margin-top: 8pt !important;
    padding-top: 5pt !important;
    font-size: 7.5pt !important;
  }
  /* 법정 표시 블록 압축 */
  .pd-footer-grid {
    gap: 1pt 8pt !important;
  }
  .pd-disclaimer {
    padding: 3pt 6pt !important;
    font-size: 7pt !important;
    margin: 3pt 0 !important;
  }
}

/* ══════════════════════════════════════════════════════════
   건물 모드 매물장 전체 압축 — 다른 섹션도 자동 축소
══════════════════════════════════════════════════════════ */
.prop-doc-list-bldg {
  font-size: 8.5pt;
}
.prop-doc-list-bldg .pd-header {
  padding-bottom: 6pt;
  margin-bottom: 8pt;
}
.prop-doc-list-bldg .pd-title {
  font-size: 13pt !important;
  margin: 3pt 0 2pt 0 !important;
}
.prop-doc-list-bldg .pd-subtitle { font-size: 8.5pt; gap: 5px; }
.prop-doc-list-bldg .pd-chip { padding: 1px 8px; font-size: 7.5pt; }

/* 핵심 숫자 박스 — 작게 */
.prop-doc-list-bldg .pd-keynums {
  gap: 4pt;
  margin-bottom: 8pt;
}
.prop-doc-list-bldg .pd-keynum { padding: 4pt 6pt; }
.prop-doc-list-bldg .pd-keynum-label { font-size: 7.5pt; margin-bottom: 2pt; }
.prop-doc-list-bldg .pd-keynum-value { font-size: 11pt; }
.prop-doc-list-bldg .pd-keynum-small { font-size: 9pt; }

/* 기본정보 표 — 작게 */
.prop-doc-list-bldg .pd-section { margin-bottom: 6pt; }
.prop-doc-list-bldg .pd-section-title {
  font-size: 10.5pt;
  margin-bottom: 4pt;
  padding-bottom: 2pt;
}
.prop-doc-list-bldg .pd-table th,
.prop-doc-list-bldg .pd-table td {
  padding: 2pt 6pt !important;
  font-size: 8.5pt !important;
}

/* 강점 섹션 */
.prop-doc-list-bldg .pd-bullet li {
  padding: 2pt 0 2pt 14pt;
  font-size: 8.5pt;
}

/* 건물 모드 — 사진 크기 더 축소 (임대현황 표와 함께 1페이지에 들어가도록) */
.prop-doc-list-bldg .pd-photo-grid-1 .pd-photo img { max-height: 60mm !important; }
.prop-doc-list-bldg .pd-photo-grid-2 .pd-photo img { max-height: 45mm !important; }
.prop-doc-list-bldg .pd-photo-grid-3 .pd-photo-hero img { max-height: 55mm !important; }
.prop-doc-list-bldg .pd-photo-grid-3 .pd-photo:not(.pd-photo-hero) img { max-height: 26mm !important; }
.prop-doc-list-bldg .pd-photo-grid-4 .pd-photo img { max-height: 38mm !important; }
.prop-doc-list-bldg .pd-photo figcaption { font-size: 7pt; margin-top: 1pt; }
.prop-doc-list-bldg .pd-photos { margin-top: 5pt; }

/* 푸터 축소 */
.prop-doc-list-bldg .pd-footer {
  margin-top: 5pt;
  padding-top: 4pt;
  font-size: 7.5pt;
}
.prop-doc-list-bldg .pd-footer-title {
  font-size: 8pt;
  margin-bottom: 3pt;
}
.prop-doc-list-bldg .pd-footer-grid {
  gap: 1pt 10pt;
  margin-bottom: 4pt;
}
.prop-doc-list-bldg .pd-footer-grid dt,
.prop-doc-list-bldg .pd-footer-grid dd { font-size: 7.5pt; }
.prop-doc-list-bldg .pd-disclaimer {
  padding: 3pt 6pt;
  font-size: 7pt;
  margin: 2pt 0;
}
.prop-doc-list-bldg .pd-footer-meta {
  font-size: 7pt;
  margin-top: 3pt;
}

/* 사진 첨부 — 카운트 표시·경고 힌트 */
.pf-section-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  margin-left: 6px;
}
.pf-hint-warn {
  color: #b45309 !important;
  background: #fef3c7;
  padding: 5px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   투자보고서 — 용어 정리 페이지 (심플 두 열)
══════════════════════════════════════════════════════════ */
.pr-glossary-page .pr-page-lead {
  font-size: 10pt;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 18pt;
  padding: 10pt 14pt;
  background: #f9fafb;
  border-left: 3px solid var(--prop-gold);
  border-radius: 0 4px 4px 0;
}

.pr-glossary-group {
  color: var(--prop-navy);
  font-size: 12pt;
  margin: 18pt 0 6pt 0;
  padding-bottom: 4pt;
  border-bottom: 2px solid var(--prop-navy);
  letter-spacing: 0.3px;
}
.pr-glossary-group:first-child {
  margin-top: 6pt;
}

.pr-glossary-table {
  margin-bottom: 8pt;
  table-layout: fixed;
  width: 100%;
}
.pr-glossary-table th,
.pr-glossary-table td {
  vertical-align: top;
  padding: 9pt 12pt !important;
}
.pr-glossary-table th.pr-glossary-term {
  width: 32%;
  background: #fafbfc;
  color: var(--prop-navy);
  font-weight: 700;
  font-size: 10.5pt;
  text-align: left;
  border-right: 1px solid #e5e7eb;
  line-height: 1.5;
}
.pr-glossary-table td.pr-glossary-desc {
  width: 68%;
  line-height: 1.6;
}
.pr-glossary-value {
  display: inline-block;
  color: var(--prop-gold);
  font-weight: 700;
  font-size: 11pt;
  margin-left: 4pt;
  letter-spacing: -0.3px;
}
.pr-glossary-brief {
  color: #374151;
  font-size: 10pt;
  font-weight: 600;
  margin-bottom: 4pt;
}
.pr-glossary-detail {
  color: #6b7280;
  font-size: 9.5pt;
  line-height: 1.65;
}

/* 인쇄 시 더 촘촘하게 — 1페이지 내에 맞추려고 노력 */
@media print {
  .pr-glossary-page .pr-page-lead {
    font-size: 9pt;
    padding: 6pt 10pt;
    margin-bottom: 10pt;
  }
  .pr-glossary-group {
    font-size: 10.5pt;
    margin: 10pt 0 4pt 0;
    padding-bottom: 2pt;
  }
  .pr-glossary-group:first-child {
    margin-top: 4pt;
  }
  .pr-glossary-table th,
  .pr-glossary-table td {
    padding: 5pt 8pt !important;
  }
  .pr-glossary-table th.pr-glossary-term {
    font-size: 9.5pt;
  }
  .pr-glossary-value {
    font-size: 9.5pt;
  }
  .pr-glossary-brief {
    font-size: 9pt;
    margin-bottom: 2pt;
  }
  .pr-glossary-detail {
    font-size: 8.5pt;
    line-height: 1.5;
  }
  /* 표가 페이지 중간에 잘리지 않도록 */
  .pr-glossary-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* 좁은 화면 (미리보기 창이 작을 때) — 두 열을 위아래로 */
@media (max-width: 600px) {
  .pr-glossary-table,
  .pr-glossary-table tbody,
  .pr-glossary-table tr,
  .pr-glossary-table th,
  .pr-glossary-table td {
    display: block;
    width: 100% !important;
  }
  .pr-glossary-table th.pr-glossary-term {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 6pt 10pt !important;
  }
  .pr-glossary-table td.pr-glossary-desc {
    padding: 6pt 10pt 12pt 10pt !important;
  }
}

/* ══════════════════════════════════════════════════════════
   본체 임대관리 시스템에서 호실 불러오기 — 모달
══════════════════════════════════════════════════════════ */
.pf-import-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pf-import-modal {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.pf-import-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #1e3a8a, #1e40af);
  color: white;
}
.pf-import-header h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: white;
}
.pf-import-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  opacity: 0.85;
}
.pf-import-close:hover { opacity: 1; }
.pf-import-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}
.pf-import-info {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 16px;
  line-height: 1.6;
}
.pf-import-warn {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #92400e;
  margin: 12px 0;
}
.pf-import-error {
  background: #fee2e2;
  border-left: 3px solid #dc2626;
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #991b1b;
  margin: 12px 0;
}
.pf-import-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
}
.pf-import-stats > div {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pf-import-stats .lbl {
  font-size: 11px;
  color: #6b7280;
}
.pf-import-stats .val {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}
.pf-import-stats .val.warn { color: #d97706; }
.pf-import-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  margin-top: 8px;
}
.pf-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.pf-import-table thead th {
  position: sticky;
  top: 0;
  background: #f3f4f6;
  font-size: 11.5px;
  font-weight: 600;
  color: #4b5563;
  padding: 6px 8px;
  border-bottom: 1px solid #d1d5db;
  text-align: left;
}
.pf-import-table tbody td {
  padding: 5px 8px;
  border-bottom: 1px solid #f3f4f6;
}
.pf-import-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pf-import-vacant {
  background: #fffbeb;
}
.pf-vacant-badge {
  display: inline-block;
  background: #f59e0b;
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.pf-import-footer {
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #f9fafb;
}

/* 공실 호실 행 (편집기) — 예상 보증금/월세 입력 */
.pf-row-vacant {
  background: #fffbeb;
}
.pf-vacant-note-cell {
  padding: 2px 4px !important;
}
.pf-vacant-flex {
  display: flex;
  gap: 4px;
  align-items: center;
}
.pf-vacant-tag {
  display: inline-block;
  background: #f59e0b;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.pf-vacant-input {
  width: 90px !important;
  padding: 3px 5px !important;
  font-size: 11.5px !important;
  border: 1px solid #fbbf24 !important;
  background: #fffef0 !important;
  color: #92400e;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pf-vacant-input::placeholder {
  color: #d97706;
  opacity: 0.6;
}
.pf-vacant-input:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px #fef3c7 !important;
  outline: none;
}

/* 매물장 — 공실 호실 행 표시 */
.pb-row-vacant {
  background: #fafbfc;
}
.pb-vacant-mark {
  display: inline-block;
  color: #9ca3af;
  font-size: 8.5pt;
  font-style: italic;
}
.pb-row-vacant .pb-note {
  font-size: 8pt;
  color: #6b7280;
}
@media print {
  .pb-row-vacant {
    background: transparent !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .pb-vacant-mark { color: #6b7280 !important; }
}

/* ══════════════════════════════════════════════════════════
   가치평가 — Cap Rate 시장 벤치마크 (편집기 + 보고서)
══════════════════════════════════════════════════════════ */

/* ── 편집기: 추천 버튼 박스 ── */
.pf-cap-benchmark {
  margin-top: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
  border: 1px solid #fbbf24;
  border-radius: 6px;
}
.pf-cap-benchmark-na {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.pf-cap-benchmark-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
}
.pf-cap-benchmark-na .pf-cap-benchmark-title {
  color: #6b7280;
}
.pf-cap-benchmark-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.pf-cap-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  border: 1.5px solid #fbbf24;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.pf-cap-btn:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}
.pf-cap-btn:active {
  transform: translateY(0);
}
.pf-cap-btn-label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 3px;
}
.pf-cap-btn-value {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  letter-spacing: -0.5px;
}
.pf-cap-btn-conservative .pf-cap-btn-value { color: #1e40af; }
.pf-cap-btn-typical      .pf-cap-btn-value { color: #92400e; }
.pf-cap-btn-aggressive   .pf-cap-btn-value { color: #b91c1c; }
.pf-cap-benchmark-note {
  font-size: 11.5px;
  color: #78350f;
  line-height: 1.5;
  padding-top: 6px;
  border-top: 1px dashed #fbbf24;
}
.pf-cap-benchmark-na .pf-cap-benchmark-note {
  color: #6b7280;
  border-top-color: #d1d5db;
}

/* 적용 시 시각적 피드백 (1.2초간) */
.pf-cap-applied {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px #fef3c7 !important;
  transition: all 0.3s ease;
}

/* ── 투자보고서: 시장 벤치마크 표 ── */
.pr-bench-intro {
  font-size: 9.5pt;
  color: #4b5563;
  margin: 6pt 0 8pt 0;
  line-height: 1.6;
}
.pr-bench-table {
  font-size: 9.5pt;
}
.pr-bench-table th {
  background: #f9fafb;
  text-align: left;
  padding: 6pt 8pt !important;
}
.pr-bench-table td {
  padding: 6pt 8pt !important;
}
.pr-bench-rate {
  text-align: right !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 11pt;
  color: var(--prop-navy);
  width: 100px;
}
.pr-bench-typical-row {
  background: #fafbfc;
}
.pr-bench-typical-row th,
.pr-bench-typical-row td {
  font-weight: 600;
}
.pr-bench-user-row {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
}
.pr-bench-user-row th {
  color: #92400e !important;
  font-weight: 700 !important;
}
.pr-bench-rate-user {
  color: #b45309 !important;
  font-size: 12pt !important;
}
.pr-bench-note {
  margin-top: 8pt;
  padding: 8pt 12pt;
  background: #f0f9ff;
  border-left: 3px solid #2563eb;
  border-radius: 0 4px 4px 0;
  font-size: 9pt;
  line-height: 1.6;
  color: #1e40af;
}
.pr-bench-disclaimer {
  margin-top: 6pt;
  font-size: 8.5pt;
  color: #9ca3af;
  font-style: italic;
  line-height: 1.5;
}

/* 인쇄 시 색상 보존 */
@media print {
  .pf-cap-benchmark,
  .pr-bench-user-row,
  .pr-bench-note {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
