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

:root {
  --bg-primary: #fafafa;
  --bg-secondary: #fff;
  --bg-tertiary: #f5f5f5;
  --text-primary: #222;
  --text-secondary: #666;
  --text-muted: #999;
  --border-color: #ebebeb;
  --accent-gold: #a67c52;
  --status-buy: #22c55e;
  --status-pending: #f59e0b;
  --status-no: #ef4444;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  padding-top: 0; /* app-content에서 관리 */
}

/* 앱 헤더 래퍼 (헤더 + 네비게이션) */
.app-header {
  /* static - 문서 흐름에 포함되어 app-content와 겹치지 않음 */
}

/* 앱 콘텐츠 영역 */
.app-content {
  /* static - app-header 바로 아래에서 시작 (겹침 없음) */
  min-height: calc(100vh - 140px);
}

/* 헤더 */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: static; /* app-header 내부에서는 static */
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.logo .tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* 헤더 매니저 링크 (모바일 전용) */
.header-manager-link {
  display: none;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--accent-gold);
  font-size: 18px;
  font-weight: 600;
}

.header-manager-link svg {
  color: var(--accent-gold);
}

/* 모바일에서만 표시/숨김 */
.hide-on-mobile {
  display: block;
}

.show-on-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: flex !important;
  }
}

.header-stats {
  display: flex;
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-item.buy .stat-value { color: var(--status-buy); }
.stat-item.pending .stat-value { color: var(--status-pending); }
.stat-item.no .stat-value { color: var(--status-no); }

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 라인 탭 (KREAM 스타일) */
.line-tabs-wrapper {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0; /* app-content 내부에서 상단에 sticky */
  z-index: 99;
  min-height: 110px; /* 라인탭 높이 */
}

.line-tabs-grid {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}

.line-tab-all {
  grid-row: span 2;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
}

.line-tabs-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.line-tabs-row:first-of-type {
  border-bottom: 1px solid var(--border-color);
}

.line-category-btn {
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  padding: 10px 16px;
}

.line-tabs-items {
  display: flex;
  justify-content: center;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 12px;
}

.line-tabs-items::-webkit-scrollbar {
  display: none;
}

.line-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

.line-tab:hover {
  color: var(--text-primary);
}

.line-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}

.line-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
}

.line-tab-all.active::after {
  display: none;
}

.line-tab-all.active {
  background: rgba(255, 255, 255, 0.05);
}

.tab-name {
  margin-bottom: 2px;
}

.tab-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.line-tab.active .tab-count {
  color: var(--text-secondary);
}

/* 시각화 섹션 */
.visualization-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.visualization-section.collapsed .viz-container {
  display: none;
}

.visualization-section.collapsed .viz-toggle svg {
  transform: rotate(180deg);
}

.viz-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.viz-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.viz-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.chart-container {
  min-height: 180px;
}

.viz-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.2s;
}

.viz-toggle:hover {
  background: #eee;
}

.viz-toggle svg {
  transition: transform 0.3s;
}

/* 컨테이너 */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* 필터 바 */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  position: sticky;
  top: 110px; /* line-tabs(110px) 아래 */
  background: var(--bg-primary);
  z-index: 90;
  margin: 0 -24px; /* 좌우 패딩 보정 */
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.status-chip:hover {
  border-color: #ccc;
}

.status-chip input {
  display: none;
}

.status-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-chip.buy .chip-dot { background: var(--status-buy); }
.status-chip.pending .chip-dot { background: var(--status-pending); }
.status-chip.no .chip-dot { background: var(--status-no); }

.status-chip input:not(:checked) ~ .chip-dot,
.status-chip input:not(:checked) ~ .chip-text {
  opacity: 0.35;
}

.status-chip input:checked ~ .chip-dot {
  box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 3px currentColor;
}

.status-chip.buy input:checked ~ .chip-dot { box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 3px var(--status-buy); }
.status-chip.pending input:checked ~ .chip-dot { box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 3px var(--status-pending); }
.status-chip.no input:checked ~ .chip-dot { box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 3px var(--status-no); }

/* 수정모드 토글 */
.edit-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border-color);
}

.edit-mode-label {
  font-size: 13px;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: 0.3s;
  border-radius: 22px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--status-buy);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

/* 모바일 수정모드 토글 */
.mobile-edit-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.mobile-edit-mode-desc {
  font-size: 14px;
  color: var(--text-primary);
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

#search-input {
  padding: 10px 12px 10px 38px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-secondary);
  transition: border-color 0.2s;
}

#search-input:focus {
  outline: none;
  border-color: var(--text-primary);
}

.filter-select {
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--text-primary);
}

.reset-btn {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.reset-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.desktop-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.desktop-filter-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.desktop-filter-btn svg {
  color: var(--text-muted);
}

/* 결과 헤더 */
.results-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 16px;
}

.results-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.results-count strong {
  color: var(--text-primary);
}

.results-line {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
}

/* 제품 그리드 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* 제품 카드 (KREAM 스타일) */
.product-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.product-image-wrapper {
  position: relative;
  background: #f8f8f8;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%); /* 이미지를 살짝 아래로 */
  width: 170%;
  height: 170%;
  object-fit: contain;
  object-position: center center;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 2; /* 이미지보다 위에 표시 */
}

.product-badge.buy {
  background: var(--status-buy);
  color: white;
}

.product-badge.pending {
  background: var(--status-pending);
  color: white;
}

.product-badge.no {
  background: var(--status-no);
  color: white;
}

.product-info {
  padding: 14px;
}

.product-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.product-title strong {
  font-weight: 700;
  color: var(--text-primary);
}

.product-specs {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 로딩 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 결과 없음 */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  text-align: center;
}

.no-results svg {
  margin-bottom: 16px;
  opacity: 0.3;
}

