/* portal/static/portal/css/portal.css
   ═══════════════════════════════════════════════════════════════════
   TB Genomic Portal — 통합 스타일시트
   기존 8개 파일(base, dashboard, browse_sample, gene_list,
   documentation, who_mutation, rav_browser, index)을 단일 파일로 통합.
   ═══════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   0. 디자인 토큰 — 전 페이지 공통, 여기서만 수정
   ════════════════════════════════════════════════════════════════ */
:root {
  --font:       "Inter", "Pretendard", system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", "Fira Code", "Consolas", monospace;

  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #eff4ff;
  --accent:        #8b5cf6;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;

  --who-1: #10b981;
  --who-2: #f59e0b;
  --who-3: #f97316;
  --who-4: #3b82f6;
  --who-5: #8b5cf6;

  --dr-pansusceptible: #888780;
  --dr-hrtb:           #378ADD;
  --dr-rrmdr:          #C24B1F;
  --dr-prexdr:         #7F77DD;
  --dr-other:          #1D9E75;

  --bg:          #f1f5f9;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      #e2e6ef;
  --border-light:#f1f5f9;
  --border-strong:#cdd3e0;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #718096;

  --navy:        #1e293b;
  --navy-dark:   #1e3a5f;
  --navy-border: #334155;
  --navy-muted:  #94a3b8;
  --navy-accent: #60a5fa;
  --navy-text:   #f1f5f9;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);

  --transition: all 0.2s ease;
}

/* ════════════════════════════════════════════════════════════════
   1. 기본 리셋
   ════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font) !important;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════════════════════════════
   2. 네비게이션 바
   ════════════════════════════════════════════════════════════════ */
.navbar {
  background: var(--navy) !important;
  border-bottom: 1px solid var(--navy-border) !important;
  padding: 0 !important;
  min-height: 56px;
  position: sticky !important;
  top: 0 !important;
  z-index: 1030 !important;
}
.navbar .container { min-height: 56px; align-items: stretch; }
.navbar-brand {
  font-family: var(--font) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--navy-text) !important;
  letter-spacing: 0.2px;
  padding: 0 16px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-brand::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy-accent);
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
  flex-shrink: 0;
}
.navbar-nav .nav-link {
  font-family: var(--font) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--navy-muted) !important;
  padding: 0 14px !important;
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.navbar-nav .nav-link:hover { color: var(--navy-text) !important; border-bottom-color: var(--primary); }
.navbar-nav .nav-link.active { color: var(--navy-text) !important; border-bottom-color: var(--primary); font-weight: 600 !important; }
.navbar-toggler { border-color: var(--navy-border) !important; padding: 6px 10px; }
.navbar-toggler-icon { filter: invert(1) brightness(0.8); }
@media (max-width: 991px) {
  .navbar-nav .nav-link { height: auto !important; padding: 10px 0 !important; border-bottom: none !important; border-left: 3px solid transparent; padding-left: 12px !important; }
  .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { border-left-color: var(--primary); padding-left: 16px !important; }
  .navbar-collapse { padding: 8px 0 16px; border-top: 1px solid var(--navy-border); margin-top: 0; }
}

/* ════════════════════════════════════════════════════════════════
   3. Breadcrumb
   ════════════════════════════════════════════════════════════════ */
.subheader { background: var(--surface); border-bottom: 1px solid var(--border) !important; }
.breadcrumb { margin: 0; font-size: 12px; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════
   4. 공통 카드 (gp-card)
   ════════════════════════════════════════════════════════════════ */
.gp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.gp-card:hover { box-shadow: var(--shadow-md); }

.gp-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.gp-card-header::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--primary);
  flex-shrink: 0;
}
.gp-card-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.gp-card-body { padding: 20px; }

/* ════════════════════════════════════════════════════════════════
   5. 통계 카드
   ════════════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--stat-color, var(--primary));
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-number { font-size: 28px; font-weight: 700; color: var(--stat-color, var(--primary)); line-height: 1.2; margin-bottom: 4px; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card.blue   { --stat-color: var(--primary); }
.stat-card.red    { --stat-color: var(--danger); }
.stat-card.green  { --stat-color: var(--success); }
.stat-card.purple { --stat-color: var(--accent); }
.stat-card.amber  { --stat-color: var(--warning); }
.stat-card.navy   { --stat-color: var(--navy-dark); }
.stat-card.teal   { --stat-color: #0d9488; }

/* ════════════════════════════════════════════════════════════════
   6. 페이지 헤더
   ════════════════════════════════════════════════════════════════ */
