/* ================================================================
   마사지로그 — UI 시스템 (ui-system.css)
   ================================================================
   이 파일은 theme.css(색상 토큰) 와 style.css(기본 레이아웃) 위에
   로드되어 컴포넌트 수준의 UI/UX 개선을 담당합니다.

   admin /admin/design 페이지에서 제어하는 --ui-* 변수에 의존합니다.
   ================================================================ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UI 시스템 기본 토큰 (관리자 페이지에서 DB 오버라이드 가능)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  /* 카드 */
  --ui-card-radius:      10px;
  --ui-card-lift:        -4px;
  --ui-shadow:           0 2px 12px rgba(13,148,136,0.09), 0 0 0 1px rgba(13,148,136,0.04);
  --ui-shadow-hover:     0 8px 28px rgba(13,148,136,0.18), 0 0 0 1.5px rgba(13,148,136,0.15);

  /* 애니메이션 */
  --ui-anim:             0.20s cubic-bezier(0.4,0,0.2,1);
  --ui-anim-bounce:      0.35s cubic-bezier(0.34,1.56,0.64,1);
  --ui-anim-img:         0.40s ease;

  /* 레이아웃 밀도 */
  --ui-grid-gap:         10px;
  --ui-density-pad:      10px;
  --ui-font-scale:       1rem;

  /* 모바일 탭바 */
  --ui-tabbar-h:         60px;
  --ui-tabbar-bg:        rgba(255,255,255,0.92);
  --ui-tabbar-blur:      blur(20px) saturate(180%);
  --ui-tabbar-border:    rgba(13,148,136,0.12);

  /* 스켈레톤 */
  --ui-skeleton-base:    #e2e8f0;
  --ui-skeleton-shine:   #f1f5f9;
  --ui-skeleton-speed:   1.4s;
}
[data-theme="dark"] {
  --ui-tabbar-bg:        rgba(7,19,17,0.92);
  --ui-skeleton-base:    #1a2e2d;
  --ui-skeleton-shine:   #0f2020;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   P1-② 업소 카드 강화 호버 애니메이션
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gl-card {
  will-change: transform, box-shadow;
  transform: translateZ(0);
  transition:
    transform   var(--ui-anim),
    box-shadow  var(--ui-anim),
    border-color var(--ui-anim);
}
.gl-card:hover {
  transform: translateY(var(--ui-card-lift));
  box-shadow: var(--ui-shadow-hover);
  border-color: var(--primary) !important;
}

/* 이미지 줌 + 오버레이 페이드 */
.gl-img-wrap img {
  transition: transform var(--ui-anim-img);
  will-change: transform;
}
.gl-card:hover .gl-img-wrap img {
  transform: scale(1.06);
}

/* 카드 내부 이름 hover 컬러 */
.gl-card:hover .gl-name {
  color: var(--primary);
  transition: color var(--ui-anim);
}

/* 카드 상단 빛 글로우 (pseudo) */
.gl-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--ui-anim);
  z-index: 1;
  pointer-events: none;
}
.gl-card:hover::before { opacity: 0.7; }

/* 그리드 갭 UI 시스템 토큰 사용 */
.gl-grid, .shop-grid {
  gap: var(--ui-grid-gap);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   P2-② 카테고리 Chip 탭바 컴포넌트
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.chip-tabbar {
  position: relative;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.chip-tabbar-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  max-width: var(--max-w);
  margin: 0 auto;
}
.chip-tabbar-inner::-webkit-scrollbar { display: none; }

/* 좌우 페이드 인디케이터 */
.chip-tabbar::before,
.chip-tabbar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}
.chip-tabbar.has-left::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-card), transparent);
  opacity: 1;
}
.chip-tabbar.has-right::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-card), transparent);
  opacity: 1;
}

/* 개별 칩 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    background var(--ui-anim-bounce),
    border-color var(--ui-anim),
    color var(--ui-anim),
    transform var(--ui-anim-bounce),
    box-shadow var(--ui-anim);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px) scale(1.02);
}
.chip.active,
.chip[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 12px rgba(13,148,136,0.30);
  transform: none;
}
.chip.active:hover { opacity: 0.9; }

/* 칩 카운트 배지 */
.chip-count {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.4;
}
.chip.active .chip-count { background: rgba(255,255,255,0.22); }
.chip:not(.active) .chip-count { background: rgba(13,148,136,0.1); color: var(--primary); }

