/* ==============================================================================
   이커머스 상품 검색기 - 프리미엄 다크 글래스모피즘 테마
   ============================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  /* 색상 토큰 (고급 B2B 다크 모드) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.5);
  
  /* 브랜드 포인트 색상 */
  --accent-primary: #10b981;       /* 네이버/에메랄드 그린 */
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-blue: #3b82f6;          /* 테크 블루 */
  --accent-purple: #8b5cf6;        /* 인텔리전스 퍼플 */
  --accent-pink: #ec4899;
  --accent-warning: #f59e0b;       /* 주의/급상승 주황 */
  --accent-danger: #ef4444;        /* 하락 빨강 */

  /* 텍스트 색상 */
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-highlight: #34d399;

  /* 글래스모피즘 */
  --glass-blur: blur(16px);
  --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --card-radius: 14px;
  --btn-radius: 8px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ==========================================================================
   헤더 & 글로벌 네비게이션
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: var(--glass-blur);
  background: rgba(11, 15, 25, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

/* 화면 상단 중앙 로고 및 타이틀 배치 */
.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: auto;
}

.btn-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-menu-toggle:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.hamburger-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s ease;
}

.logo-group:hover {
  opacity: 0.9;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px var(--accent-glow);
  font-size: 1.25rem;
}

.logo-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #d1fae5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: #34d399;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

/* ==========================================================================
   앱 전체 레이아웃 (상시 펼침 사이드바 + 메인 본문 래퍼)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: calc(100vh - 65px);
  width: 100%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 좌측 상시 펼침 사이드바 */
.service-sidebar {
  width: 285px;
  min-width: 285px;
  max-width: 285px;
  height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  background: rgba(13, 18, 30, 0.95);
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              min-width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              visibility 0.28s ease;
  overflow: hidden;
  flex-shrink: 0;
}

/* 사이드바 접힘(숨김) 상태: 음수 마진 제거하여 본문 화면이 왼쪽으로 밀려 가려지지 않도록 수정 */
.app-layout.sidebar-collapsed .service-sidebar {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
  border-right: none !important;
  box-shadow: none;
  visibility: hidden;
}

.sidebar-header {
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-title-icon {
  font-size: 1.15rem;
}

.sidebar-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
}

/* ==========================================================================
   트리 네비게이션 스타일 (메뉴 기호 제거 및 계층별 들여쓰기)
   ========================================================================== */
.tree-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.86rem;
}

.tree-nav-item, .tree-folder-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
  position: relative;
  border: 1px solid transparent;
  gap: 8px;
}

.tree-nav-item:hover, .tree-folder-header:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transform: translateX(2px);
}

.tree-nav-item.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 700;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

/* 계층(Depth)별 들여쓰기 - 요구사항 2번 반영 */
.depth-0 {
  padding-left: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}

.depth-1 {
  padding-left: 12px;
  font-weight: 700;
  color: #f8fafc;
  font-size: 0.88rem;
}

.depth-2 {
  padding-left: 28px;
  font-weight: 600;
  color: #e2e8f0;
}

.depth-3 {
  padding-left: 44px;
  font-weight: 500;
  font-size: 0.83rem;
  color: #94a3b8;
}

.tree-item-icon {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}

.tree-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-item-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.leaf-action-badge {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 700;
}

.folder-hint-tag {
  font-size: 0.63rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.folder-toggle-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  margin-left: 4px;
}

.tree-folder, .tree-subfolder {
  display: flex;
  flex-direction: column;
}

.tree-folder-header {
  justify-content: space-between;
}

.tree-folder-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-folder:not(.open) > .tree-folder-header .folder-toggle-arrow,
.tree-subfolder:not(.open) > .tree-folder-header .folder-toggle-arrow {
  transform: rotate(-90deg);
}

.tree-folder-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-folder:not(.open) > .tree-folder-children,
.tree-subfolder:not(.open) > .tree-folder-children {
  display: none;
}