.page-header { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%); color: var(--navy-text); padding: 3rem 0; margin-bottom: 2rem; }
.page-header h1 { font-size: 28px; font-weight: 700; color: var(--navy-text); margin: 0 0 8px; }
.page-header p { font-size: 14px; color: var(--navy-muted); margin: 0; }

/* ════════════════════════════════════════════════════════════════
   7. 공통 테이블
   ════════════════════════════════════════════════════════════════ */
.gp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gp-table thead tr { background: var(--surface-2); }
.gp-table thead th {
  padding: 12px 16px; font-size: 11px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border);
  cursor: pointer; white-space: nowrap; user-select: none; transition: color 0.15s ease;
}
.gp-table thead th:hover { color: var(--primary); }
.gp-table thead th.sorted { color: var(--primary); }
.gp-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background 0.12s ease; }
.gp-table tbody tr:hover { background: var(--primary-light); }
.gp-table tbody td { padding: 12px 16px; color: var(--text-primary); vertical-align: middle; }
.gp-table .cell-link { color: var(--primary); font-weight: 600; text-decoration: none; transition: color 0.15s; }
.gp-table .cell-link:hover { color: var(--primary-dark); text-decoration: underline; }
.gp-table .cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.gp-table .cell-muted { color: var(--text-muted); }

.cell-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.cell-link:hover { color: var(--primary-dark); text-decoration: underline; }
.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.sort-icon { color: var(--primary); font-size: 11px; }

/* ════════════════════════════════════════════════════════════════
   8. 배지 — Drug Class / 내성 유형 / WHO Group 통합
   ════════════════════════════════════════════════════════════════ */