.no-results p {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* 더보기 */
.load-more-container {
  padding: 32px 0;
  text-align: center;
}

.load-more-btn {
  padding: 14px 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

/* 차트 스타일 */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.bar-label {
  width: 80px;
  flex-shrink: 0;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 20px;
  background: #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.bar-fill.buy { background: var(--status-buy); }
.bar-fill.pending { background: var(--status-pending); }
.bar-fill.no { background: var(--status-no); }
.bar-fill.default { background: #888; }

.bar-value {
  width: 40px;
  color: var(--text-muted);
  font-size: 11px;
}

/* 스택 바 차트 */
.stacked-track {
  display: flex;
  gap: 1px;
}

.stacked-track .bar-fill {
  border-radius: 0;
}

.stacked-track .bar-fill:first-child {
  border-radius: 4px 0 0 4px;
}

.stacked-track .bar-fill:last-child {
  border-radius: 0 4px 4px 0;
}

.stacked-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* 속성별 매입률 차트 - 탭 방식 */
.rate-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.rate-tab {
  padding: 8px 16px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.rate-tab:hover {
  background: var(--border-color);
}

.rate-tab.active {
  background: var(--status-buy);
  color: white;
}

.rate-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rate-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.rate-bar-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.rate-bar-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--status-buy);
}

.rate-bar-value em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}

.rate-bar-track-lg {
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
}

.rate-bar-fill-lg {
  height: 100%;
  background: linear-gradient(90deg, var(--status-buy) 0%, #16a34a 100%);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.viz-card.wide {
  grid-column: span 1;
}

.no-data {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
}

/* 도넛 차트 */
.donut-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 100%;
}

.donut-svg {
  width: 120px;
  height: 120px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.buy { background: var(--status-buy); }
.legend-dot.pending { background: var(--status-pending); }
.legend-dot.no { background: var(--status-no); }

/* 반응형 */
@media (max-width: 1024px) {
  .viz-container {
    grid-template-columns: 1fr;
  }

  .header-stats {
    gap: 16px;
  }

  .stat-value {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  /* 모바일에서 body padding 제거 및 가로 스크롤 방지 */
  html, body {
    padding-top: 0 !important;
    overflow-x: hidden;
  }

  /* 모바일에서 app-header는 static (문서 흐름에 포함) */
  .app-header {
    position: static;
  }

  /* 모바일에서 app-content - padding 불필요 (겹침 없음) */
  .app-content {
    padding-top: 0;
  }

  /* 헤더 - 스크롤 시 위로 사라짐 */
  .header {
    position: static;
    z-index: 1002; /* 드롭다운이 네비/검색바 위에 표시되도록 */
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
  }

  .header-stats {
    display: none !important;
  }

  .tagline {
    display: none;
  }

  .logo h1 {
    font-size: 20px;
  }

  /* 메인 탭 - sticky로 상단 고정 (스크롤 시 헤더가 사라지면 상단에 붙음) */
  .main-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav-inner {
    justify-content: flex-start;
    padding: 0;
    min-width: max-content;
  }

  .main-nav-tab {
    flex: 0 0 auto;
    justify-content: center;
    padding: 14px 16px;
    gap: 6px;
    min-width: 60px;
  }

  .main-nav-tab span {
    display: none;
  }

  .main-nav-tab svg {
    width: 18px;
    height: 18px;
  }

  /* content-wrapper - margin 불필요 (sticky라 문서 흐름 유지됨) */
  .content-wrapper {
    margin-top: 0;
  }

  /* 차트 섹션 숨김 */
  .visualization-section {
    display: none !important;
  }

  /* 데스크톱 필터/라인탭 숨김 */
  .filter-bar {
    display: none !important;
  }

  .line-tabs-wrapper {
    display: none !important;
  }

  /* 모바일 검색바 - sticky로 main-nav 아래 고정 */
  .mobile-search-bar {
    display: flex !important;
    position: sticky !important;
    top: 48px; /* main-nav 높이 */
    z-index: 999 !important;
    background: var(--bg-secondary);
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
  }

  /* 결과 헤더 */
  .results-header {
    padding: 8px 16px;
    margin-top: 0;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 80px;
  }

  .container {
    padding: 0;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 8px 80px;
  }

  .product-card {
    padding: 8px;
  }

  .product-image {
    width: 220%;
    height: 220%;
    transform: translate(-50%, -42%); /* 모바일에서 이미지를 더 아래로 */
  }

  /* 시계 사이즈별 이미지 위치 조정 (모바일 전용) */
  .product-image.img-pos-small {
    transform: translate(-50%, -50%); /* 28mm - 중앙 */
  }
  .product-image.img-pos-medium {
    transform: translate(-50%, -46%); /* 31mm - 살짝 위로 */
  }
  .product-image.img-pos-large {
    transform: translate(-50%, -40%); /* 40mm+ - 살짝 아래로 */
  }

  .product-name {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }

  .product-ref {
    font-size: 10px;
  }

  .product-price {
    font-size: 12px;
  }

  .product-status-badge {
    font-size: 9px;
    padding: 2px 6px;
  }
}

/* ==========================================
   메인 네비게이션
   ========================================== */

.main-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.main-nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.main-nav-tab:hover {
  color: var(--text-primary);
}

.main-nav-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}

.main-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
}

.main-nav-tab svg {
  opacity: 0.7;
}

.main-nav-tab.active svg {
  opacity: 1;
}

/* ==========================================
   로그인 영역
   ========================================== */

.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 24px;
}

.login-btn {
  padding: 10px 20px;
  background: var(--text-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.login-btn:hover {
  background: #333;
}

/* 사용자 드롭다운 */
.user-dropdown-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-btn:hover {
  background: var(--bg-tertiary);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.user-profile-btn:hover .dropdown-arrow {
  color: var(--text-primary);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1001;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 12px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
}

.dropdown-item:first-of-type {
  border-radius: 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

.dropdown-item.logout {
  color: var(--status-no);
}

.dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dropdown-item svg {
  flex-shrink: 0;
}

/* ==========================================
   모달 공통 스타일
   ========================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  overflow-y: auto;
  padding: 20px 0;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 400px;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* 시계 상세 모달 */
#watch-detail-modal {
  align-items: flex-start;
  z-index: 1100 !important; /* 네비게이션(1000) 위에 표시 */
}

.watch-detail-content {
  max-width: 600px;
  width: 95%;
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
}

/* 히어로 섹션 (이미지 + 오버레이) */
.watch-detail-hero {
  position: relative;
  background: #f5f5f5;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.watch-detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 20px;
}

.watch-detail-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  color: white;
}

.watch-detail-overlay-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.watch-detail-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
}

.watch-detail-badge.buy {
  background: rgba(34, 197, 94, 0.95);
  color: white;
}

.watch-detail-badge.pending {
  background: rgba(234, 179, 8, 0.95);
  color: white;
}

.watch-detail-badge.no {
  background: rgba(239, 68, 68, 0.95);
  color: white;
}

.watch-detail-title-line {
  font-size: 18px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}

.watch-detail-summary {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* 스펙 섹션 */
.watch-detail-specs-section {
  padding: 16px 20px;
  background: var(--bg-primary);
}

.watch-detail-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.specs-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.specs-toggle-btn:hover {
  background: var(--bg-tertiary);
}

.specs-toggle-btn svg {
  transition: transform 0.2s;
}

.specs-toggle-btn.expanded svg {
  transform: rotate(180deg);
}

.watch-detail-specs {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.watch-detail-specs.expanded {
  display: flex;
}

.watch-detail-spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spec-label {
  font-size: 13px;
  color: var(--text-muted);
}

.spec-value {
  font-size: 14px;
  color: var(--text-primary);
  text-align: right;
}

/* 동일 라인 다른 모델 */
.related-models-section {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border-color);
}

.related-models-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.related-models-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.related-models-list::-webkit-scrollbar {
  height: 4px;
}

.related-models-list::-webkit-scrollbar-track {
  background: transparent;
}

.related-models-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.related-model-item {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s, transform 0.2s;
}

.related-model-item:hover {
  border-color: var(--text-muted);
  transform: scale(1.05);
}

.related-model-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  #watch-detail-modal {
    align-items: flex-start;
    padding: 10px;
  }

  .watch-detail-content {
    width: 100%;
    max-height: 90vh; /* 높이 줄여서 스크롤 방지 */
    margin: 0;
    border-radius: 16px;
  }

  .watch-detail-hero {
    border-radius: 16px 16px 0 0;
    min-height: 40vh; /* 높이 줄임 */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .watch-detail-image {
    transform: scale(1.7); /* 이미지 더 확대 */
    transform-origin: center center;
  }

  .watch-detail-title-line {
    font-size: 16px;
  }

  .watch-detail-summary {
    font-size: 12px;
  }

  .watch-detail-overlay {
    padding: 30px 14px 12px;
  }

  .watch-detail-badge {
    top: 12px;
    left: 12px;
    padding: 6px 12px; /* 패딩 늘림 */
    font-size: 13px; /* 폰트 크기 키움 */
  }

  .watch-detail-specs-section {
    padding: 14px;
  }

  .watch-detail-price {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .related-models-section {
    padding: 16px;
  }

  .related-models-title {
    font-size: 14px;
  }

  .related-model-item {
    width: 60px;
    height: 60px;
  }
}

/* 내 정보 모달 */
.my-info-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.my-info-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.my-info-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
}

.my-info-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.my-info-email {
  font-size: 12px;
  color: var(--text-muted);
}

.my-info-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.my-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.my-info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.my-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.my-info-status.approved {
  color: var(--status-buy);
}

.my-info-status.pending {
  color: var(--status-pending);
}

.my-info-status.rejected {
  color: var(--status-no);
}

/* 내 정보 - 매니저 섹션 */
.my-info-manager-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.my-info-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* 내 정보 - 최근 테스트 섹션 */
.my-info-tests {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.my-info-tests-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.my-info-tests-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.my-info-test-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  gap: 10px;
}

.my-info-test-item .test-line-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
}

.my-info-test-item .test-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--status-buy);
}