.sidebar-footer {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* ==========================================================================
   우측 메인 본문 래퍼 & 본문 상단 타이틀 바 - 요구사항 3번 반영
   ========================================================================== */
.main-content-wrapper {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow-x: hidden;
}

.page-title-bar {
  padding: 1.75rem 2.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.crumb-home {
  color: var(--accent-primary);
  font-weight: 600;
}

.crumb-sep {
  opacity: 0.4;
  font-size: 0.72rem;
}

.crumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.page-title-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 12px;
}

.page-heading {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-subheading {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 6px 0 0 0;
}

.page-title-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

/* ==========================================================================
   버튼 컴포넌트
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--btn-radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
}

/* ==========================================================================
   메인 컨테이너
   ========================================================================== */
.main-content {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 1.25rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
}

/* ==========================================================================
   AI 마켓 인텔리전스 브리핑 카드
   ========================================================================== */
.intelligence-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.75rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.intelligence-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #8b5cf6, #3b82f6);
}

.intelligence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c084fc;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
}

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.opp-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
}

.opp-box:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.opp-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.opp-kw-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.opp-score-badge {
  font-size: 0.76rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.opp-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   FR-06: 급상승 & 신규 키워드 하이라이트 위젯
   ========================================================================== */
.widget-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.surge-scroll-wrapper {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.surge-card {
  min-width: 220px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  flex-shrink: 0;
}

.surge-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px var(--accent-glow);
}

.surge-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.surge-rank {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.surge-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.surge-card-kw {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.surge-card-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   FR-03 & FR-04: 계층형 카테고리 및 다차원 필터 컨트롤 패널
   ========================================================================== */
.filter-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-select, .form-input {
  width: 100%;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--btn-radius);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.84rem;
  outline: none;
  transition: var(--transition);
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-select option {
  background: #111827;
  color: #ffffff;
}

input[type="date"] {
  color-scheme: dark;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.8);
  opacity: 0.85;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.1);
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.tag-btn {
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.tag-btn.active, .tag-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* ==========================================================================
   FR-05: 역전 Y축 시계열 차트 영역
   ========================================================================== */
.chart-container-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selected-keywords-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.kw-chip-remove {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: bold;
}
.kw-chip-remove:hover {
  color: #f87171;
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
}

/* ==========================================================================
   데이터 테이블 & 리스트
   ========================================================================== */
.table-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.table-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.data-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.data-table th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.th-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.data-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.data-table th.sortable-th:hover {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #93c5fd;
}

.data-table th.sortable-th:hover .sort-indicator {
  opacity: 0.85;
  color: #93c5fd;
}

.sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0.35;
  color: var(--text-muted);
  transition: all 0.2s ease;
  font-weight: 700;
  line-height: 1;
}

.data-table th.sortable-th.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18) !important;
}

.data-table th.sortable-th.active .sort-indicator {
  opacity: 1;
  color: #38bdf8;
  font-weight: 900;
  transform: scale(1.2);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.rank-num {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}

.badge-change-up {
  color: #34d399;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.badge-change-down {
  color: #f87171;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.badge-change-same {
  color: var(--text-muted);
}

.badge-new {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.star-btn.bookmarked {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.volume-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-bar-bg {
  width: 70px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.volume-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #3b82f6, #10b981);
  border-radius: 3px;
}

/* ==========================================================================
   페이지네이션 및 테이블 하단 컨트롤
   ========================================================================== */
.table-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.5rem 0.25rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pagination-info strong {
  color: #ffffff;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
}

.page-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 32px;
  color: var(--text-muted);
  font-size: 0.82rem;
  user-select: none;
}

/* ==========================================================================
   인라인 메모 편집 (관심 키워드)
   ========================================================================== */
.memo-cell {
  position: relative;
  min-width: 140px;
}

.memo-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px dashed transparent;
  max-width: 100%;
}

.memo-display:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(147, 197, 253, 0.4);
}

.memo-display .memo-edit-icon {
  opacity: 0;
  font-size: 0.75rem;
  transition: opacity 0.2s ease;
  color: var(--accent-primary);
}

.memo-display:hover .memo-edit-icon {
  opacity: 0.9;
}

.memo-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.78rem;
}