.gp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.gp-badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.gp-badge-blue   { background: #dbeafe; color: #1d4ed8; }
.gp-badge-purple { background: #ede9fe; color: #6d28d9; }
.gp-badge-green  { background: #d1fae5; color: #065f46; }
.gp-badge-amber  { background: #fef3c7; color: #92400e; }
.gp-badge-red    { background: #fee2e2; color: #991b1b; }
.gp-badge-slate  { background: #f1f5f9; color: #475569; }

.gp-badge-susceptible { background: #d1fae5; color: #065f46; }
.gp-badge-hr-tb       { background: #dbeafe; color: #1d4ed8; }
.gp-badge-rr-tb       { background: #fee2e2; color: #991b1b; }
.gp-badge-mdr-tb      { background: #fef3c7; color: #92400e; }
.gp-badge-pre-xdr     { background: #ede9fe; color: #6d28d9; }
.gp-badge-xdr-tb      { background: #fce7f3; color: #9d174d; }
.gp-badge-unknown     { background: #f1f5f9; color: #64748b; }

.gp-badge-who1 { background: #e1f5ee; color: #0f6e56; }
.gp-badge-who2 { background: #faeeda; color: #854f0b; }
.gp-badge-who3 { background: #fae0d2; color: #99431a; }
.gp-badge-who4 { background: #dbeafe; color: #1d4ed8; }
.gp-badge-who5 { background: #ede9fe; color: #6d28d9; }
.gp-badge-who1 .gp-badge-dot { background: var(--who-1); }
.gp-badge-who2 .gp-badge-dot { background: var(--who-2); }
.gp-badge-who3 .gp-badge-dot { background: var(--who-3); }
.gp-badge-who4 .gp-badge-dot { background: var(--who-4); }
.gp-badge-who5 .gp-badge-dot { background: var(--who-5); }

/* ════════════════════════════════════════════════════════════════
   9. 필터 폼
   ════════════════════════════════════════════════════════════════ */
.gp-filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.gp-filter-group { display: flex; flex-direction: column; gap: 5px; min-width: 160px; }
.gp-filter-group label { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.gp-select {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-family: var(--font); font-size: 13px; color: var(--text-primary);
  cursor: pointer; outline: none; transition: border-color 0.15s, box-shadow 0.15s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
.gp-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.gp-chip-bar { background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 0; overflow-x: auto; }
.gp-chip-bar > .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.gp-chip-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gp-chip-label { font-size: 11px; color: var(--text-muted); font-weight: 700; white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
.gp-chip {
  font-size: 11px; padding: 4px 10px; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-secondary);
  cursor: pointer; transition: all .12s; user-select: none; white-space: nowrap;
}
.gp-chip:hover { border-color: var(--primary); color: var(--primary); }
.gp-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.gp-chip-divider { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   10. 버튼
   ════════════════════════════════════════════════════════════════ */
.gp-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.gp-btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 3px rgba(37,99,235,0.3); }
.gp-btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 8px rgba(37,99,235,0.3); color: #fff; }
.gp-btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.gp-btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); border-color: var(--primary); }
.gp-btn-danger-ghost { background: transparent; color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.gp-btn-danger-ghost:hover { background: rgba(239,68,68,0.08); border-color: var(--danger); }

/* ════════════════════════════════════════════════════════════════
   11. 페이지네이션
   ════════════════════════════════════════════════════════════════ */
.gp-pagination { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 20px; border-top: 1px solid var(--border-light); }
.gp-page-btn {
  padding: 7px 12px; min-width: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-secondary); font-family: var(--font); font-size: 13px;
  font-weight: 500; cursor: pointer; transition: var(--transition); text-align: center;
}
.gp-page-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.gp-page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   12. 로딩 상태
   ════════════════════════════════════════════════════════════════ */
.gp-loading { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; }
.gp-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: gp-spin 0.75s linear infinite; }
.gp-loading-text { font-size: 14px; color: var(--text-muted); font-weight: 500; }
@keyframes gp-spin { to { transform: rotate(360deg); } }

.dash-loading-overlay { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; z-index: 100; }
.dash-loading-inner { text-align: center; }
.dash-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: gp-spin .8s linear infinite; margin: 0 auto 14px; }
.dash-loading-text { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.dash-loading-sub { font-size: 12px; color: var(--text-muted); }
.tab-loading { display: flex; align-items: center; padding: 20px 0; margin-bottom: 12px; }

/* ════════════════════════════════════════════════════════════════
   13. 빈 상태
   ════════════════════════════════════════════════════════════════ */
.gp-empty { padding: 48px 24px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ════════════════════════════════════════════════════════════════
   14. 검색바
   ════════════════════════════════════════════════════════════════ */
.search-bar { max-width: 600px; margin: 2rem auto 0; position: relative; }
.search-bar input {
  width: 100%; padding: 12px 48px 12px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-family: var(--font); font-size: 14px; color: var(--text-primary); background: var(--surface);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; box-shadow: var(--shadow-sm);
}
.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.search-bar input::placeholder { color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════
   15. Bootstrap 오버라이드
   ════════════════════════════════════════════════════════════════ */
.card { border: 1px solid var(--border) !important; border-radius: var(--radius-md) !important; box-shadow: var(--shadow-sm) !important; }
.card-header { font-weight: 600 !important; background-color: var(--surface-2) !important; border-bottom: 1px solid var(--border) !important; color: var(--text-primary) !important; font-size: 14px !important; }

/* ════════════════════════════════════════════════════════════════
   16. 푸터
   ════════════════════════════════════════════════════════════════ */
footer { background: var(--navy) !important; border-top: 1px solid var(--navy-border); color: var(--navy-muted) !important; font-size: 12px; padding: 1.5rem 0 !important; }
footer p { margin: 0; color: var(--navy-muted) !important; }

/* ════════════════════════════════════════════════════════════════
   17. 스크롤바 / 18. 접근성
   ════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ════════════════════════════════════════════════════════════════════════
   페이지별 섹션
   ════════════════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════════
   PAGE: Index (메인페이지)
   ════════════════════════════════════════════════════════════════ */
.hero-section { padding: 48px 0 32px; text-align: center; }
.hero-eyebrow { font-size: 12px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px; }
.hero-title { font-size: 32px; font-weight: 700; color: var(--text-primary); margin: 0 0 12px; }
.hero-desc { font-size: 14px; color: var(--text-secondary); max-width: 640px; margin: 0 auto 24px; line-height: 1.7; }
.hero-search-wrap { max-width: 600px; margin: 0 auto; }
.hero-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.hero-search-input {
  width: 100%; padding: 13px 100px 13px 46px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-family: var(--font); font-size: 14px; color: var(--text-primary); background: var(--surface);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; box-shadow: var(--shadow-sm);
}
.hero-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.hero-search-btn {
  position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 18px;
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.hero-search-btn:hover { background: var(--primary-dark); }
.search-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); z-index: 50; max-height: 320px; overflow-y: auto; }
.hero-quick-links { display: flex; justify-content: center; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.hero-qlink { font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none; }
.hero-qlink:hover { text-decoration: underline; }

.stats-strip { margin-bottom: 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.stat-tile-num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-tile-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; }
@keyframes gp-skeleton { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.skeleton-num, .skeleton-label { background: var(--border-light); border-radius: 4px; animation: gp-skeleton 1.2s ease infinite; }
.skeleton-num { height: 22px; width: 60%; margin: 0 auto; }
.skeleton-label { height: 11px; width: 80%; margin: 6px auto 0; }

.quick-link-btn {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  color: var(--text-primary); font-size: 13px; font-weight: 500; text-decoration: none; transition: var(--transition);
}
.quick-link-btn:last-child { margin-bottom: 0; }
.quick-link-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.quick-link-icon {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: var(--radius-sm); background: var(--primary-light); color: var(--primary); flex-shrink: 0; font-size: 14px;
}

.who-group-list { display: flex; flex-direction: column; gap: 14px; }
.who-group-item { display: flex; align-items: flex-start; gap: 10px; }
.who-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.who-group-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.who-group-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.featured-gene-list { display: flex; flex-direction: column; }
.featured-gene-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--border-light); text-decoration: none; transition: background 0.12s;
}
.featured-gene-item:hover { background: var(--surface-2); }
.gene-name-badge { background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: var(--radius-sm); flex-shrink: 0; min-width: 52px; text-align: center; }
.gene-info { flex: 1; }
.gene-mutation { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.gene-drug { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.tool-list { display: flex; flex-direction: column; }
.tool-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border-light); }
.tool-item:last-child { border-bottom: none; }
.tool-icon {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: var(--radius-sm); background: var(--primary-light); color: var(--primary);
  font-size: 16px; flex-shrink: 0;
}
.tool-info { flex: 1; }
.tool-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.tool-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

@media (max-width: 991px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ════════════════════════════════════════════════════════════════
   PAGE: Dashboard
   ════════════════════════════════════════════════════════════════ */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; border-top: 3px solid var(--border); }
.kpi-card.c1 { border-top-color: var(--primary); }
.kpi-card.c2 { border-top-color: var(--success); }
.kpi-card.c3 { border-top-color: var(--warning); }
.kpi-card.c4 { border-top-color: var(--danger); }
.kpi-card.c5 { border-top-color: #dd6b20; }
.kpi-card.c6 { border-top-color: var(--accent); }
.kpi-label { font-size: 10px; color: var(--text-muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; }
.kpi-value { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -.02em; line-height: 1; margin-bottom: 3px; }
.kpi-sub { font-size: 11px; color: var(--text-muted); }

.nav-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.nav-tab {
  padding: 10px 18px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .12s;
}
.nav-tab:hover { color: var(--text-secondary); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-section { display: none; }
.tab-section.active { display: block; }

.chart-grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.chart-grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 12px; }
.chart-grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-bottom: 12px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.chart-card-title { font-size: 12px; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.chart-card-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }

.legend-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.drug-heatmap { display: grid; gap: 5px; }
.drug-row { display: grid; grid-template-columns: 95px 1fr 44px; align-items: center; gap: 8px; }
.drug-name { font-size: 11px; color: var(--text-secondary); text-align: right; }
.drug-bar-wrap { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--border); }
.drug-bar-r { background: var(--danger); height: 100%; transition: width .4s; }
.drug-bar-s { background: var(--success); height: 100%; opacity: .7; transition: width .4s; }
.drug-pct { font-size: 11px; color: var(--text-muted); }

.gene-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.gene-table th { text-align: left; color: var(--text-muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-bottom: 1px solid var(--border); font-weight: 700; }
.gene-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
.gene-table tr:hover td { background: var(--surface-2); }
.gene-name-cell { color: var(--primary) !important; font-weight: 700; }
.mini-bar { display: inline-block; height: 3px; background: var(--primary); border-radius: 2px; vertical-align: middle; margin-left: 6px; opacity: .4; }

.qc-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.qc-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.qc-stat-label { font-size: 10px; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; font-weight: 700; }
.qc-stat-value { font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: -.02em; }
.qc-stat-unit { font-size: 12px; color: var(--text-muted); font-weight: 400; }

.donut-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.donut-legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-secondary); }
.donut-legend-left { display: flex; align-items: center; gap: 7px; }

.active-filter-bar { background: var(--primary-light); border: 1px solid #bfdbfe; border-radius: var(--radius-sm); padding: 7px 14px; margin-bottom: 14px; font-size: 12px; color: var(--primary-dark); display: none; align-items: center; gap: 8px; }
.active-filter-bar.visible { display: flex; }
.filter-clear { cursor: pointer; text-decoration: underline; margin-left: auto; }

@media (max-width: 1024px) {
  .kpi-grid       { grid-template-columns: repeat(3, 1fr); }
  .chart-grid-2-1 { grid-template-columns: 1fr; }
  .chart-grid-1-2 { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════════
   PAGE: Browse Sample
   ════════════════════════════════════════════════════════════════ */
.browse-filter-card { margin-bottom: 20px; }
.browse-header { margin-bottom: 20px; }
.browse-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.browse-desc { font-size: 13px; color: var(--text-muted); margin: 0; }
.browse-table-header {
  padding: 14px 20px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border-light); background: var(--surface-2); gap: 12px; flex-wrap: wrap;
}
.browse-total { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.browse-total-num { color: var(--primary); font-weight: 700; }


/* ════════════════════════════════════════════════════════════════
   PAGE: Gene List
   ════════════════════════════════════════════════════════════════ */
.gene-page-header { margin-bottom: 24px; }
.gene-page-header h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.gene-page-header p { font-size: 13px; color: var(--text-muted); margin: 0; }
.gene-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.gene-table-header { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }
.gene-table-title { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.gene-count-badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: 20px; font-size: 12px; font-weight: 600; }
.gene-full-name { max-width: 280px; color: var(--text-secondary); font-size: 13px; }
.gene-drug-list { font-size: 12px; color: var(--text-secondary); line-height: 1.8; }
.gene-mutation-count { font-weight: 600; color: var(--text-primary); }


/* ════════════════════════════════════════════════════════════════
   PAGE: Documentation
   ════════════════════════════════════════════════════════════════ */
.doc-layout { display: flex; gap: 28px; align-items: flex-start; }
.doc-sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 80px; }
.doc-content { flex: 1; min-width: 0; }
.doc-nav { list-style: none; padding: 0; margin: 0; }
.doc-nav-section { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); padding: 16px 0 6px; }
.doc-nav-section:first-child { padding-top: 0; }
.doc-nav a { display: block; padding: 6px 12px; font-size: 13px; color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm); border-left: 2px solid transparent; transition: var(--transition); }
.doc-nav a:hover { color: var(--primary); background: var(--primary-light); border-left-color: var(--primary); }
.doc-nav a.active { color: var(--primary); background: var(--primary-light); border-left-color: var(--primary); font-weight: 600; }
.doc-section { margin-bottom: 28px; scroll-margin-top: 80px; }
.doc-section-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.doc-section-subtitle { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 20px 0 8px; }
.doc-p { font-size: 13px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 12px; }
.doc-code { background: var(--navy); color: #a5f3fc; border-radius: var(--radius-md); padding: 16px 20px; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; overflow-x: auto; margin: 12px 0; }
.doc-endpoint { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px; background: var(--surface-2); }
.method-badge { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }
.method-get  { background: #d1fae5; color: #065f46; }
.method-post { background: #dbeafe; color: #1d4ed8; }
.endpoint-path { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); font-weight: 600; flex: 1; }
.endpoint-desc { font-size: 12px; color: var(--text-muted); }
.doc-alert { padding: 12px 16px; border-radius: var(--radius-sm); border-left: 3px solid; font-size: 13px; line-height: 1.6; margin: 12px 0; }
.doc-alert-info { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.doc-alert-warn { background: #fef9c3; border-color: var(--warning); color: #92400e; }
.doc-alert-tip  { background: #d1fae5; border-color: var(--success); color: #065f46; }
.drug-tag { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; color: var(--text-secondary); }

@media (max-width: 768px) {
  .doc-layout { flex-direction: column; }
  .doc-sidebar { width: 100%; position: relative; top: 0; }
  .doc-section-title { font-size: 16px; }
}


/* ════════════════════════════════════════════════════════════════
   PAGE: WHO Mutation Catalogue
   ════════════════════════════════════════════════════════════════ */
.who-tab-nav { border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.who-tab-nav .nav-link {
  font-family: var(--font) !important; font-size: 13px !important; font-weight: 500 !important;
  color: var(--text-muted) !important; padding: 10px 16px !important; border: none !important;
  border-bottom: 2px solid transparent !important; margin-bottom: -2px; border-radius: 0 !important; transition: var(--transition);
}
.who-tab-nav .nav-link:hover { color: var(--text-primary) !important; }
.who-tab-nav .nav-link.active { color: var(--primary) !important; border-bottom-color: var(--primary) !important; font-weight: 600 !important; background: transparent !important; }
.content-area { background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-md); min-height: 320px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
.who-grade-bar { display: flex; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 20px; }
.who-grade-segment { flex: 1; padding: 8px 12px; font-size: 11px; font-weight: 600; color: #fff; text-align: center; letter-spacing: 0.3px; }
.who-grade-segment.g1 { background: var(--who-1); }
.who-grade-segment.g2 { background: var(--who-2); }
.who-grade-segment.g3 { background: var(--who-3); }
.who-grade-segment.g4 { background: var(--who-4); }
.who-grade-segment.g5 { background: var(--who-5); }

@media (max-width: 768px) {
  .who-grade-bar { flex-direction: column; }
  .who-grade-segment { text-align: left; padding: 7px 14px; }
  .who-tab-nav .nav-link { padding: 10px 10px !important; font-size: 12px !important; }
}


/* ════════════════════════════════════════════════════════════════
   PAGE: RAV Browser
   (구 teal/IBM Plex Sans 전부 폐기 → 포탈 공통 토큰으로 재작성)
   ════════════════════════════════════════════════════════════════ */
.rav-browser {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  padding-bottom: 48px;
}
.rav-browser * { box-sizing: border-box; }

.rav-view { display: none; }
.rav-view.active { display: block; }

.rav-module-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.rav-module-tab {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.12s;
  white-space: nowrap;
  user-select: none;
}
.rav-module-tab:hover { color: var(--text-secondary); }
.rav-module-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.rav-section { margin-bottom: 28px; }
.rav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px;
}
.rav-section-label .hint { font-size: 11px; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; font-style: italic; }

.rav-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rav-form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.rav-form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.rav-field { display: flex; flex-direction: column; gap: 6px; }
.rav-field-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.rav-field-help { font-size: 11px; color: var(--text-muted); font-style: italic; }

.rav-dropdown {
  appearance: none; -webkit-appearance: none; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 28px 8px 10px; font-family: inherit; font-size: 13px; color: var(--text-primary);
  cursor: pointer; transition: border-color 0.12s; width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.rav-dropdown:hover { border-color: var(--primary); }
.rav-dropdown:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

.rav-chip-group { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); min-height: 40px; }
.rav-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-secondary); cursor: pointer; user-select: none; transition: all 0.1s;
}
.rav-chip:hover { border-color: var(--primary); color: var(--primary); }
.rav-chip.selected { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.rav-chip-group.compact .rav-chip { padding: 3px 8px; font-size: 11px; }

.rav-module-options { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; }

.rav-output-section { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.rav-output-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.rav-submit-area {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.rav-cohort-summary { font-size: 12px; color: var(--text-muted); }
.rav-cohort-summary strong { color: var(--primary); font-size: 18px; }

.rav-btn { appearance: none; border: none; cursor: pointer; font-family: var(--font); font-weight: 600; transition: all 0.12s; border-radius: var(--radius-sm); }
.rav-btn-primary { background: var(--primary); color: #fff; padding: 12px 36px; font-size: 14px; letter-spacing: 0.02em; }
.rav-btn-primary:hover { background: var(--primary-dark); }
.rav-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.rav-btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); padding: 8px 16px; font-size: 12px; font-weight: 600; }
.rav-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.rav-result-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; text-align: left; }
.rav-result-title { text-align: left; }
.rav-result-title h2 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.rav-result-title .module-tag { font-size: 11px; color: var(--primary); letter-spacing: 0.04em; }

.rav-query-echo { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; font-size: 12px; color: var(--text-secondary); text-align: left; }
.rav-query-echo dl { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; margin: 0; text-align: left; }
.rav-query-echo dt { color: var(--text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.rav-query-echo dd { margin: 0; }

.rav-figure-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 24px; margin-bottom: 16px; overflow: auto; text-align: left; }

.rav-caption { font-size: 12px; color: var(--text-secondary); background: var(--surface-2); border-left: 3px solid var(--primary); padding: 12px 16px; margin-bottom: 20px; line-height: 1.6; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; text-align: left; }
.rav-caption .caption-label { font-weight: 700; color: var(--text-primary); }

.rav-download-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.rav-dl-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-secondary);
  cursor: pointer; font-size: 12px; font-family: var(--font); transition: all 0.12s;
}
.rav-dl-btn:hover { border-color: var(--primary); color: var(--primary); }

.rav-methods-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.rav-methods-box summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-secondary); user-select: none; }
.rav-methods-box pre { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; line-height: 1.6; color: var(--text-secondary); background: var(--surface); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; white-space: pre; border: 1px solid var(--border); }

.rav-phase-badge { display: inline-block; padding: 3px 10px; background: var(--primary-light); color: var(--primary-dark); border-radius: 12px; font-size: 11px; margin-bottom: 12px; }


/* ════════════════════════════════════════════════════════════════
   PAGE: Phylogenetic Tree
   (카드는 .gp-card 공통 사용. iframe 내부 Microreact는 외부 서비스라 스타일 적용 불가)
   ════════════════════════════════════════════════════════════════ */
.phylo-iframe-wrap iframe { width: 100%; height: 800px; border: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: block; }
.phylo-note { padding: 10px 20px; font-size: 12px; color: var(--text-muted); background: var(--surface-2); border-top: 1px solid var(--border-light); }

/* ════════════════════════════════════════════════════════════════
   SEARCH — Navbar global search + results page
   ════════════════════════════════════════════════════════════════ */

/* ── Navbar search box ── */
.nav-search {
  position: relative;
  margin-left: 16px;
}
.nav-search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 0 12px;
  gap: 6px;
  height: 34px;
  width: 240px;
  transition: background .15s, border-color .15s, width .2s;
}
.nav-search-box:focus-within {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.35);
  width: 300px;
}
.nav-search-icon {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  flex-shrink: 0;
  line-height: 1;
}
.nav-search-spinner {
  display: inline-block;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.nav-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-family: var(--font);
  min-width: 0;
}
.nav-search-input::placeholder { color: rgba(255,255,255,.5); }
.nav-search-clear {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.nav-search-clear:hover { color: #fff; }

/* ── Dropdown ── */
.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  z-index: 2000;
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}
.search-group { padding: 6px 0; }
.search-group + .search-group {
  border-top: 1px solid var(--border-light);
}
.search-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.search-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background .1s;
}
.search-item:hover,
.search-item.active { background: var(--surface-2); }
.search-item-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.search-item-text mark {
  background: #fef08a;
  color: var(--text-primary);
  border-radius: 2px;
  padding: 0 1px;
}
.search-item-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.search-see-all {
  display: block;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--primary);
  border-top: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .1s;
}
.search-see-all:hover { background: var(--primary-light); }

/* ── Results page search bar ── */
.search-results-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 0 14px;
  height: 46px;
  transition: border-color .15s;
}
.search-results-bar:focus-within { border-color: var(--primary); }
.search-results-icon { font-size: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-results-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font);
  background: transparent;
  color: var(--text-primary);
  min-width: 0;
}
.search-results-input::placeholder { color: var(--text-muted); }

/* ── Result tab count badge ── */
.search-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 5px;
}

/* ── General link style ── */
.gp-link { color: var(--primary); }
.gp-link:hover { text-decoration: underline; }