/* 칩 아이콘 */
.chip svg { flex-shrink: 0; }

/* 특수 칩: ALL */
.chip-all {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
}
.chip-all:hover { opacity: 0.9; color: #fff; }

/* 칩 구분선 */
.chip-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
  align-self: center;
}

/* 페이지 내 칩바 (sticky) */
.chip-tabbar-sticky {
  position: sticky;
  top: var(--total-header-h, 108px);
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   P2-③ 모바일 하단 탭바 개선
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 767px) {
  .mobile-bottom-bar {
    height: var(--ui-tabbar-h);
    background: var(--ui-tabbar-bg);
    backdrop-filter: var(--ui-tabbar-blur);
    -webkit-backdrop-filter: var(--ui-tabbar-blur);
    border-top: 1px solid var(--ui-tabbar-border);
    box-shadow: 0 -1px 0 var(--ui-tabbar-border), 0 -8px 32px rgba(0,0,0,.08);
  }

  .mobile-bottom-bar a,
  .mobile-bottom-bar button {
    position: relative;
    flex: 1;
    transition:
      color var(--ui-anim),
      transform var(--ui-anim-bounce);
  }

  /* 탭 활성 애니메이션 */
  .mobile-bottom-bar a.active,
  .mobile-bottom-bar .mbb-active {
    color: var(--primary);
    transform: translateY(-1px);
  }

  .mobile-bottom-bar a:active,
  .mobile-bottom-bar button:active {
    transform: scale(0.92);
  }

  /* 활성 탭 상단 인디케이터 점 */
  .mobile-bottom-bar a.active::after,
  .mobile-bottom-bar .mbb-active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.8;
  }

  /* 탭 아이콘 활성 시 크기 변화 */
  .mobile-bottom-bar a.active svg,
  .mobile-bottom-bar .mbb-active svg {
    transform: scale(1.12);
    transition: transform var(--ui-anim-bounce);
    filter: drop-shadow(0 0 4px rgba(13,148,136,0.4));
  }

  /* 탭 라벨 스타일 */
  .mobile-bottom-bar a span,
  .mobile-bottom-bar button span {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color var(--ui-anim), font-weight var(--ui-anim);
  }
  .mobile-bottom-bar a.active span,
  .mobile-bottom-bar .mbb-active span {
    font-weight: 800;
  }

  /* 중앙 강조 버튼 개선 */
  .mobile-bottom-bar .mbb-inquiry-btn,
  .mobile-bottom-bar .mbb-upgrade-btn {
    border-radius: 14px !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15) !important;
    transition: transform var(--ui-anim-bounce), box-shadow var(--ui-anim) !important;
  }
  .mobile-bottom-bar .mbb-inquiry-btn:active,
  .mobile-bottom-bar .mbb-upgrade-btn:active {
    transform: scale(0.94) !important;
    box-shadow: none !important;
  }

  /* 탭 배지 (알림 수) */
  .mbb-badge {
    position: absolute;
    top: 4px; right: calc(50% - 14px);
    min-width: 16px; height: 16px;
    background: var(--danger, #dc2626);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 1.5px solid var(--bg-card);
    line-height: 1;
  }

  /* 탭바 높이 보정 */
  .page-wrapper,
  body {
    padding-bottom: calc(var(--ui-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   P3-① 스켈레톤 로딩 애니메이션 고도화
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* 기본 스켈레톤 */
.skeleton,
.skeleton-text,
.skeleton-img,
.skeleton-avatar,
.skeleton-btn {
  background: linear-gradient(
    90deg,
    var(--ui-skeleton-base) 25%,
    var(--ui-skeleton-shine) 50%,
    var(--ui-skeleton-base) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer var(--ui-skeleton-speed) ease-in-out infinite;
  border-radius: var(--radius-sm);
  pointer-events: none;
  user-select: none;
}

/* 카드 스켈레톤 */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--ui-card-radius);
  overflow: hidden;
}
.skeleton-card .sk-img {
  aspect-ratio: 258/198;
  width: 100%;
}
.skeleton-card .sk-img,
.skeleton-card .sk-line,
.skeleton-card .sk-badge {
  background: linear-gradient(
    90deg,
    var(--ui-skeleton-base) 25%,
    var(--ui-skeleton-shine) 50%,
    var(--ui-skeleton-base) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer var(--ui-skeleton-speed) ease-in-out infinite;
  border-radius: var(--radius-xs);
}
.skeleton-card .sk-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skeleton-card .sk-line { height: 12px; border-radius: 4px; }
.skeleton-card .sk-line-sm { height: 10px; width: 60%; }
.skeleton-card .sk-line-xs { height: 8px; width: 40%; }

/* 텍스트 스켈레톤 */
.skeleton-text {
  height: 14px;
  border-radius: 4px;
  display: block;
  width: 100%;
}
.skeleton-text.w-3\/4 { width: 75%; }
.skeleton-text.w-1\/2 { width: 50%; }
.skeleton-text.w-1\/3 { width: 33%; }

/* 아바타 스켈레톤 */
.skeleton-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}
.skeleton-avatar-sm  { width: 32px; height: 32px; }
.skeleton-avatar-md  { width: 44px; height: 44px; }
.skeleton-avatar-lg  { width: 60px; height: 60px; }

/* 버튼 스켈레톤 */
.skeleton-btn {
  height: 38px;
  border-radius: 999px;
  display: inline-block;
}

/* 이미지 스켈레톤 */
.skeleton-img { border-radius: var(--radius-md); display: block; }

/* 스켈레톤 그리드 */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--ui-grid-gap);
}
@media (max-width:860px) { .skeleton-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px) { .skeleton-grid { grid-template-columns: 1fr; } }

/* 스켈레톤 맥박 (pulse 변형) */
@keyframes skeleton-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.skeleton-pulse {
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   P3-② 다크 모드 강화
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="dark"] .gl-card {
  background: var(--bg-card);
  border-color: rgba(13,148,136,0.15);
}
[data-theme="dark"] .gl-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1.5px rgba(45,212,191,0.25);
  border-color: var(--aurora-4) !important;
}
[data-theme="dark"] .gl-card::before {
  background: var(--aurora-4);
}
[data-theme="dark"] .chip {
  background: rgba(13,148,136,0.08);
  border-color: rgba(13,148,136,0.18);
  color: var(--text-secondary);
}
[data-theme="dark"] .chip:hover {
  background: rgba(13,148,136,0.18);
  border-color: var(--primary);
  color: var(--aurora-2);
}
[data-theme="dark"] .chip-tabbar {
  border-bottom-color: rgba(13,148,136,0.12);
}
[data-theme="dark"] .mobile-bottom-bar {
  border-top-color: rgba(13,148,136,0.15);
  box-shadow: 0 -1px 0 rgba(13,148,136,0.1), 0 -8px 32px rgba(0,0,0,.4);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   마이크로 인터랙션 & 애니메이션 유틸
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 페이지 진입 */
@keyframes fadeSlideUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeScaleIn {
  from { opacity:0; transform:scale(0.95); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes slideInRight {
  from { opacity:0; transform:translateX(20px); }
  to   { opacity:1; transform:translateX(0); }
}
.anim-fade-up    { animation: fadeSlideUp 0.4s ease both; }
.anim-scale-in   { animation: fadeScaleIn 0.3s ease both; }
.anim-slide-right{ animation: slideInRight 0.35s ease both; }

/* 딜레이 유틸 */
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.10s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.20s; }
.anim-delay-5 { animation-delay: 0.25s; }
.anim-delay-6 { animation-delay: 0.30s; }

/* 호버 위아래 흔들기 (아이콘용) */
@keyframes wiggle {
  0%,100% { transform: rotate(0deg); }
  25%      { transform: rotate(-8deg); }
  75%      { transform: rotate(8deg); }
}
.hover-wiggle:hover { animation: wiggle 0.4s ease; }

/* 클릭 리플 효과 */
.ripple-effect {
  position: relative;
  overflow: hidden;
}
.ripple-effect::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.ripple-effect:active::after { opacity: 1; }

/* 글로우 펄스 */
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(13,148,136,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(13,148,136,0); }
}
.glow-pulse { animation: glow-pulse 2s ease infinite; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   밀도 모디파이어 (admin 설정으로 body에 class 추가)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* 컴팩트 */
body.density-compact {
  --ui-grid-gap:    6px;
  --ui-density-pad: 6px;
}
body.density-compact .gl-info { padding: 6px 8px 7px; }
body.density-compact .home-section { padding: 18px 0 4px; }

/* 편안 */
body.density-comfortable {
  --ui-grid-gap:    16px;
  --ui-density-pad: 16px;
}
body.density-comfortable .gl-info { padding: 12px 14px; }
body.density-comfortable .home-section { padding: 36px 0 12px; }

/* 카드 모서리 모디파이어 */
body.radius-sharp  .gl-card { border-radius: 4px !important; }
body.radius-normal .gl-card { border-radius: 8px !important; }
body.radius-round  .gl-card { border-radius: 16px !important; }
body.radius-pill   .gl-card { border-radius: 24px !important; }

/* 그림자 레벨 모디파이어 */
body.shadow-flat     .gl-card:hover { box-shadow: none !important; }
body.shadow-subtle   .gl-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08) !important; }
body.shadow-elevated .gl-card:hover { box-shadow: var(--ui-shadow-hover) !important; }
body.shadow-floating .gl-card:hover { box-shadow: 0 20px 60px rgba(13,148,136,0.25) !important; }