.memo-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.memo-inline-input {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.memo-saved-toast {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 600;
  animation: fadeInOut 1.5s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(2px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ==========================================================================
   모달 (수집 파이프라인 / 북마크)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  width: 100%;
  max-width: 680px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 70vh;
  overflow-y: auto;
}

.progress-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-val {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.terminal-log-box {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: #34d399;
  height: 200px;
  overflow-y: auto;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   카카오톡 알림 ON/OFF 토글 스위치 & 인터랙티브 뱃지
   ========================================================================== */
.status-badge.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.status-badge.clickable:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.toggle-switch-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.toggle-switch-card.is-active {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.35);
}

.toggle-switch-card.is-disabled {
  background: rgba(107, 114, 128, 0.05);
  border-color: rgba(107, 114, 128, 0.2);
}

.toggle-switch-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toggle-switch-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-switch-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.toggle-switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-switch-slider {
  position: relative;
  width: 52px;
  height: 28px;
  background-color: #374151;
  border-radius: 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.toggle-switch-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: #9ca3af;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toggle-switch-input:checked + .toggle-switch-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.toggle-switch-input:checked + .toggle-switch-slider::before {
  transform: translateX(24px);
  background-color: #ffffff;
}

.toggle-status-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  min-width: 52px;
  text-align: center;
}

.toggle-status-pill.on {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.toggle-status-pill.off {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* 북마크 탭 배너 내 미니 토글 버튼 */
.btn-toggle-kakao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-toggle-kakao.is-on {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}
.btn-toggle-kakao.is-on:hover {
  background: rgba(16, 185, 129, 0.28);
}
.btn-toggle-kakao.is-off {
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.4);
  color: #9ca3af;
}
.btn-toggle-kakao.is-off:hover {
  background: rgba(107, 114, 128, 0.3);
  color: #d1d5db;
}

/* 북마크 선택된 행 하이라이트 효과 */
tr.row-selected {
  background: rgba(16, 185, 129, 0.08) !important;
}
tr.row-selected td {
  border-bottom-color: rgba(16, 185, 129, 0.25) !important;
}

/* ==========================================================================
   클릭하여 클립보드 복사 가능한 키워드 스타일
   ========================================================================== */
.keyword-copyable {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 3px 6px;
  margin: -3px -6px;
  border-radius: 5px;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.1s ease;
  user-select: none;
}

.keyword-copyable:hover {
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-primary, #6366f1);
}

.keyword-copyable .copy-icon {
  opacity: 0;
  font-size: 0.8rem;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: scale(0.85);
  color: var(--accent-primary, #6366f1);
}

.keyword-copyable:hover .copy-icon {
  opacity: 0.9;
  transform: scale(1.05);
}

.keyword-copyable:active {
  transform: scale(0.96);
}

/* ==========================================================================
   브랜드 커넥트 전용 스타일 (스타 버튼, 제휴링크 버튼, 뱃지)
   ========================================================================== */
.bookmark-star-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}

.bookmark-star-btn:hover {
  color: #fbbf24;
  transform: scale(1.2);
}

.bookmark-star-btn.bookmarked {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.btn-bc-link {
  transition: all 0.18s ease;
  white-space: nowrap;
  font-weight: 600;
}

.btn-bc-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

/* ==========================================================================
   대표이미지 호버 확대 플로팅 프리뷰 팝오버
   ========================================================================== */
.bc-thumb-wrap {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
}

.bc-table-thumb,
.dome-table-thumb,
.bc-thumb-wrap img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  border: 1px solid var(--border-subtle) !important;
  display: block !important;
  margin: 0 auto !important;
}

.bc-previewable-thumb {
  cursor: zoom-in;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bc-previewable-thumb:hover {
  transform: scale(1.08);
  border-color: #3b82f6 !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
}

.image-hover-preview {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.75));
  will-change: transform, opacity, left, top;
}

.image-hover-preview.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.image-hover-preview .preview-card {
  width: 280px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}

.image-hover-preview .preview-img-wrap {
  width: 100%;
  height: 280px;
  background: #0b0f19;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.image-hover-preview .preview-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-hover-preview .preview-info {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.image-hover-preview .preview-brand {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-bottom: 3px;
  font-weight: 500;
}

.image-hover-preview .preview-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.image-hover-preview .preview-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 5px;
}

/* 알림 메시지 호버 플로팅 프리뷰 스타일 */
.notification-hover-preview {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94);
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.8));
  will-change: transform, opacity, left, top;
}

