/* drug.hospitalk.net — 커스텀 스타일 (Bootstrap 5 위) */
:root {
  --brand: #0d6efd;
  --brand-dark: #084298;
  --bg-soft: #f5f7fb;
}

html, body { font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; }
body { background: #fff; color: #212529; }

.site-header { z-index: 1030; }
.site-header .navbar-brand { font-size: 1.25rem; letter-spacing: -0.5px; }

/* 검색 */
#hdrSearch { min-width: 260px; }
.autocomplete-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid #dee2e6; border-radius: .375rem;
  max-height: 340px; overflow-y: auto; z-index: 1050;
}
.autocomplete-results .ac-group { font-size: .75rem; color: #6c757d; padding: .35rem .75rem; background: #f8f9fa; border-bottom: 1px solid #eee; text-transform: uppercase; letter-spacing: .04em; }
.autocomplete-results a.ac-item { display: block; padding: .5rem .75rem; color: #212529; text-decoration: none; border-bottom: 1px solid #f1f3f5; }
.autocomplete-results a.ac-item:hover, .autocomplete-results a.ac-item.active { background: #f1f7ff; color: var(--brand-dark); }
.autocomplete-results a.ac-item small { color: #6c757d; }

/* 메인 검색 박스 */
.hero { background: linear-gradient(135deg, #e7f1ff 0%, #f5f7fb 100%); padding: 3rem 0; border-radius: 1rem; }
.hero h1 { font-weight: 800; letter-spacing: -1px; }
.hero .form-control { font-size: 1.1rem; padding: .9rem 1.1rem; }

/* 상세 페이지 */
.detail-list dt { color: #6c757d; font-weight: 500; }
.detail-list dd { margin-bottom: .85rem; }
.code-badge { font-family: 'Consolas', monospace; background: #eef3fb; color: #084298; padding: .15rem .5rem; border-radius: .35rem; font-size: .9em; }

/* 카테고리 카드 */
.cat-card { display: block; padding: 1rem; border: 1px solid #e9ecef; border-radius: .5rem; color: #212529; text-decoration: none; transition: .15s; height: 100%; }
.cat-card:hover { border-color: var(--brand); background: var(--bg-soft); color: var(--brand-dark); }
.cat-card .ch { font-weight: 700; color: var(--brand); }

/* 사이트맵 트리 */
.sitemap-tree details { padding: .25rem 0; }
.sitemap-tree summary { cursor: pointer; padding: .35rem 0; font-weight: 500; }
.sitemap-tree ul { list-style: none; padding-left: 1.25rem; }
.sitemap-tree li { padding: .15rem 0; }

/* 풋터 */
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* 관리자 */
.admin-shell { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar { width: 220px; background: #1f2937; color: #cbd5e1; padding: 1rem 0; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: .55rem 1rem; color: #cbd5e1; text-decoration: none; border-left: 3px solid transparent; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #111827; color: #fff; border-left-color: var(--brand); }
.admin-main { flex: 1; padding: 1.5rem; background: #f8fafc; }

/* 모바일 */
@media (max-width: 991px) {
  #hdrSearch { width: 100%; min-width: 0; margin-top: .5rem; }
  .hero { padding: 2rem 1rem; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; padding: .25rem; }
  .admin-sidebar a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .admin-sidebar a.active { border-bottom-color: var(--brand); border-left: 0; }
}
