 /* ════════════════════════════════
     1. CSS 변수 및 기본 초기화 (병합됨)
  ════════════════════════════════ */
:root {
  /* 아파트/부동산 느낌을 주는 신뢰감 있는 네이비 & 블루톤 색상표 */
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-dark: #0f172a;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;

  /* 레이아웃 변수 추가 */
  --sidebar-w: 260px;
  --header-h: 64px;

  --shadow: 0 4px 24px rgba(30, 58, 138, 0.08);
  --radius: 16px;
  --transition: 0.28s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 데모 버튼들을 감싸기 위한 별도 컨테이너 (기존 body의 flex 속성 분리) */
.demo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 40px 24px;
}

/* ════════════════════════════════
   2. 공통 UI 컴포넌트 (버튼 등)
════════════════════════════════ */
.demo-buttons { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.demo-label { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 4px; }

.btn-notice {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border-radius: 10px; font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: none; transition: var(--transition);
}
.btn-notice-primary { background: var(--primary); color: white; box-shadow: 0 4px 16px rgba(30, 58, 138, 0.25); }
.btn-notice-primary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3); }
.btn-notice-accent { background: var(--accent); color: var(--primary-dark); box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25); }
.btn-notice-accent:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-notice-outline { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-notice-outline:hover { background: #eff6ff; transform: translateY(-2px); }
.btn-icon { font-size: 16px; }

/* ════════════════════════════════
   3. 모달 / 다이얼로그 (Modal Overlay)
════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25); width: 100%; max-width: 560px;
  max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; position: relative;
  transform: translateY(24px) scale(0.97); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  background: var(--primary-dark); padding: 24px 28px 20px;
  display: flex; align-items: flex-start; gap: 16px; position: relative; flex-shrink: 0;
}
.modal-header-icon {
  width: 44px; height: 44px; background: var(--primary-light); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  flex-shrink: 0; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}
.modal-header-text { flex: 1; }
.modal-header-badge {
  display: inline-block; background: var(--accent); color: var(--primary-dark);
  font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; margin-bottom: 6px;
}
.modal-title { font-size: 18px; font-weight: 900; color: white; line-height: 1.3; letter-spacing: -0.3px; }
.modal-subtitle { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; font-weight: 400; }
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 32px; height: 32px;
  background: rgba(255,255,255,0.1); border: none; border-radius: 8px; cursor: pointer;
  color: rgba(255,255,255,0.7); font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,0.2); color: white; transform: rotate(90deg); }

.modal-body { padding: 28px; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.notice-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.notice-meta-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.notice-meta-item .meta-icon { font-size: 13px; }
.notice-meta-sep { width: 1px; height: 12px; background: var(--border); }

.notice-content { font-size: 14px; line-height: 1.9; color: var(--text); }
.notice-content p { margin-bottom: 16px; }
.notice-content p:last-child { margin-bottom: 0; }

.notice-highlight { background: #eff6ff; border: 1px solid #dbeafe; border-left: 4px solid var(--primary-light); border-radius: 8px; padding: 16px 18px; margin: 20px 0; font-size: 13px; color: var(--primary); line-height: 1.7; }
.notice-highlight strong { font-weight: 800; display: block; margin-bottom: 4px; }
.notice-warning { background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px 18px; margin: 20px 0; font-size: 13px; color: #92400e; line-height: 1.7; }
.notice-warning strong { font-weight: 800; display: block; margin-bottom: 4px; }
.notice-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.modal-footer {
  padding: 20px 28px; border-top: 1px solid var(--border); display: flex;
  align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
  background: var(--bg); flex-wrap: wrap;
}
.modal-footer-left { display: flex; align-items: center; gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; user-select: none; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.modal-footer-right { display: flex; gap: 8px; }

.modal-btn { padding: 10px 22px; border-radius: 8px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; transition: var(--transition); }
.modal-btn-secondary { background: white; color: var(--text-muted); border: 1px solid var(--border); }
.modal-btn-secondary:hover { background: #f1f5f9; color: var(--text); }
.modal-btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2); }
.modal-btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }

/* 모달 바리에이션 */
.modal-overlay.warning-modal .modal-header { background: linear-gradient(135deg, #92400e, #b45309); }
.modal-overlay.warning-modal .modal-header-icon { background: var(--accent); }
.modal-overlay.warning-modal .modal-header-badge { background: #fef3c7; color: #92400e; }
.modal-overlay.info-modal .modal-header { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }

/* 다이얼로그 전용 */
.modal-overlay.dialog-overlay .modal { max-width: 420px; }
.dialog-body { padding: 32px 28px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; }
.dialog-icon-wrap { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 20px; position: relative; }
.dialog-icon-wrap::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; opacity: 0.15; }
.dialog-icon-confirm { background: #dbeafe; } .dialog-icon-confirm::after { background: var(--primary-light); }
.dialog-icon-danger { background: #fee2e2; } .dialog-icon-danger::after { background: #ef4444; }
.dialog-icon-success { background: #dcfce7; } .dialog-icon-success::after { background: #22c55e; }

.dialog-title { font-size: 18px; font-weight: 900; color: var(--text); letter-spacing: -0.4px; margin-bottom: 10px; line-height: 1.3; }
.dialog-message { font-size: 14px; color: var(--text-muted); line-height: 1.8; margin-bottom: 8px; }
.dialog-emphasis { font-size: 13px; font-weight: 700; color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 16px; margin-top: 12px; width: 100%; text-align: left; line-height: 1.6; }
.dialog-emphasis-success { font-size: 13px; font-weight: 700; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 16px; margin-top: 12px; width: 100%; text-align: left; line-height: 1.6; }

.dialog-footer { padding: 0 28px 24px; display: flex; gap: 10px; justify-content: center; }
.dialog-footer .modal-btn { flex: 1; text-align: center; padding: 12px 20px; }
.modal-btn-danger { background: #dc2626; color: white; box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25); }
.modal-btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }
.modal-btn-success { background: #16a34a; color: white; box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25); }
.modal-btn-success:hover { background: #15803d; transform: translateY(-1px); }

.modal-overlay.dialog-overlay .modal-header { background: linear-gradient(135deg, #1e3a8a, #3b82f6); padding: 18px 22px 16px; }
.modal-overlay.dialog-overlay .modal-header-icon { width: 36px; height: 36px; font-size: 18px; }
.modal-overlay.dialog-overlay .modal-title { font-size: 15px; }
.modal-overlay.dialog-overlay .modal-subtitle { font-size: 11px; }

.modal-overlay.dialog-danger .modal-header { background: linear-gradient(135deg, #7f1d1d, #dc2626); }
.modal-overlay.dialog-danger .modal-header-icon { background: #fca5a5; }
.modal-overlay.dialog-danger .modal-header-badge { background: #fee2e2; color: #7f1d1d; }
.modal-overlay.dialog-success .modal-header { background: linear-gradient(135deg, #14532d, #16a34a); }
.modal-overlay.dialog-success .modal-header-icon { background: #86efac; }
.modal-overlay.dialog-success .modal-header-badge { background: #dcfce7; color: #14532d; }


/* ════════════════════════════════
   4. 전체 레이아웃 (Header, Sidebar, Main)
════════════════════════════════ */
header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--primary-dark); display: flex; align-items: center;
  padding: 0 24px; z-index: 1000; box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.header-logo { display: flex; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; color: white; transition: opacity var(--transition); flex-shrink: 0; }
.header-logo:hover { opacity: 0.85; }
.logo-icon { width: 28px; height: 28px; background: var(--primary-light); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3); transition: transform var(--transition); flex-shrink: 0; }
.logo-icon img { width: 18px; height: 18px; object-fit: contain; }
.header-logo:hover .logo-icon { transform: translateY(-2px) scale(1.05); }
.logo-text { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.1; }
.logo-sub { font-size: 10px; font-weight: 300; opacity: 0.65; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }

.hamburger { display: none; background: none; border: none; cursor: pointer; margin-left: auto; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { display: block; width: 24px; height: 2px; background: white; border-radius: 2px; transition: var(--transition); }

.sidebar {
  position: fixed; left: 0; top: var(--header-h); bottom: 0; width: var(--sidebar-w);
  background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column;
  z-index: 900; transition: transform var(--transition); overflow-y: auto; box-shadow: 2px 0 16px rgba(30, 58, 138, 0.04);
}
.sidebar-nav { flex: 1; padding: 16px 0; }
.sidebar-label { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; padding: 8px 20px 4px; }
.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; cursor: pointer; transition: var(--transition); border-left: 3px solid transparent; font-size: 14px; font-weight: 500; color: var(--text-muted); user-select: none; }
.sidebar-item:hover { background: #f1f5f9; color: var(--primary); border-left-color: var(--primary-light); }
.sidebar-item.active { background: #eff6ff; color: var(--primary); border-left-color: var(--primary); font-weight: 700; }
.sidebar-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 20px; background: var(--bg); }
.footer-biz { font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--primary-dark); }
.footer-info { font-size: 11px; color: var(--text-muted); line-height: 1.8; }
.footer-info a { color: var(--primary-light); text-decoration: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 850; }

.main-wrap { margin-left: var(--sidebar-w); margin-top: var(--header-h); min-height: calc(100vh - var(--header-h)); transition: margin-left var(--transition); }
.screen { display: none; padding: 36px 32px 60px; animation: fadeIn .35s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }


/* ════════════════════════════════
   5. 메인 컨텐츠 영역 (홈, 서브, 디테일)
════════════════════════════════ */
.home-hero { background: linear-gradient(135deg, #4A90E2 0%, #50E3C2 100%); border-radius: var(--radius); padding: 56px 48px; color: white; margin-bottom: 40px; position: relative; overflow: hidden; }
.home-hero::before { content: ''; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; filter: blur(40px); }
.home-hero::after { content: ''; position: absolute; right: 60px; bottom: -80px; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.15); border-radius: 50%; filter: blur(30px); }
.hero-emoji { font-size: 56px; margin-bottom: 16px; }
.hero-title { font-size: clamp(28px, 4vw, 44px); font-weight: 900; line-height: 1.15; margin-bottom: 12px; letter-spacing: -1px; }
.hero-desc { font-size: 15px; opacity: 0.8; font-weight: 300; max-width: 500px; line-height: 1.7; }
.hero-badge { display: inline-block; background: var(--accent); color: var(--primary-dark); font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 4px 12px; border-radius: 20px; margin-bottom: 16px; text-transform: uppercase; }

.section-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); margin-left: 8px; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card-btn { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 20px 24px; cursor: pointer; transition: var(--transition); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow); user-select: none; position: relative; overflow: hidden; }
.card-btn::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--primary-light); transform: scaleX(0); transition: transform var(--transition); transform-origin: left; }
.card-btn:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(30, 58, 138, 0.12); border-color: var(--primary-light); }
.card-btn:hover::before { transform: scaleX(1); }
.card-btn:active { transform: translateY(-1px); }
.card-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: #eff6ff; transition: var(--transition); }
.card-btn:hover .card-icon { background: var(--primary-light); transform: scale(1.1); filter: brightness(0) invert(1); }
.card-label { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
.card-sub { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.screen-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.screen-title-wrap { display: flex; align-items: center; gap: 14px; }
.screen-title-icon { width: 48px; height: 48px; background: var(--primary-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25); }
.screen-title { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.screen-subtitle { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }

.region-bar { display: flex; gap: 12px; align-items: center; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; margin-bottom: 24px; box-shadow: var(--shadow); flex-wrap: wrap; }
.region-bar label { font-size: 13px; font-weight: 700; color: var(--primary-dark); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.region-select { border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-family: inherit; background: var(--bg); color: var(--text); cursor: pointer; outline: none; transition: var(--transition); font-weight: 500; min-width: 130px; }
.region-select:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }

#searchForm { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; align-items: center; }
.search-input { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-family: inherit; outline: none; transition: var(--transition); width: 180px; height: 35px; }
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--primary-light); background: var(--bg-card); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.search-btn { background: var(--primary); color: white; border: none; border-radius: 8px; padding: 8px 20px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.search-btn:hover { background: var(--primary-light); transform: translateY(-1px); }

/* 테이블 영역 */
.table-wrap { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--primary-dark); color: white; }
.data-table th { padding: 14px 16px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.data-table td { padding: 13px 16px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; padding: 8px; }
.page-btn { width: 36px; height: 36px; border: 1px solid var(--border); background: white; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; color: var(--text-muted); transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.page-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.loadmore-btn { display: none; width: 100%; margin-top: 20px; padding: 14px; background: white; border: 2px dashed var(--primary-light); border-radius: 12px; color: var(--primary-light); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; transition: var(--transition); text-align: center; }
.loadmore-btn:hover { background: #eff6ff; border-color: var(--primary); }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(0, 0, 0, 0.1); border-top-color: #000; border-radius: 50%; animation: spin 1s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-info { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.result-count { font-weight: 700; color: var(--primary-light); }

/* 모바일 카드 리스트 */
.mobile-card-list { display: none; }
.mobile-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.mobile-card-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.mobile-card-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.mobile-card-row span:first-child { font-weight: 500; color: var(--text); }
.mobile-date-divider { display: flex; align-items: center; margin: 24px 0 12px 0; }
.mobile-date-divider::before { content: ''; flex: 1; height: 1px; background-color: var(--border); margin-right: 12px; }
.mobile-date-divider .date-text { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; }


/* ════════════════════════════════
   6. 상세 페이지 (Detail Page)
════════════════════════════════ */
.detail-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; box-shadow: var(--shadow); }
.detail-badge { display: inline-block; background: var(--bg); color: var(--text-muted); padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; border: 1px solid var(--border); margin-bottom: 12px; }
.detail-title-group { margin-bottom: 24px; }
.detail-title-group h1 { font-size: 26px; font-weight: 900; color: var(--text); line-height: 1.3; letter-spacing: -0.5px; }
.detail-title-group .addr { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }

.detail-summary-box { background: #eff6ff; border-radius: 12px; padding: 24px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; border: 1px solid #dbeafe; }
.summary-label { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 4px; display: block; }
.summary-price { font-size: 32px; font-weight: 900; color: var(--primary-dark); }
.summary-price span { font-size: 16px; font-weight: 500; color: var(--text-muted); }

.chart-section-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.chart-info strong { color: var(--accent); font-weight: 800; font-size: 15px; }
.chart-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.date-range-picker { display: flex; align-items: center; gap: 6px; }
.date-input { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; outline: none; font-family: inherit; color: var(--text); }
.date-input:focus { border-color: var(--primary-light); }
.frequency-buttons { display: flex; gap: 6px; }
.freq-btn { background: white; border: 1px solid var(--border); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.freq-btn:hover { border-color: var(--primary-light); color: var(--primary-light); }
.freq-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.transaction-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 2px solid var(--primary-dark); margin-top: 40px; margin-bottom: 16px; }
.transaction-header-title { font-size: 18px; font-weight: 800; color: var(--text); }
.btn-excel-download { background: #10b981; color: white; border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-excel-download:hover { background: #059669; transform: translateY(-1px); }

.transaction-list { list-style: none; }
.transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 8px; border-bottom: 1px solid var(--border); transition: var(--transition); }
.transaction-item:hover { background: #f8fafc; }
.tx-info { display: flex; flex-direction: column; gap: 6px; }
.tx-date { font-size: 14px; font-weight: 700; color: var(--primary); }
.tx-details { font-size: 13px; color: var(--text-muted); }
.tx-price { font-size: 20px; font-weight: 900; color: var(--text); }
.tx-price .unit { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.load-more-container { margin-top: 24px; }


/* ════════════════════════════════
   7. 하단 푸터 (Footer)
════════════════════════════════ */
.page-footer-wrap { background: var(--primary-dark); color: rgba(255,255,255,0.85); margin-left: var(--sidebar-w); transition: margin-left var(--transition); }
.page-footer { display: flex; gap: 0; padding: 48px 40px 32px; flex-wrap: wrap; max-width: 1200px; }
.footer-col { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 200px; padding: 0 32px 0 0; }
.footer-divider { width: 1px; background: rgba(255,255,255,0.1); margin: 0 32px 0 0; align-self: stretch; }
.footer-col-title { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-top: 12px; margin-bottom: -4px; }
.footer-logo-area { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.footer-logo-icon { width: 36px; height: 36px; background: var(--primary-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; color: white; }
.footer-logo-name { font-size: 17px; font-weight: 900; color: #fff; letter-spacing: -0.3px; }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.7; }
.footer-info-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.4; margin-top: 2px; }
.footer-info-row .fi-label { font-weight: 700; color: rgba(255,255,255,0.45); font-size: 11px; white-space: nowrap; padding-top: 2px; min-width: 52px; }
.footer-info-row a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color var(--transition); }
.footer-info-row a:hover { color: var(--accent); }
.footer-nav-links { display: flex; flex-direction: column; gap: 8px; }
.footer-nav-link { font-size: 13px; color: rgba(255,255,255,0.65); cursor: pointer; transition: color var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-nav-link:hover { color: var(--accent); }
.footer-nav-link::before { content: '›'; color: var(--primary-light); font-size: 14px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 11px; color: rgba(255,255,255,0.35); flex-wrap: wrap; gap: 8px; }
.footer-bottom-right { display: flex; gap: 16px; }
.footer-bottom-link { color: rgba(255,255,255,0.35); text-decoration: none; transition: color var(--transition); }
.footer-bottom-link:hover { color: rgba(255,255,255,0.7); }
a:has(> .sidebar-item) { text-decoration: none; }


/* ════════════════════════════════
   8. 반응형 미디어 쿼리 (통합)
════════════════════════════════ */
.hide-on-pc { display: none; }
.hide-on-mobile { display: flex; }

/* 테블릿 사이즈 */
@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 모바일 사이즈 통합 (레이아웃 + 모달 반응형) */
@media (max-width: 768px) {
  /* Layout & Main */
  :root { --sidebar-w: 260px; }
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); z-index: 950; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .screen { padding: 20px 16px 80px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-btn { padding: 20px 14px 18px; }
  .card-icon { width: 48px; height: 48px; font-size: 22px; }
  .card-label { font-size: 12px; }
  .home-hero { padding: 32px 24px; }
  .hero-emoji { font-size: 40px; }
  .screen-header { flex-direction: column; align-items: flex-start; }
  .region-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .region-select, .search-input { width: 100%; }
  #searchForm { flex-direction: column; align-items: stretch; gap: 10px; }
  .search-btn { width: 100%; justify-content: center; }

  /* Tables, Cards & Pagination */
  .table-wrap { display: none; }
  .mobile-card-list { display: block; }
  .pagination { display: none; }
  .loadmore-btn { display: block; }

  /* Footer */
  .page-footer-wrap { margin-left: 0; }
  .page-footer { flex-direction: column; gap: 32px; text-align: left; padding: 32px 20px; }
  .footer-col { align-items: flex-start; padding: 0; }
  .footer-divider { display: none; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: left; align-items: flex-start; padding: 20px; }
  .footer-bottom-right { flex-wrap: wrap; gap: 12px; }

  /* Detail Page Responsive */
  .detail-card { padding: 20px; }
  .detail-summary-box { flex-direction: column; align-items: flex-start; gap: 8px; }
  .chart-section-header { flex-direction: column; align-items: flex-start; }
  .chart-controls, .date-range-picker, .frequency-buttons { width: 100%; }
  .date-input, .freq-btn { flex: 1; }
  .transaction-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-excel-download { width: 100%; }

  /* Visibility Utility Updates */
  .hide-on-pc { display: block; }
  .hide-on-mobile { display: none !important; }
}

/* 작은 모바일 사이즈 (모달 전용) */
@media (max-width: 600px) {
  .modal { max-height: 100vh; border-radius: 16px 16px 0 0; align-self: flex-end; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-footer { flex-direction: column; align-items: stretch; }
  .modal-footer-right { justify-content: stretch; }
  .modal-btn { flex: 1; text-align: center; }
  .modal-footer-left { justify-content: center; }

  /* 다이얼로그 모바일 반응형 */
  .modal-overlay.dialog-overlay { align-items: center; padding: 20px; }
  .modal-overlay.dialog-overlay .modal { border-radius: var(--radius); align-self: auto; max-height: 90vh; }
  .modal-overlay.dialog-danger { align-items: center; padding: 20px; }
  .modal-overlay.dialog-danger .modal { border-radius: var(--radius); align-self: auto; }
  .modal-overlay.dialog-success { align-items: center; padding: 20px; }
  .modal-overlay.dialog-success .modal { border-radius: var(--radius); align-self: auto; }
}
