/* ═══════════════════════════════════════════════
   rent-page.css — 임대차 서브메인 페이지
   (trade-page.css 기본 구조 재활용 + 임대차 전용 오버라이드)
   ═══════════════════════════════════════════════ */

/* ── 페이지 헤더 (보라/바이올렛 계열) ── */
.page-hd {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-bottom-color: #c4b5fd;
}
.page-hd-title { color: #4c1d95; }
.page-breadcrumb a { color: #7c3aed; }

/* ── KPI 스트립 (임대차 전용 배경) ── */
.strip { background: #3b0764; }

/* ── 전세가율 위험 단계 바 ── */
.rc-safe    { background: #3b82f6; }
.rc-caution { background: #d97706; }
.rc-danger  { background: #dc2626; }

.rc-label-safe    { color: #2563eb; }
.rc-label-caution { color: #b45309; }
.rc-label-danger  { color: #dc2626; }

/* ── 수평 바 차트 (전세가율 / 전세 비중 공통) ── */
.br-item { display: flex; align-items: center; gap: 10px; padding: 6px 14px;
           border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; }
.br-item:last-child { border-bottom: none; }
.br-item:hover { background: #f0fdf4; }
.br-lbl  { width: 100px; font-size: 13px; font-weight: 700; flex-shrink: 0;
           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-track { flex: 1; height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.br-fill  { height: 100%; border-radius: 6px; transition: width .3s ease; }
.br-num  { width: 52px; font-size: 13px; font-weight: 700; text-align: right; flex-shrink: 0;
           font-variant-numeric: tabular-nums; }

/* ── 갱신 프로그레스 바 ── */
.rn-bar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; width: 100%; }
.rn-seg { display: flex; align-items: center; justify-content: center;
          font-size: 12px; font-weight: 800; color: #fff; transition: flex .4s ease;
          white-space: nowrap; overflow: hidden; }
.rn-seg-up   { background: #dc2626; }
.rn-seg-flat { background: #94a3b8; }
.rn-seg-dn   { background: #3b82f6; }

.rn-legend { display: flex; gap: 16px; padding: 8px 14px; flex-wrap: wrap; }
.rn-lg-item { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
              color: #475569; }
.rn-lg-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rn-lg-dot-up   { background: #dc2626; }
.rn-lg-dot-flat { background: #94a3b8; }
.rn-lg-dot-dn   { background: #3b82f6; }

/* ── 갱신 KPI 3개 ── */
.rn-kpi-row { display: flex; gap: 0; padding: 14px; border-bottom: 1px solid var(--border); }
.rn-kpi { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 0 16px;
          border-right: 1px solid var(--border); text-align: center; }
.rn-kpi:first-child { padding-left: 0; }
.rn-kpi:last-child  { border-right: none; }
.rn-kpi-lbl { font-size: 11px; color: var(--text-faint); font-weight: 700; }
.rn-kpi-val { font-size: 20px; font-weight: 800; color: #1e293b; font-variant-numeric: tabular-nums; }
.rn-kpi-unit { font-size: 12px; color: var(--text-faint); font-weight: 600; margin-left: 2px; }

/* ── 전세 극단 TOP5/BOTTOM5 카드 ── */
.extreme-list { padding: 10px 14px; }
.extreme-item { display: flex; align-items: center; gap: 10px; padding: 9px 0;
                border-bottom: 1px solid var(--border); }
.extreme-item:last-child { border-bottom: none; }
.extreme-rank { width: 22px; height: 22px; border-radius: 50%;
                display: flex; align-items: center; justify-content: center;
                font-size: 11px; font-weight: 800; flex-shrink: 0; }
.ext-top .extreme-rank { background: #fee2e2; color: #991b1b; }
.ext-bot .extreme-rank { background: #d1fae5; color: #065f46; }
.extreme-region { flex: 1; min-width: 0; font-size: 13px; }
.extreme-name { font-weight: 700; color: #1e293b; white-space: nowrap;
                overflow: hidden; text-overflow: ellipsis; }
.extreme-parent { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.extreme-price { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
                 white-space: nowrap; flex-shrink: 0; }
.ext-top .extreme-price { color: #dc2626; }
.ext-bot .extreme-price { color: #0d9488; }

/* ── 랭킹 CTA 색상 오버라이드 ── */
.ranking-cta-jeonse {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-color: #c4b5fd; margin-bottom: 10px;
}
.ranking-cta-jeonse .ranking-cta-title { color: #4c1d95; }
.ranking-cta-jeonse .ranking-cta-desc  { color: #6d28d9; }
.ranking-cta-jeonse .ranking-cta-btn   { background: #6d28d9; }
.ranking-cta-jeonse .ranking-cta-btn:hover { background: #4c1d95; }

.ranking-cta-wolse {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fde68a;
}
.ranking-cta-wolse .ranking-cta-title { color: #451a03; }
.ranking-cta-wolse .ranking-cta-desc  { color: #92400e; }
.ranking-cta-wolse .ranking-cta-btn   { background: #d97706; }
.ranking-cta-wolse .ranking-cta-btn:hover { background: #b45309; }

/* ── 그룹 헤더 색상 오버라이드 (임대차: 에메랄드) ── */
.grp-bar-rent { background: #059669; }

/* ── 반응형 ── */
@media (max-width: 768px) {
  .rn-kpi-row { flex-wrap: wrap; gap: 8px; }
  .rn-kpi { flex: 1 1 30%; padding: 0 8px; }
  .br-lbl { width: 80px; font-size: 12px; }
  .br-num { width: 44px; font-size: 12px; }
}
@media (max-width: 580px) {
  .br-lbl { width: 64px; font-size: 11px; }
  .br-num { width: 36px; font-size: 11px; }
  .je-name { font-size: 12px; }
  .je-price { font-size: 13px; }
  .rn-kpi-val { font-size: 16px; }
  .dt th.hide-sm, .dt td.hide-sm { display: none; }
}