/* 애니메이션 속도 모디파이어 */
body.anim-none  * { transition-duration: 0s !important; animation-duration: 0s !important; }
body.anim-fast  { --ui-anim: 0.10s cubic-bezier(0.4,0,0.2,1); --transition: 0.10s cubic-bezier(0.4,0,0.2,1); }
body.anim-slow  { --ui-anim: 0.40s cubic-bezier(0.4,0,0.2,1); --transition: 0.40s cubic-bezier(0.4,0,0.2,1); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   향상된 입력 컴포넌트
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 플로팅 라벨 입력 */
.float-field {
  position: relative;
  margin-bottom: 18px;
}
.float-input {
  width: 100%;
  padding: 18px 14px 6px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--ui-anim), box-shadow var(--ui-anim);
}
.float-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}
.float-label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--ui-anim);
  transform-origin: left top;
}
.float-input:focus ~ .float-label,
.float-input:not(:placeholder-shown) ~ .float-label {
  top: 8px;
  transform: translateY(0) scale(0.78);
  color: var(--primary);
  font-weight: 600;
}

/* 토글 스위치 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background var(--ui-anim);
}
.toggle-track::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform var(--ui-anim-bounce);
}
.toggle-switch input:checked ~ .toggle-track {
  background: var(--primary);
}
.toggle-switch input:checked ~ .toggle-track::before {
  transform: translateX(20px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   향상된 배지 / 태그 컴포넌트
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-secondary{ background: var(--secondary-light); color: var(--secondary); }
.badge-success  { background: rgba(22,163,74,0.12); color: #16a34a; }
.badge-danger   { background: rgba(220,38,38,0.12); color: #dc2626; }
.badge-gold     { background: rgba(217,119,6,0.12); color: #d97706; }
.badge-solid-primary { background: var(--primary); color: #fff; }
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   향상된 섹션 헤더
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-header-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.section-title-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.section-title-v2 .accent-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-title-v2 .accent-icon svg { color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   빈 상태 (Empty State) 컴포넌트
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.empty-icon svg { color: var(--primary); }
.empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.empty-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   프로그레스 바
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.5s ease;
}
.progress-bar.lg { height: 10px; }
.progress-bar.sm { height: 4px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   툴팁 컴포넌트
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-tooltip] {
  position: relative;
  cursor: default;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--text-primary);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--ui-anim), transform var(--ui-anim);
  z-index: 999;
}
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   공통 유틸리티
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.truncate { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--ui-card-radius);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin: 16px 0;
}
.divider-text::before,
.divider-text::after {
  content:'';
  flex:1;
  height:1px;
  background:var(--border);
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* 선택 하이라이트 */
::selection { background: var(--primary-light); color: var(--primary); }