.my-info-test-item .test-date {
  font-size: 11px;
  color: var(--text-muted);
}

.my-info-no-tests {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.my-info-stats-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.my-info-stats-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* 로그인 모달 */
.login-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.google-login-btn:hover {
  background: var(--bg-tertiary);
}

.google-signup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--accent-gold);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.google-signup-btn:hover {
  background: #c9a227;
}

.login-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* 회원가입 초대코드 입력 폼 */
.invite-code-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invite-code-form .invite-code-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  box-sizing: border-box;
}

.invite-code-form .invite-code-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.invite-code-form .form-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.invite-code-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.invite-back-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.invite-back-btn:hover {
  background: var(--bg-secondary);
}

.invite-next-btn {
  flex: 1;
  padding: 12px;
  background: var(--accent-gold);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.invite-next-btn:hover {
  background: #c9a227;
}

/* ==========================================
   테스트 모드 버튼
   ========================================== */

.tabs-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.test-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  margin-left: auto;
  background: var(--accent-gold);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.test-mode-btn:hover {
  background: #8a6543;
}

.test-mode-btn.active {
  background: var(--text-primary);
}

/* ==========================================
   테스트 섹션
   ========================================== */

.test-section {
  background: var(--bg-secondary);
  min-height: calc(100vh - 73px);
}

.test-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* 테스트 유형 선택 화면 */
.test-type-select {
  text-align: center;
}

.test-type-select h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.test-type-select p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.test-type-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.test-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.test-type-btn:hover {
  border-color: var(--accent-gold);
  background: var(--bg-tertiary);
}

.test-type-btn:hover .test-type-icon {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.test-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  color: var(--accent-gold);
}

.test-type-icon svg {
  width: 28px;
  height: 28px;
}

.test-type-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.test-type-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 테스트 시작 화면 */
.test-start {
  text-align: center;
}

.test-start h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.test-start p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.test-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.test-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.test-option input {
  display: none;
}

.test-option:has(input:checked) {
  background: var(--text-primary);
  color: white;
}

.start-test-btn {
  padding: 16px 48px;
  background: var(--accent-gold);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.start-test-btn:hover {
  background: #8a6543;
}

/* 테스트 진행 화면 */
.test-header {
  margin-bottom: 24px;
}

.test-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.test-progress-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gold);
  transition: width 0.3s;
}

.test-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.test-image-wrapper {
  aspect-ratio: 1;
  max-width: 390px;
  margin: 0 auto 10px;
  background: #f8f8f8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.test-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.test-info {
  text-align: center;
}