.notification-hover-preview.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.notification-hover-preview .notif-preview-card {
  width: 320px;
  max-width: 90vw;
  background: rgba(17, 24, 39, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.3), 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.notification-hover-preview .notif-preview-header {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.notification-hover-preview .notif-preview-sender-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #93c5fd;
}

.notification-hover-preview .notif-preview-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-hover-preview .notif-preview-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.notification-hover-preview .notif-preview-badge.unread {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.notification-hover-preview .notif-preview-badge.read {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.notification-hover-preview .notif-preview-time {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
}

.notification-hover-preview .notif-preview-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.notification-hover-preview .notif-preview-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
  word-break: break-all;
}

.notification-hover-preview .notif-preview-content {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

.notification-hover-preview .notif-preview-footer {
  padding: 8px 14px;
  background: rgba(10, 15, 29, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   회원 알림 상세 모던 팝업 스타일 (마우스 클릭 좌표 기반 플로팅)
   ========================================================================== */
.notification-detail-popup {
  position: fixed;
  z-index: 100000;
  width: 380px;
  max-width: 92vw;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.85));
  animation: notifPopFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifPopFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.notification-detail-popup .notif-detail-card {
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(59, 130, 246, 0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.35), 0 16px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.notification-detail-popup .notif-detail-header {
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(15, 23, 42, 0.8));
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-detail-popup .notif-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-detail-popup .notif-detail-bell-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.notification-detail-popup .notif-detail-main-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.3px;
}

.notification-detail-popup .notif-detail-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.notification-detail-popup .notif-detail-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  transform: rotate(90deg);
}

.notification-detail-popup .notif-detail-meta-bar {
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 6px;
}

.notification-detail-popup .notif-detail-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.notification-detail-popup .notif-detail-time {
  color: #94a3b8;
  font-size: 0.72rem;
}

.notification-detail-popup .notif-detail-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.notification-detail-popup .notif-detail-subject {
  font-size: 0.96rem;
  font-weight: 700;
  color: #60a5fa;
  line-height: 1.45;
  word-break: break-all;
  border-left: 3px solid #3b82f6;
  padding-left: 8px;
}

.notification-detail-popup .notif-detail-message {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.notification-detail-popup .notif-detail-footer {
  padding: 12px 16px;
  background: rgba(10, 15, 29, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

.notification-detail-popup .notif-detail-confirm-btn {
  width: 100%;
  height: 38px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
}

.notification-detail-popup .notif-detail-confirm-btn:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.55);
}

/* 도매꾹 상품 링크 스타일 */
.dome-product-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
  transition: color 0.15s ease, text-decoration 0.15s ease;
  display: inline-block;
  word-break: break-all;
}

.dome-product-link:hover {
  color: #60a5fa !important;
  text-decoration: underline !important;
}

/* 도매꾹 상품번호 뱃지 (클릭 시 복사) */
.dome-item-no-badge {
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(234, 88, 12, 0.15);
  color: #f97316;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  user-select: none;
  border: 1px solid rgba(234, 88, 12, 0.25);
  transition: all 0.15s ease;
}

.dome-item-no-badge:hover {
  background: rgba(234, 88, 12, 0.3);
  color: #ffedd5;
  border-color: rgba(234, 88, 12, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.dome-item-no-badge:active {
  transform: translateY(0);
}

/* 도매꾹 판매자 아이디 뱃지 (상품번호 우측 표시) */
.dome-seller-badge {
  font-size: 0.73rem;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  user-select: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dome-seller-badge:hover {
  background: rgba(148, 163, 184, 0.25);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dome-seller-badge:active {
  transform: translateY(0);
}

.dome-seller-badge .good-seller-tag {
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.12);
  padding: 0 4px;
  border-radius: 3px;
}

/* 도매꾹 키워드 뱃지 (클릭 시 복사) */
.dome-keyword-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.dome-keyword-badge:hover {
  background: rgba(168, 85, 247, 0.28);
  border-color: rgba(168, 85, 247, 0.55);
  color: #f3e8ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.25);
}

.dome-keyword-badge:active {
  transform: translateY(0);
}

/* 도매꾹 인증 우수판매자 독립 뱃지 (황금빛 강조) */
.dome-good-seller-badge {
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
  user-select: none;
}

/* 도매꾹 판매자 등급 뱃지 */
.dome-rank-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  user-select: none;
}

/* 1등급 (최우수 - 사파이어 블루) */
.dome-rank-badge.rank-1 {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* 2~3등급 (우수 - 에메랄드) */
.dome-rank-badge.rank-high {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* 일반 등급 (슬레이트) */
.dome-rank-badge.rank-normal {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* 테이블 2열 서브 헤더 바 (상품 수 카운트 & 상단 페이지네이션) */
.table-sub-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   헤더 대표이미지(아바타) & 프로필 뱃지 스타일
   ========================================================================== */
.user-profile-badge {
  transition: all 0.2s ease;
}
.user-profile-badge:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  border-color: rgba(59, 130, 246, 0.6) !important;
}
.header-user-avatar {
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.header-user-avatar:hover {
  transform: scale(1.08);
  border-color: #60a5fa !important;
}
.user-profile-badge.is-admin .header-user-avatar {
  border-color: #f59e0b !important;
}

/* 관리자 회원 관리 테이블 내 대표이미지(아바타) */
.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  background: #1e293b;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-user-avatar:hover {
  transform: scale(1.2);
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  z-index: 2;
}

/* ==========================================================================
   공지사항 게시판 스타일
   ========================================================================== */
.notice-row-pinned {
  background: rgba(239, 68, 68, 0.05) !important;
}

.notice-row-pinned:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

.notice-title-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notice-title-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.notice-badge-pinned {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.notice-badge-normal {
  display: inline-block;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  white-space: nowrap;
}

/* ==========================================================================
   회원 알림 종 아이콘 및 드롭다운 팝오버 스타일
   ========================================================================== */
.header-notification-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  transform: scale(1.05);
}

.notification-badge.pulse {
  animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
  cursor: pointer;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid #3b82f6;
}

.notification-item.unread:hover {
  background: rgba(59, 130, 246, 0.12);
}

.notification-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-item-content {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ==========================================================================
   알림 전송 모달 전용 스타일 (풀다운 가독성 및 뱃지 잘림 방지)
   ========================================================================== */
#notifFilterStatus,
#notifFilterRole {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 14px !important;
  padding-right: 24px !important;
}

#notifFilterStatus:focus,
#notifFilterRole:focus {
  border-color: #3b82f6 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

#notifFilterStatus option,
#notifFilterRole option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 8px 10px;
}

/* 회원 목록 테이블 등급 및 상태 뱃지 글자 잘림 방지 */
.notif-table-badge {
  display: inline-block !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  min-width: 66px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

/* 화면 정중앙 알림 발송 확인 모달 애니메이션 */
@keyframes notifModalScaleUp {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   시스템 로그 센터 전용 스타일
   ========================================================================== */
.log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.log-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.log-badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.log-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.log-badge-error,
.log-badge-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}

.log-source-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.log-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-row:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

.log-row.is-expanded {
  background-color: rgba(59, 130, 246, 0.08) !important;
}

.log-detail-container {
  padding: 12px 16px;
  background: #020617;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.log-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.log-traceback-code {
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.pulse-dot {
  animation: pulseLiveDot 2s infinite;
}

th[onclick] {
  transition: background-color 0.15s ease, color 0.15s ease;
}

th[onclick]:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   공통 CSV 스마트 다운로드 드롭다운 팝오버
   ========================================================================== */
.csv-download-dropdown {
  position: fixed;
  z-index: 999999;
  background: #182234;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.6), 0 6px 12px -2px rgba(0, 0, 0, 0.4);
  width: 290px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(16px);
  animation: csvDropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.csv-download-dropdown.show {
  display: flex;
}

@keyframes csvDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.csv-dropdown-header {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  padding: 6px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.csv-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary, #f8fafc);
  font-size: 0.83rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.csv-dropdown-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.csv-dropdown-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.csv-dropdown-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.csv-dropdown-item-left .icon {
  font-size: 1.05rem;
  line-height: 1;
}

.csv-dropdown-item-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #cbd5e1);
  white-space: nowrap;
}

.csv-dropdown-item:hover:not(:disabled) .csv-dropdown-item-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.csv-dropdown-item.is-selected .csv-dropdown-item-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

/* ==========================================================================
   도매꾹 상품명 & 대표이미지 AI 최적화 모달 스타일
   ========================================================================== */
.dome-ai-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.dome-ai-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dome-ai-card.active-card {
  box-shadow: 0 0 0 2px #3b82f6 !important;
  background: rgba(59, 130, 246, 0.16) !important;
}

.dome-ai-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.dome-ai-thumb:hover {
  transform: scale(1.08);
  border-color: #60a5fa !important;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.dome-ai-thumb.active-thumb {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px #3b82f6, 0 4px 12px rgba(59, 130, 246, 0.4);
}

.dome-no-custom-img:hover {
  background: rgba(168, 85, 247, 0.18) !important;
  border-color: #c084fc !important;
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