.test-line {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.test-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.test-model {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.test-price {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.test-material {
  font-size: 11px;
  color: var(--text-secondary);
}

/* 선택 버튼 */
.test-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--text-secondary);
}

.choice-btn:disabled {
  cursor: default;
}

.choice-btn.buy:hover:not(:disabled), .choice-btn.buy.selected {
  border-color: var(--status-buy);
  background: rgba(34, 197, 94, 0.1);
}

.choice-btn.pending:hover:not(:disabled), .choice-btn.pending.selected {
  border-color: var(--status-pending);
  background: rgba(245, 158, 11, 0.1);
}

.choice-btn.no:hover:not(:disabled), .choice-btn.no.selected {
  border-color: var(--status-no);
  background: rgba(239, 68, 68, 0.1);
}

.choice-icon {
  font-size: 24px;
  font-weight: 700;
}

.choice-btn.buy .choice-icon { color: var(--status-buy); }
.choice-btn.pending .choice-icon { color: var(--status-pending); }
.choice-btn.no .choice-icon { color: var(--status-no); }

/* 피드백 표시 */
.choice-btn.correct {
  border-color: var(--status-buy) !important;
  background: rgba(34, 197, 94, 0.15) !important;
}

.choice-btn.wrong {
  border-color: var(--status-no) !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

/* 스펙 테스트 영역 */
.spec-test-area {
  margin-top: 24px;
}

.spec-question-type {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 16px;
}

.spec-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.spec-choice-btn {
  padding: 16px 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.spec-choice-btn:hover:not(:disabled) {
  border-color: var(--accent-gold);
  background: var(--bg-tertiary);
}

.spec-choice-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.spec-choice-btn.correct {
  border-color: var(--status-buy) !important;
  background: rgba(34, 197, 94, 0.15) !important;
  color: var(--status-buy);
}

.spec-choice-btn.wrong {
  border-color: var(--status-no) !important;
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--status-no);
}

/* 스펙 테스트 결과 스타일 */
.result-item.spec-result .result-item-specs {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
}

.result-item.spec-result .result-item-specs span {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-tertiary);
}

.result-item.spec-result .result-item-specs span.correct {
  color: var(--status-buy);
}

.result-item.spec-result .result-item-specs span.wrong {
  color: var(--status-no);
}

/* 테스트 결과 화면 */
.test-result {
  text-align: center;
}

.test-result h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.result-score {
  margin-bottom: 12px;
}

.score-value {
  font-size: 64px;
  font-weight: 700;
  color: var(--accent-gold);
}

.score-total {
  font-size: 32px;
  color: var(--text-muted);
}

.result-grade {
  font-size: 18px;
  font-weight: 600;
  padding: 8px 24px;
  background: var(--bg-tertiary);
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 32px;
}

.result-details {
  margin-bottom: 32px;
  text-align: left;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.result-item.correct {
  border-left: 3px solid var(--status-buy);
}

.result-item.wrong {
  border-left: 3px solid var(--status-no);
}

.result-item-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: white;
  border-radius: 6px;
}

.result-item-info {
  flex: 1;
}

.result-item-title {
  font-size: 13px;
  font-weight: 500;
}

.result-item-answer {
  font-size: 11px;
  color: var(--text-muted);
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.retry-btn, .view-stats-btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-btn {
  background: var(--accent-gold);
  color: white;
  border: none;
}

.retry-btn:hover {
  background: #8a6543;
}

.view-stats-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.view-stats-btn:hover {
  background: var(--bg-tertiary);
}

/* ==========================================
   통계 모달
   ========================================== */

.stats-modal-content {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stats-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stats-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.stats-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stats-section {
  margin-bottom: 24px;
}

.stats-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.line-stats-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-stat-name {
  width: 100px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.line-stat-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.line-stat-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 4px;
}

.line-stat-value {
  width: 50px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.wrong-models-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wrong-model-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  transition: all 0.2s;
}

.wrong-model-item.clickable {
  cursor: pointer;
}

.wrong-model-item.clickable:hover {
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.wrong-model-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: white;
  border-radius: 6px;
}

.wrong-model-info {
  flex: 1;
}

.wrong-model-name {
  font-size: 13px;
  font-weight: 500;
}

.wrong-model-line {
  font-size: 11px;
  color: var(--text-muted);
}

.wrong-model-count {
  font-size: 12px;
  color: var(--status-no);
  font-weight: 600;
}

.recent-tests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-test-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.recent-test-date {
  font-size: 12px;
  color: var(--text-muted);
}

.recent-test-line {
  font-size: 12px;
  color: var(--text-secondary);
}

.recent-test-score {
  font-size: 14px;
  font-weight: 600;
}

.empty-message {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

/* ==========================================
   관리자 컨트롤
   ========================================== */

.admin-status-control {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  justify-content: center;
}

.status-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-btn span {
  display: block;
}

.status-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 매입 버튼 - 원형 */
.status-btn.buy {
  border-color: var(--status-buy);
}

.status-btn.buy span {
  width: 12px;
  height: 12px;
  border: 2px solid var(--status-buy);
  border-radius: 50%;
  background: transparent;
}

.status-btn.buy:hover,
.status-btn.buy.active {
  background: var(--status-buy);
  border-color: var(--status-buy);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.status-btn.buy:hover span,
.status-btn.buy.active span {
  border-color: #fff;
}

/* 검토 버튼 - 삼각형 */
.status-btn.pending {
  border-color: var(--status-pending);
}

.status-btn.pending span {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid var(--status-pending);
  margin-top: -2px;
}

.status-btn.pending:hover,
.status-btn.pending.active {
  background: var(--status-pending);
  border-color: var(--status-pending);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.status-btn.pending:hover span,
.status-btn.pending.active span {
  border-bottom-color: #fff;
}

/* 불가 버튼 - X자 */
.status-btn.no {
  border-color: var(--status-no);
}

.status-btn.no span {
  position: relative;
  width: 12px;
  height: 12px;
}

.status-btn.no span::before,
.status-btn.no span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: var(--status-no);
  border-radius: 1px;
}

.status-btn.no span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.status-btn.no span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.status-btn.no:hover,
.status-btn.no.active {
  background: var(--status-no);
  border-color: var(--status-no);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.status-btn.no:hover span::before,
.status-btn.no:hover span::after,
.status-btn.no.active span::before,
.status-btn.no.active span::after {
  background: #fff;
}

/* ==========================================
   통계 페이지
   ========================================== */

.stats-section {
  background: var(--bg-primary);
  min-height: calc(100vh - 130px);
  padding: 40px 24px;
}

.stats-container {
  max-width: 900px;
  margin: 0 auto;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.stats-page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.stats-reset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.stats-reset-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-no);
  border-color: var(--status-no);
}

.stats-reset-btn svg {
  flex-shrink: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.stats-panel {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
}

.stats-panel.full-width {
  grid-column: 1 / -1;
}

.stats-panel h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* 로그인 필요 메시지 */
.login-required {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.login-required-btn {
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--text-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.login-required-btn:hover {
  background: #333;
}

/* ==========================================
   반응형 - 테스트 및 모달
   ========================================== */

@media (max-width: 768px) {
  .user-area {
    margin-left: 12px;
  }

  .user-name,
  .dropdown-arrow {
    display: none;
  }

  .user-profile-btn {
    padding: 4px;
    border-radius: 50%;
  }

  .user-dropdown {
    right: -12px;
    width: 220px;
  }

  .test-choices {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .choice-btn {
    flex-direction: row;
    justify-content: center;
    padding: 16px;
  }

  .stats-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .tabs-container {
    padding: 0 16px;
  }

  .test-mode-btn span {
    display: none;
  }

  .test-mode-btn {
    padding: 10px;
  }

  .test-container {
    padding: 24px 16px;
    margin-top: 0; /* app-content에서 관리 */
  }

  .test-section {
    min-height: calc(100vh - 60px);
  }

  .modal-content {
    padding: 24px;
    margin: 16px;
  }
}

/* ==========================================
   프로필 입력 모달 스타일
   ========================================== */

#profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#profile-modal .modal-content {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.modal-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  font-size: 14px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input.invite-code-display {
  background: var(--bg-tertiary);
  color: var(--accent-gold);
  font-weight: 600;
  text-align: center;
  letter-spacing: 2px;
  cursor: not-allowed;
}

.submit-profile-btn {
  margin-top: 8px;
  padding: 14px 24px;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-profile-btn:hover {
  background: #8b6541;
}

.submit-profile-btn:active {
  transform: scale(0.98);
}

/* 폼 힌트 스타일 */
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 약관 동의 체크박스 */
.terms-agree-group {
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.2);
}

.checkbox-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.terms-link {
  color: var(--accent-gold);
  text-decoration: underline;
}

.terms-link:hover {
  color: #8b6541;
}

/* 초대코드 표시 스타일 */
.invite-code-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-top: 8px;
}

.invite-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

.copy-code-btn {
  padding: 6px 12px;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.copy-code-btn:hover {
  background: #8b6541;
}

.copy-code-btn.copied {
  background: #27ae60;
}

/* 소속 매니저 표시 */
.manager-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-top: 8px;
}

.manager-info-icon {
  font-size: 16px;
}

.manager-info-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================
   승인 대기 화면 스타일
   ========================================== */

.pending-approval-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.pending-approval-content {
  text-align: center;
  padding: 48px;
  max-width: 400px;
}

.pending-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.pending-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pending-message {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.pending-logout-btn {
  padding: 12px 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.pending-logout-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

/* ==========================================
   로그인 필요 화면 스타일
   ========================================== */

.login-required-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.login-required-content {
  text-align: center;
  padding: 48px;
  max-width: 400px;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.login-required-icon {
  margin-bottom: 24px;
  color: var(--accent-gold);
}

.login-required-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.login-required-message {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.login-required-btn {
  padding: 14px 32px;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.login-required-btn:hover {
  background: #8b6541;
}

.login-required-btn:active {
  transform: scale(0.98);
}

/* ==========================================
   관리자 페이지 스타일
   ========================================== */

.admin-section {
  min-height: calc(100vh - 200px);
  padding: 24px;
  background: var(--bg-primary);
}

.admin-container {
  max-width: 800px;
  margin: 0 auto;
}

.admin-page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.admin-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.admin-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab:hover {
  background: var(--bg-secondary);
}

.admin-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-tab .badge {
  background: var(--status-pending);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* 회원 필터 바 */
.admin-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.admin-filter-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-filter-right {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 300px;
}

.admin-filter-select {
  padding: 10px 32px 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  min-width: 160px;
}

.admin-filter-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.admin-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-search-box .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

#admin-search-input {
  padding: 10px 12px 10px 38px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-secondary);
  transition: border-color 0.2s;
}

#admin-search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* 매입 데이터 소스 선택기 */
.data-source-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.data-source-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

#data-source-select {
  padding: 10px 32px 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  min-width: 180px;
}

#data-source-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.data-source-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 개선된 컴팩트 카드 */
.admin-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

/* 좌측: 프로필 영역 */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  flex-shrink: 0;
}

.admin-user-card .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-user-card .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-primary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-card .user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-user-card .user-phone {
  font-size: 12px;
  color: var(--text-muted);
}

/* 등급 배지 */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.role-badge.member {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.role-badge.dealer {
  background: rgba(166, 124, 82, 0.15);
  color: var(--accent-gold);
}

.role-badge.sub_manager {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.role-badge.manager {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.role-badge.owner {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

/* 중간: 메타 정보 영역 */
.user-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 120px;
  max-width: 180px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.meta-label {
  color: var(--text-muted);
  min-width: 28px;
}

.meta-value {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-value.highlight {
  color: var(--accent-gold);
}

.meta-value.empty {
  color: var(--text-muted);
  font-style: italic;
}

/* 우측: 액션 영역 */
.admin-user-card .user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* 컴팩트 드롭다운 */
.role-select.compact,
.manager-select.compact {
  padding: 6px 10px;
  font-size: 12px;
  min-width: 80px;
  max-width: 110px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.role-select.compact:focus,
.manager-select.compact:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* 컴팩트 액션 버튼 */
.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.action-btn.approve {
  background: var(--status-buy);
  color: #fff;
}

.action-btn.approve:hover {
  background: #1db954;
}

.action-btn.reject {
  background: var(--status-no);
  color: #fff;
}

.action-btn.reject:hover {
  background: #dc2626;
}

/* 관리자 회원 카드 반응형 */
@media (max-width: 768px) {
  .admin-user-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .user-profile {
    min-width: auto;
    width: 100%;
  }

  .user-meta {
    max-width: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .admin-user-card .user-actions {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .role-select.compact,
  .manager-select.compact {
    flex: 1;
    min-width: 100px;
    max-width: none;
  }

  .action-btn {
    flex: 1;
    text-align: center;
  }
}

.action-btn.delete {
  background: #7f1d1d;
  color: #fff;
}

.action-btn.delete:hover {
  background: #991b1b;
}

/* 기존 버튼 호환성 유지 */
.approve-btn {
  padding: 8px 16px;
  background: var(--status-buy);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.approve-btn:hover {
  background: #1db954;
}

.reject-btn {
  padding: 8px 16px;
  background: var(--status-no);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.reject-btn:hover {
  background: #dc2626;
}

.empty-user-list {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

/* 매니저 관리 섹션 */
.manager-management-section {
  margin-top: 20px;
}

.manager-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manager-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.manager-card .manager-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.manager-card .manager-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manager-card .manager-info {
  flex: 1;
}

.manager-card .manager-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.manager-card .manager-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.manager-card .manager-member-count {
  font-size: 12px;
  color: var(--accent-gold);
}

.manager-card .manager-chat-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 200px;
}

.manager-chat-link label {
  font-size: 12px;
  color: var(--text-muted);
}

.manager-chat-link input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

.manager-chat-link input::placeholder {
  color: var(--text-muted);
}

.manager-chat-link input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.save-chat-link-btn {
  padding: 8px 16px;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.save-chat-link-btn:hover {
  background: #8b6642;
}

@media (max-width: 768px) {
  .manager-card {
    flex-direction: column;
    text-align: center;
  }

  .manager-card .manager-chat-link {
    width: 100%;
    min-width: auto;
  }
}

/* 등급 선택 드롭다운 */
.role-selector {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.role-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  min-width: 100px;
  transition: border-color 0.2s;
}

.role-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.role-select:hover {
  border-color: var(--accent-gold);
}

/* 사용자 등급 표시 */
.user-role {
  font-size: 12px;
  color: var(--accent-gold);
  margin-top: 6px;
}

.user-role strong {
  font-weight: 600;
}

/* 관리자 탭 네비게이션 */
#nav-admin {
  display: none;
}

/* 반응형 - 관리자 페이지 */
@media (max-width: 768px) {
  .admin-user-card {
    flex-direction: column;
    text-align: center;
  }

  .admin-user-card .user-actions {
    width: 100%;
    justify-content: center;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .admin-tab {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .admin-section {
    padding: 16px;
  }

  .admin-page-title {
    font-size: 22px;
  }

  .admin-tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .approve-btn,
  .reject-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  #profile-modal .modal-content {
    padding: 24px;
    margin: 16px;
  }
}

/* ==========================================
   계산기 섹션
   ========================================== */

.calc-section {
  background: var(--bg-secondary);
  min-height: calc(100vh - 140px);
  box-sizing: border-box;
}

.calc-section .calc-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 24px;
}

.calc-container {
  text-align: center;
}

.calc-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.calc-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.calc-input-panel {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 24px;
  border: 2px solid var(--border-color);
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

/* 계산기 결과 모달 */
.calc-result-modal-content {
  max-width: 400px;
  width: 90%;
}

.calc-result-modal-content .calc-result-items {
  margin-top: 16px;
}

.calc-result-modal-content .calc-result-total {
  margin-top: 16px;
}

.calc-input-group {
  margin-bottom: 16px;
}

.calc-input-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.calc-input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 16px;
  box-sizing: border-box;
}

.calc-input-group input:focus {
  outline: none;
  border-color: #22c55e;
}

.calc-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.1s;
}

.calc-btn:hover {
  transform: translateY(-2px);
}

.calc-btn:active {
  transform: scale(0.98);
}

.calc-result-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.result-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.result-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.calc-result-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  margin-top: 16px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.total-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.total-value {
  font-size: 24px;
  font-weight: 700;
  color: #22c55e;
}

.calc-formula {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 13px;
}

.formula-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.formula-content {
  color: var(--text-muted);
  line-height: 1.6;
  font-family: monospace;
}

@media (max-width: 768px) {
  .calc-container {
    padding: 20px;
    margin-top: 0; /* app-content에서 관리 */
  }

  .calc-title,
  .calc-subtitle {
    display: none !important; /* 모바일에서 타이틀 숨김 */
  }

  .calc-input-panel {
    max-width: none;
  }

  .total-value {
    font-size: 20px;
  }
}

/* ==========================================
   히스토리 섹션
   ========================================== */

.history-section {
  background: var(--bg-secondary);
  min-height: calc(100vh - 140px);
  box-sizing: border-box;
}

.history-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.history-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.history-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-align: center;
}

.history-filter {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.history-filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.history-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-filter-group.search {
  flex: 1;
  min-width: 200px;
}

.history-filter-group label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.history-filter-group select,
.history-filter-group input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
}

.history-filter-group select:focus,
.history-filter-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.history-empty svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.history-empty p {
  font-size: 14px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.history-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}

.history-item-info {
  flex: 1;
  min-width: 0;
}

.history-item-model {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-number {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.history-item-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.history-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.history-status-badge.buy {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.history-status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.history-status-badge.no {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.history-arrow {
  color: var(--text-muted);
}

.history-item-meta {
  text-align: right;
  flex-shrink: 0;
}

.history-item-user {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.history-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.history-load-more {
  text-align: center;
  margin-top: 24px;
}

.history-load-more-btn {
  padding: 12px 32px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-load-more-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

@media (max-width: 768px) {
  .history-title,
  .history-subtitle {
    display: none !important; /* 모바일에서 타이틀 숨김 */
  }

  .history-container {
    padding: 0 0 80px 0;
  }

  /* 모바일 히스토리 필터 - 메인탭과 동일한 스타일 */
  .history-filter {
    position: fixed;
    top: 116px; /* 헤더(60px) + 네비(48px) + 간격(8px) */
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-secondary);
    border-radius: 0;
    padding: 10px 16px;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
  }

  .history-filter-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  /* 기간/상태 드롭다운 숨김 */
  .history-filter-group:not(.search) {
    display: none !important;
  }

  .history-filter-group.search {
    flex: 1;
    min-width: auto;
  }

  .history-filter-group.search label {
    display: none;
  }

  .history-filter-group.search input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px 10px 36px;
  }

  /* 히스토리 목록 - 필터바 아래 시작 */
  .history-list {
    margin-top: 70px; /* 필터바 높이 */
    padding: 16px;
  }

  .history-item {
    flex-wrap: wrap;
    gap: 12px;
  }

  .history-item-image {
    width: 50px;
    height: 50px;
  }

  .history-item-meta {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }
}

/* 모바일 히스토리 필터 버튼 */
.history-filter-btn {
  display: none;
}

@media (max-width: 768px) {
  .history-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
  }

  .history-filter-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================
   팀 리포트 섹션
   ========================================== */

.report-section {
  background: var(--bg-secondary);
  min-height: calc(100vh - 140px);
  box-sizing: border-box;
}

.report-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.report-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.report-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-align: center;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.report-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.report-summary-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(166, 124, 82, 0.1);
  border-radius: 12px;
  color: var(--accent-gold);
}

.report-summary-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.report-summary-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.report-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.report-section-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.report-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.report-export-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.report-team-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.report-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.report-empty svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.report-member-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.report-member-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.report-member-rank.top-1 {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #fff;
}

.report-member-rank.top-2 {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #fff;
}

.report-member-rank.top-3 {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: #fff;
}

.report-member-info {
  flex: 1;
  min-width: 0;
}

.report-member-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.report-member-role {
  font-size: 12px;
  color: var(--text-muted);
}

.report-member-stats {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

.report-stat {
  text-align: center;
}

.report-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.report-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.report-member-score {
  width: 80px;
  flex-shrink: 0;
}

.report-score-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.report-score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), #c9a66b);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.report-score-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  text-align: right;
}

@media (max-width: 768px) {
  .report-container {
    padding: 12px 16px;
    margin-top: 0; /* app-content에서 관리 */
  }

  .report-title,
  .report-subtitle {
    display: none !important; /* 모바일에서 타이틀 숨김 */
  }

  /* 요약 카드 - 1행 3열 유지 */
  .report-summary {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
  }

  .report-summary-card {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    text-align: center;
  }

  .report-summary-icon {
    width: 32px;
    height: 32px;
  }

  .report-summary-icon svg {
    width: 16px;
    height: 16px;
  }

  .report-summary-value {
    font-size: 16px;
  }

  .report-summary-label {
    display: none !important; /* 모바일에서 레이블 숨김 */
  }

  .report-summary-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* CSV 내보내기 버튼 숨김 */
  .report-export-btn {
    display: none !important;
  }

  .report-member-card {
    flex-wrap: wrap;
    gap: 12px;
  }

  .report-member-stats {
    width: 100%;
    justify-content: space-around;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
  }

  .report-member-score {
    width: 100%;
    margin-top: 8px;
  }
}

/* ==========================================
   학습/가이드 섹션
   ========================================== */

.guide-section {
  padding: 24px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.guide-container {
  width: 100%;
}

.guide-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.guide-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.guide-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.guide-tab {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.guide-tab:hover {
  background: var(--bg-tertiary);
}

.guide-tab.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #000;
}

.guide-content {
  display: none;
}

.guide-content.active {
  display: block;
}

/* 모델 가이드 카드 */
.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.guide-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.guide-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.guide-card-icon svg {
  stroke: #fff;
}

.guide-card-content {
  flex: 1;
  min-width: 0;
}

.guide-card-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guide-card-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.guide-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* 플랫폼 사용법 */
.guide-article {
  margin-bottom: 32px;
}

.guide-article h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-step {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.guide-step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  color: #000;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.guide-step-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.guide-step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 학습 팁 */
.guide-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.guide-tip-card {
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.guide-tip-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin-bottom: 12px;
}

.guide-tip-icon svg {
  color: var(--accent-gold);
}

.guide-tip-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.guide-tip-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* FAQ */
.guide-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-faq-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.guide-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.guide-faq-question svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.guide-faq-item.open .guide-faq-question svg {
  transform: rotate(180deg);
}

.guide-faq-answer {
  display: none;
  padding: 0 20px 16px;
}

.guide-faq-item.open .guide-faq-answer {
  display: block;
}

.guide-faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 가이드 반응형 */
@media (max-width: 768px) {
  .guide-section {
    padding: 20px 16px;
    margin-top: 0; /* app-content에서 관리 */
  }

  .guide-title {
    font-size: 20px;
  }

  .guide-tabs {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .guide-card-grid,
  .guide-tips-grid {
    grid-template-columns: 1fr;
  }

  .guide-step {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ==========================================
   모바일 검색바 & 필터 버튼
   ========================================== */

.mobile-search-bar {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.mobile-search-bar .search-icon {
  position: static;
  color: var(--text-muted);
  flex-shrink: 0;
}

.mobile-search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.mobile-search-bar input::placeholder {
  color: var(--text-muted);
}

.mobile-filter-btn-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-filter-btn-inline svg {
  width: 18px;
  height: 18px;
}

.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin: 0 16px 16px;
}

.mobile-filter-btn svg {
  width: 18px;
  height: 18px;
}

.mobile-filter-btn .filter-count {
  background: var(--accent-gold);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* 필터 모달 */
.filter-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.filter-modal.active {
  display: flex;
}

.filter-modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--bg-primary);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.filter-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.filter-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.filter-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.filter-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
}

.filter-modal-section {
  margin-bottom: 24px;
}

.filter-modal-section:last-child {
  margin-bottom: 0;
}

/* PC에서 라인 선택 숨기기 */
.filter-modal-section.mobile-only-section {
  display: none;
}

@media (max-width: 768px) {
  .filter-modal-section.mobile-only-section {
    display: block;
  }
}

.filter-modal-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 라인 선택 그리드 */
.filter-line-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filter-line-btn {
  padding: 10px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.filter-line-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #fff;
}

.filter-line-btn .line-count {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.filter-line-btn.active .line-count {
  color: rgba(255, 255, 255, 0.8);
}

/* 상태 칩 */
.filter-status-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-status-chip.active {
  border-color: var(--accent-gold);
  background: rgba(168, 124, 81, 0.1);
}

.filter-status-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.filter-status-chip .chip-dot.buy { background: #22c55e; }
.filter-status-chip .chip-dot.pending { background: #eab308; }
.filter-status-chip .chip-dot.no { background: #ef4444; }

/* 드롭다운 필터 */
.filter-modal-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  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='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-modal-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* 검색 입력 */
.filter-modal-search {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.filter-modal-search::placeholder {
  color: var(--text-muted);
}

.filter-modal-search:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* 가격 범위 입력 (모바일) */
.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.price-input {
  flex: 1;
  min-width: 0; /* flex 아이템이 줄어들 수 있도록 */
  padding: 12px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
}

.price-input::placeholder {
  color: var(--text-muted);
}

.price-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.price-range-separator {
  color: var(--text-muted);
  font-size: 14px;
}

/* 가격 필터 인라인 (PC) */
.price-filter-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.price-filter-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.price-input-sm {
  width: 80px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  text-align: center;
}

.price-input-sm::placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.price-input-sm:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.price-range-sep {
  color: var(--text-muted);
  font-size: 13px;
}

/* number input 화살표 제거 */
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button,
.price-input-sm::-webkit-outer-spin-button,
.price-input-sm::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-input[type=number],
.price-input-sm[type=number] {
  -moz-appearance: textfield;
}

@media (max-width: 768px) {
  .price-filter-inline {
    display: none;
  }
}

/* 푸터 버튼 */
.filter-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.filter-reset-btn {
  flex: 1;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.filter-apply-btn {
  flex: 2;
  padding: 14px;
  background: var(--accent-gold);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================
   초대코드 모달
   ========================================== */
.invite-code-modal-content {
  max-width: 380px;
  text-align: center;
}

.invite-code-modal-body {
  margin-top: 24px;
}

.invite-code-display-large {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 2px solid var(--accent-gold);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.invite-code-value {
  font-family: 'Courier New', monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(168, 124, 81, 0.3);
}

.invite-code-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent-gold);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.invite-code-copy-btn:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.invite-code-copy-btn:active {
  transform: translateY(0);
}

.invite-code-copy-btn.copied {
  background: #22c55e;
}

.invite-code-info {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  text-align: left;
}

.invite-code-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.invite-code-info-item svg {
  flex-shrink: 0;
  color: var(--accent-gold);
}

.invite-code-stats {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.invite-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.invite-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}

.invite-stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* 다중 초대코드 리스트 */
.invite-codes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.invite-code-item {
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border-color);
}

.invite-code-item .invite-code-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.invite-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invite-code-item .invite-code-value {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-gold);
}

.invite-code-copy-btn-small {
  padding: 8px 16px;
  background: var(--accent-gold);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.invite-code-copy-btn-small:hover {
  background: var(--accent-gold-hover);
}

.invite-code-copy-btn-small.copied {
  background: #22c55e;
}

.invite-code-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   매니저 연결 (초대코드 입력) 섹션
   ========================================== */
.my-info-join-manager-section {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  border: 1px dashed var(--border-color);
}

.join-manager-form {
  display: flex;
  gap: 10px;
  margin: 12px 0 8px;
}

.join-code-input {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
}

.join-code-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.join-code-input::placeholder {
  letter-spacing: 1px;
  text-transform: none;
}

.join-code-btn {
  padding: 12px 20px;
  background: var(--accent-gold);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.join-code-btn:hover {
  background: var(--accent-gold-hover);
}

.join-code-btn:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ==========================================
   관리자 페이지 - 매니저 선택
   ========================================== */
.manager-selector {
  margin-top: 8px;
}

.manager-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.manager-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.user-manager {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.user-manager strong {
  color: var(--accent-gold);
}

.user-manager.no-manager strong {
  color: var(--text-muted);
}

/* 사용자 삭제 버튼 */
.delete-btn {
  padding: 8px 16px;
  background: #7f1d1d;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: #991b1b;
}

/* ==========================================
   내 정보 수정 기능
   ========================================== */
.my-info-role {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 12px;
}

.my-info-role-badge {
  padding: 6px 16px;
  background: var(--accent-gold);
  color: #fff;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

/* 가입일/활동기간 2열 그리드 */
.my-info-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.my-info-dates .my-info-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 0;
}

.my-info-editable {
  padding: 12px 0;
}

.my-info-edit-btn {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.my-info-edit-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.my-info-edit-item {
  margin-bottom: 12px;
}

.my-info-edit-item .my-info-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.my-info-edit-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  box-sizing: border-box;
}

.my-info-edit-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.my-info-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.my-info-cancel-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.my-info-cancel-btn:hover {
  background: var(--bg-secondary);
}

.my-info-save-btn {
  flex: 1;
  padding: 12px;
  background: var(--accent-gold);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.my-info-save-btn:hover {
  background: var(--accent-gold-hover);
}

.my-info-save-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ===== Footer Styles ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 30px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-gold), #c9a66b);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.footer-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  padding: 4px 8px;
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-nav-link:hover {
  color: var(--accent-gold);
}

.footer-nav-divider {
  color: var(--border-color);
  font-size: 12px;
}

.footer-info {
  padding: 24px 0;
}

.footer-company-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 12px;
}

.footer-info-item {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-info-item strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer Responsive */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 0 24px;
    margin-top: 40px;
    overflow-x: hidden;
  }

  .footer-inner {
    padding: 0 16px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-nav {
    gap: 0;
    flex-wrap: wrap;
    width: 100%;
  }

  .footer-nav-link {
    padding: 6px 8px;
    font-size: 12px;
  }

  .footer-nav-divider {
    display: none;
  }

  .footer-disclaimer {
    font-size: 10px;
    word-break: keep-all;
  }

  .footer-copyright {
    font-size: 11px;
  }

  .footer-company-info {
    flex-direction: column;
    gap: 6px;
  }
}

/* ===== Sub Pages Styles ===== */
.sub-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.sub-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sub-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.sub-header-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-gold), #c9a66b);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-header-logo-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.sub-header-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
}

.sub-header-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.sub-header-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.sub-header-back:hover {
  background: var(--bg-tertiary);
  color: var(--accent-gold);
}

.sub-content {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.sub-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.sub-page-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.sub-page-section {
  margin-bottom: 32px;
}

.sub-page-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-gold);
  display: inline-block;
}

.sub-page-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.sub-page-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.sub-page-list li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}

.sub-page-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

.notice-list {
  border-top: 1px solid var(--border-color);
}

.notice-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  transition: background 0.2s;
}

.notice-item:hover {
  background: var(--bg-tertiary);
  margin: 0 -12px;
  padding: 16px 12px;
}

.notice-badge {
  background: var(--accent-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 12px;
  white-space: nowrap;
}

.notice-title {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.notice-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 16px;
}

.contact-box {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

.contact-box-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.contact-box-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-box-item:last-child {
  margin-bottom: 0;
}

.contact-box-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
}

.contact-box-item a {
  color: var(--accent-gold);
  text-decoration: none;
}

.contact-box-item a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .sub-content {
    padding: 24px 16px;
  }

  .sub-page-title {
    font-size: 22px;
  }

  .notice-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .notice-date {
    width: 100%;
    margin-left: 0;
  }
}

/* ==========================================
   채팅방 설정 카드 스타일
   ========================================== */

.chat-settings-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 내 채팅방 설정 - 크게 */
.my-chat-settings-card {
  background: var(--bg-primary);
  border: 1px solid var(--accent-gold);
  border-radius: 12px;
  overflow: hidden;
}

.my-chat-settings-title {
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(169, 130, 78, 0.1), rgba(169, 130, 78, 0.05));
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-color);
}

.my-chat-settings-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.my-chat-settings-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}

.my-chat-settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
}

.my-chat-settings-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.my-chat-settings-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-chat-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.my-chat-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.my-chat-input-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  box-sizing: border-box;
}

.my-chat-input-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.my-chat-input-group input::placeholder {
  color: var(--text-muted);
}

.my-chat-settings-save-btn {
  padding: 12px 24px;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
}

.my-chat-settings-save-btn:hover {
  background: #8b6914;
}

/* 다른 매니저 섹션 */
.other-managers-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.other-managers-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.other-managers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 컴팩트 카드 (다른 매니저용) */

.chat-settings-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.chat-settings-card.own-card {
  border-left: 3px solid var(--accent-gold);
  background: rgba(169, 130, 78, 0.03);
}

.chat-settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
  flex-shrink: 0;
}

.chat-settings-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.chat-settings-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-settings-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-settings-role-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.chat-settings-role-badge.owner {
  color: var(--accent-gold);
}

.chat-settings-role-badge.manager {
  color: var(--accent-green);
}

/* 채팅방 링크 - 한 줄 인라인 */
.chat-link-cards {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.chat-link-card {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.chat-link-card-header {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-link-card.notice .chat-link-card-header {
  color: #5C9EE8;
}

.chat-link-card.direct .chat-link-card-header {
  color: #E8A85C;
}

.chat-link-card-header svg {
  width: 14px;
  height: 14px;
}

.chat-link-card input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-primary);
  box-sizing: border-box;
}

.chat-link-card input::placeholder {
  color: var(--text-muted);
}

.chat-link-card input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.chat-link-card input:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
}

.chat-settings-save-btn {
  padding: 6px 14px;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-settings-save-btn:hover {
  background: #8b6914;
}

.chat-settings-save-btn svg {
  display: none;
}

.empty-list {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 모바일 반응형 */
@media (max-width: 900px) {
  .my-chat-settings-body {
    flex-wrap: wrap;
  }

  .my-chat-settings-inputs {
    flex: 1 1 calc(100% - 120px);
  }

  .chat-settings-card {
    flex-wrap: wrap;
    gap: 10px;
  }

  .chat-settings-header {
    min-width: 120px;
  }

  .chat-link-cards {
    flex: 1 1 100%;
    order: 3;
  }

  .chat-settings-save-btn {
    order: 2;
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .my-chat-settings-body {
    flex-direction: column;
    align-items: stretch;
  }

  .my-chat-settings-profile {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
  }

  .my-chat-settings-inputs {
    width: 100%;
  }

  .my-chat-settings-save-btn {
    width: 100%;
  }

  .chat-settings-card {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .chat-settings-header {
    min-width: auto;
  }

  .chat-link-cards {
    flex-direction: column;
    gap: 8px;
  }

  .chat-link-card {
    width: 100%;
  }

  .chat-settings-save-btn {
    align-self: flex-end;
    margin-left: 0;
  }
}

/* ==========================================
   담당자 문의 모달 스타일
   ========================================== */

.contact-manager-modal-content {
  max-width: 400px;
  width: 100%;
}

.contact-manager-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.contact-manager-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
}

.contact-manager-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-manager-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.contact-manager-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-manager-card-role {
  font-size: 12px;
  color: var(--text-muted);
}

.contact-manager-card-links {
  display: flex;
  gap: 8px;
}

.contact-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.contact-link-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.contact-link-btn.primary {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: white;
}

.contact-link-btn.primary:hover {
  background: #8a6a45;
  border-color: #8a6a45;
}

.contact-no-link-msg {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.contact-empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
}

/* ==========================================
   토스트 알림 스타일
   ========================================== */

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 360px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-message {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* 토스트 타입별 스타일 */
.toast-success {
  border-left: 4px solid var(--status-buy);
}

.toast-error {
  border-left: 4px solid var(--status-no);
}

.toast-info {
  border-left: 4px solid var(--accent-gold);
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

@media (max-width: 768px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    max-width: none;
  }
}
