/* Pretendard 폰트 import */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

/* CSS 변수 정의 - Black/Gray/White Theme */
:root {
  /* 기본 컬러(블루 중심) */
  --primary-600: #667eea;
  /* 메인 블루 */
  --primary-500: #7b8cff;
  --primary-400: #a5b4ff;
  --danger-600: #dc2626;
  /* 삭제 등 위험 */
  --warn-600: #d97706;
  /* 주의 */
  --primary-color: var(--primary-600);
  --secondary-color: #6c757d;
  --success-color: var(--primary-600);
  /* success/info 블루로 통일 */
  --danger-color: var(--danger-600);
  --warning-color: var(--warn-600);
  --info-color: var(--primary-600);
  --light-color: #f8f9fa;
  /* 라이트 그레이 유지 */
  --dark-color: #212529;
  /* 매우 다크한 그레이 */

  /* 확장 색상 팔레트 */
  --white: #ffffff;
  /* 순백색 - 메인 배경 */
  --gray-50: #f8f9fa;
  /* 가장 연한 그레이 */
  --gray-100: #e9ecef;
  /* 연한 그레이 */
  --gray-200: #dee2e6;
  /* 중간 연한 그레이 */
  --gray-300: #ced4da;
  /* 중간 그레이 */
  --gray-400: #adb5bd;
  /* 중간 어두운 그레이 */
  --gray-500: #6c757d;
  /* 어두운 그레이 */
  --gray-600: #495057;
  /* 더 어두운 그레이 */
  --gray-700: #343a40;
  /* 매우 어두운 그레이 */
  --gray-800: #212529;
  /* 거의 검정색 */
  --gray-900: #000000;
  /* 순검정색 */

  /* 블루 액센트 색상 (유지) */
  --blue-primary: var(--primary-600);
  --blue-dark: var(--primary-500);
  --blue-light: #eaf2ff;
  /* 라이트 블루 배경 */
  --blue-bg: #eaf2ff;

  /* 폰트 패밀리 변수 */
  --font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    sans-serif;
}

/* 모든 li 요소에 대해 시작하는 dot 제거 */
li {
  list-style: none;
}

/* 공통 기본 스타일 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: var(--font-family);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 모든 요소에 Pretendard 폰트 적용 */
body,
input,
textarea,
select,
button {
  font-family: var(--font-family);
}

/* 🎮 아이템 슬롯 스타일 - 우측 미리보기 패널용 */
.item-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0;
  width: 100%;
}

.item-slot {
  position: relative;
  aspect-ratio: 1;
  border: 2px dashed var(--gray-300);
  border-radius: 6px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: all 0.3s ease;
  min-height: 30px;
  max-height: 80px;
}

.item-slot:hover {
  border-color: var(--primary-color);
  background: var(--blue-bg);
}

.item-slot.filled {
  border: 2px solid var(--success-color);
  background: var(--white);
  box-shadow: 0 2px 4px rgba(73, 80, 87, 0.15);
}

.slot-label {
  position: absolute;
  top: -6px;
  left: -6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--white);
  padding: 2px 4px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.slot-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
}

.slot-placeholder {
  color: #999;
  font-size: 11px;
  font-style: italic;
}

/* 제거 버튼 */
.slot-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dc3545;
  color: white;
  border: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: none;
  line-height: 1;
  z-index: 10;
  transition: all 0.2s ease;
}

.slot-remove-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.item-slot.filled .slot-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 👤 사용자 정보 한 줄 표시 스타일 */
.selected-user-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.selected-user-info h4 {
  margin-bottom: 8px;
  color: #495057;
  font-size: 14px;
}

.user-info-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
  white-space: nowrap;
}

.user-info-grid>div {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  flex-shrink: 0;
  white-space: nowrap;
}

.user-info-grid strong {
  color: #495057;
  font-weight: 600;
  white-space: nowrap;
}

.user-info-grid span {
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

body {
  font-family: var(--font-family);
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* 레이아웃 */
.admin-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 공통 헤더 */
.common-header {
  background: black;
  color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-brand {
  font-size: 0.9rem;
  font-weight: 300;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-brand-text {
  color: rgb(133, 133, 133);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  height: 26px;
  /* 또는 원하는 높이 */
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 15px;
}

.auth-status span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

/* 로그아웃 버튼 보호 스타일 */
.auth-status .btn-secondary {
  padding: 10px 20px !important;
  font-size: 14px !important;
  border-radius: 5px !important;
  background-color: #6c757d !important;
  color: white !important;
  border: 1px solid #6c757d !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
  margin: 5px !important;
}

.auth-status .btn-secondary:hover {
  background-color: #5a6268 !important;
  border-color: #545b62 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.auth-status .btn-secondary:disabled {
  background-color: #ccc !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
}

/* 탭 네비게이션 */
.tab-navigation {
  background: white;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 70px;
  z-index: 999;
  padding: 0 20px;
}

.tab-links {
  display: flex;
  overflow-x: auto;
  flex: 1;
}

.tab-actions {
  display: flex;
  align-items: center;
  margin-left: 20px;
  flex-shrink: 0;
}

.api-docs-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.api-docs-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: white;
}

.api-docs-btn .btn-icon {
  font-size: 14px;
}

.api-docs-btn .btn-text {
  font-weight: 600;
}

.tab-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  text-decoration: none;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 150px;
  justify-content: center;
}

.tab-link:hover {
  background-color: #f8f9fa;
  color: #333;
}

.tab-link.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background-color: #f8f9fa;
}

.tab-icon {
  font-size: 1.2rem;
}

.tab-text {
  font-weight: 500;
}

/* 컨텐츠 영역 */
.content-area {
  flex: 1;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}

.welcome-message {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.welcome-message h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #495057;
}

/* 버튼 스타일 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  margin: 5px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background-color: var(--primary-600);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-500);
}

.btn-secondary {
  background-color: #6b7280;
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #4b5563;
}

.btn-pagination {
  background-color: var(--primary-600);
  color: #fff;
}

.btn-pagination:not(:disabled) {
  background-color: var(--primary-500);
}

.btn-normal {
  background-color: #f4f4f4;
  color: white;
}

.btn-normal:hover:not(:disabled) {
  background-color: #dfdfdf;
}

.btn-success {
  background-color: var(--primary-600);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background-color: var(--primary-500);
}

.btn-danger {
  background-color: var(--danger-600);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
}

.btn-warning {
  background-color: #ffc107;
  color: #212529;
}

.btn-warning:hover:not(:disabled) {
  background-color: #e0a800;
}

/* 폼 스타일 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  gap: 0px;
  flex-direction: column;
  /* display: block; */
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
}

/* 체크박스 그룹 */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* 테이블 스타일 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

tr:hover {
  background-color: #f8f9fa;
}

/* 정렬 가능한 테이블 헤더 */
.sortable-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 25px !important;
}

.sortable-header:hover {
  background-color: #e9ecef !important;
}

/* 기본 정렬 아이콘 (양방향 화살표) - 더 구체적인 선택자 사용 */
#userTable th.sortable-header::after {
  content: "↕";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #999 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  z-index: 1000 !important;
  display: inline-block !important;
  line-height: 1 !important;
  width: 12px;
  text-align: center;
}

/* 오름차순 정렬 */
#userTable th.sortable-header.sort-asc::after {
  content: "▲" !important;
  color: #667eea !important;
}

/* 내림차순 정렬 */
#userTable th.sortable-header.sort-desc::after {
  content: "▼" !important;
  color: #667eea !important;
}

/* 섹션 스타일 */
.section {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  margin: 16px 0;
  border: 1px solid var(--gray-200);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 컨트롤 그룹 */
.controls {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
  align-items: center;
}

/* 공통 토스트 - 모든 페이지에서 사용 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  padding: 12px 16px;
  margin-bottom: 8px;
  min-width: 280px;
  max-width: 420px;
  opacity: 0;
  transform: translateX(100%);
  transition: all .3s ease;
  pointer-events: auto;
  border-left: 4px solid var(--primary-600);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-700);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color .2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background-color: rgba(0, 0, 0, .06);
}

/* 유틸리티 (소량) */
.u-flex {
  display: flex;
}

.u-flex-col {
  display: flex;
  flex-direction: column;
}

.u-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.u-justify-between {
  justify-content: space-between;
}

.u-gap-8 {
  gap: 8px;
}

.u-gap-12 {
  gap: 12px;
}

.u-mt-16 {
  margin-top: 16px;
}

.u-mb-16 {
  margin-bottom: 16px;
}

.u-p-16 {
  padding: 16px;
}

.u-text-muted {
  color: var(--gray-600);
}

.u-hidden {
  display: none !important;
}

.u-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.controls input,
.controls select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: auto;
  min-width: 120px;
}

/* 모달 스타일 */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

.modal-backdrop.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  /* animation: modalSlideIn 0.3s ease-out; */
  display: flex;
  flex-direction: column;

}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  background: #fff;
  color: var(--gray-700);
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.close:hover {
  opacity: 0.7;
}

/* 로그인 모달 스타일 */
.login-modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

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

.login-modal-content {
  background-color: white;
  border-radius: 15px;
  width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  /* animation: modalSlideIn 0.3s ease-out; */
}

.login-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-modal-header h3 {
  margin: 0;
}

.login-close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.login-close:hover {
  opacity: 0.7;
}

.login-modal-body {
  padding: 20px;
}

.login-modal-footer {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* 상태 메시지 */
.status {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 15px 0;
  font-weight: 500;
}

.status.loading {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.status.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.status.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* 로딩 인디케이터 */
.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 500;
  color: #495057;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 30px 0;
}

.page-info {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

/* 배지 스타일 */
.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-badge {
  background-color: #dc3545;
  color: white;
}

.active-badge {
  background-color: #28a745;
  color: white;
}

/* 이미지 관련 */
.image-preview {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px solid #ddd;
}

.avatar-thumbnail {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  border: 1px solid #ddd;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .common-header {
    padding: 10px 15px;
    flex-direction: column;
    gap: 15px;
  }

  .header-brand h1 {
    font-size: 1.2rem;
  }

  .tab-navigation {
    top: 90px;
    padding: 0 15px;
  }

  .tab-links {
    overflow-x: auto;
  }

  .tab-link {
    min-width: 120px;
    padding: 12px 15px;
  }

  .tab-text {
    display: none;
  }

  .tab-actions {
    margin-left: 15px;
  }

  .api-docs-btn .btn-text {
    display: none;
  }

  .api-docs-btn {
    padding: 8px 12px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  .content-area {
    padding: 20px 15px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls input,
  .controls select {
    width: 100%;
    margin-bottom: 10px;
  }

  table {
    font-size: 12px;
  }

  th,
  td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    margin: 10px;
    max-height: 95vh;
  }

  .modal-body {
    padding: 20px;
  }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 숨김 스타일 */
.hidden {
  display: none !important;
}

/* 텍스트 유틸리티 */
.text-center {
  text-align: center;
}

.text-muted {
  color: #6c757d;
}

.font-weight-bold {
  font-weight: 600;
}

/* 아바타 커스터마이징 스타일 - 이전 버전 (사용 안함) */
.customize-container-old {
  display: flex;
  gap: 30px;
  min-height: 80vh;
}

.customize-main-content {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.customize-preview-panel {
  flex: 1;
  position: sticky;
  top: 150px;
  height: fit-content;
}

/* 사용자 선택 섹션 - 전체 너비 활용 */
.user-select-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: none;
}

/* 사용자 선택 탭 - 전체 너비 활용 */
#tab-content-user-selection {
  width: 100%;
  max-width: none;
}

#tab-content-user-selection .section {
  width: 100%;
  max-width: none;
}

/* 사용자 검색 컨테이너 */
.user-search-container {
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.search-input-wrapper input {
  width: 100%;
  padding: 12px 45px 12px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-loading {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.search-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 사용자 카드 컨테이너 - 전체 너비 사용 */
.user-cards-container {
  min-height: 300px;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.user-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 5px;
  padding: 10px 0;
  width: 100%;
  justify-items: stretch;
}

/* 사용자 카드 스타일 */
.user-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.user-card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
  transform: translateY(-2px);
}

.user-card.selected {
  border-color: #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
  box-shadow: 0 4px 16px rgba(40, 167, 69, 0.2);
}

.user-card.selected::before {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

.user-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  background: white;
}

.user-avatar .avatar-text {
  position: relative;
  z-index: 1;
}

.user-card-info {
  width: 100%;
  text-align: center;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

.user-email {
  font-size: 11px;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
  /* 이메일 숨김 */
}

.user-card-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
  gap: 2px;
  width: 100%;
}

.user-ar-id {
  background: #e3f2fd;
  color: #1976d2;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.user-role {
  font-size: 9px;
  color: #6c757d;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* 검색 하이라이팅 */
.highlight {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* 빈 상태 스타일 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 8px;
  color: #495057;
  font-size: 18px;
}

.empty-state p {
  color: #6c757d;
  font-size: 14px;
}

/* 로딩 상태 스타일 */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

/* 반응형 디자인 - 새 레이아웃 */
@media (max-width: 1024px) {
  .customize-main-layout {
    flex-direction: column;
    gap: 20px;
    height: auto;
    overflow: visible;
  }

  .right-panel {
    position: static;
    min-width: 0;
    max-width: none;
    order: -1;
  }

  .left-panel {
    height: auto;
  }

  .left-panel .tab-contents {
    height: auto;
  }

  .left-panel .user-cards-container {
    height: 400px;
  }

  .left-panel .user-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .left-panel .user-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
  }

  .user-card {
    padding: 4px;
  }

  .user-avatar {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }

  .user-name {
    font-size: 10px;
  }

  .user-ar-id {
    font-size: 8px;
    padding: 1px 3px;
  }

  .user-role {
    font-size: 7px;
  }

  .customize-container {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .left-panel .user-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 4px;
  }

  .user-card {
    padding: 3px;
  }

  .user-avatar {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  .user-name {
    font-size: 9px;
  }

  .user-ar-id {
    font-size: 7px;
    padding: 1px 2px;
  }

  .user-role {
    font-size: 6px;
  }

  .right-panel .canvas-container {
    padding: 10px;
  }
}

/* 탭 네비게이션 스타일 */
.customize-tabs {
  margin-bottom: 30px;
}

.tab-navigation {
  top: 0px;
  display: flex;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  position: relative;
}

.tab-button:hover:not(:disabled) {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.tab-button.active {
  background: #007bff;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.tab-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tab-button:disabled .tab-step {
  background: #e9ecef;
  color: #6c757d;
}

.tab-icon {
  font-size: 18px;
}

.tab-text {
  font-weight: 600;
}

.tab-step {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid white;
}

.tab-button.active .tab-step {
  background: #ffc107;
  color: #333;
}

/* 선택된 사용자 정보 바 */
.selected-user-bar {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
  border: 1px solid #28a745;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  margin-left: 20px;
  margin-right: 20px;
  min-height: 80px;
  transition: all 0.3s ease;
}

.selected-user-bar[style*="display: none"] {
  opacity: 0;
  visibility: hidden;
  height: 0;
  min-height: 0;
  padding: 0 16px;
  margin-bottom: 0;
  overflow: hidden;
}

.selected-user-info-compact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  overflow: hidden;
  position: relative;
}

.user-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  background: white;
}

.user-avatar-small .avatar-text {
  position: relative;
  z-index: 1;
}

.selected-user-details {
  flex: 3;
  display: flex;
  flex-direction: column;
}

.selected-user-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.selected-user-id {
  font-size: 12px;
  color: #6c757d;
}

.change-user-btn {
  padding: 6px 12px;
  border: 1px solid #28a745;
  background: white;
  color: #28a745;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.change-user-btn:hover {
  background: #28a745;
  color: white;
}

/* 확장된 사용자 정보 바 */
.selected-user-info-expanded {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.user-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  display: flex;
  align-items: last baseline;
  justify-content: last baseline;
  color: white;
  font-weight: bold;
  font-size: 18px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  left: 0;
  background: white;
}

.user-avatar-large .avatar-text {
  position: relative;
  z-index: 1;
}

.selected-user-info-expanded .selected-user-details {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 14px;
  min-width: 0;
}

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

.selected-user-name-kr {
  font-weight: 700;
  color: #333;
  font-size: 16px;
  line-height: 1.2;
}

.selected-user-name-en {
  font-weight: 500;
  color: #666;
  font-size: 14px;
  line-height: 1.2;
}

.user-basic-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: last baseline;
}

.selected-user-id {
  background: var(--secondary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.selected-user-email {
  color: #666;
  font-size: 13px;
  font-family: var(--font-family);
}

.user-role-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: last baseline;
}

.selected-user-part,
.selected-user-role,
.selected-user-affiliation {
  background: #f8f9fa;
  color: #495057;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid #e9ecef;
  font-weight: 500;
  white-space: nowrap;
}

/* 반응형 대응 */
@media (max-width: 768px) {
  .selected-user-info-expanded {
    gap: 12px;
  }

  .user-avatar-large {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .selected-user-name-kr {
    font-size: 15px;
  }

  .selected-user-name-en {
    font-size: 13px;
  }

  .user-basic-info,
  .user-role-info {
    gap: 8px;
  }
}

/* 탭 컨텐츠 */
.tab-contents {
  position: relative;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 단계 네비게이션 버튼 - 화면 하단 고정 */
.step-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* 컨텐츠가 하단 네비게이션에 가려지지 않도록 여백 추가 */
.tab-content {
  padding-bottom: 0px;
}

.btn-prev,
.btn-next {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-arrow {
  font-weight: bold;
}

.btn-next {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
  color: white;
}

.btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-prev {
  background: #6c757d;
  border: none;
  color: white;
}

.btn-prev:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* 커스터마이징 컨테이너 레이아웃 조정 - 스케치 기반 */
.customize-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 반응형 탭 디자인 */
@media (max-width: 768px) {
  .tab-navigation {
    flex-direction: column;
    gap: 4px;
  }

  .tab-button {
    flex: none;
    width: 100%;
  }

  .selected-user-info-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .step-navigation {
    flex-direction: column;
    gap: 12px;
  }

  .btn-prev,
  .btn-next {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .tab-text {
    display: none;
  }

  .tab-button {
    padding: 12px 16px;
  }
}

.filter-result-count {
  margin: 15px 0;
  padding: 10px 15px;
  background-color: #e3f2fd;
  border-radius: 6px;
  color: #1976d2;
  font-size: 14px;
  font-weight: 500;
}

.selected-user-info {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.selected-user-info h4 {
  margin-bottom: 15px;
  color: #495057;
  font-size: 1.1rem;
}

.user-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.user-info-grid div {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-info-grid strong {
  color: #333;
  margin-right: 8px;
}

/* 메인 레이아웃: 좌우 분할 구조 */
.customize-main-layout {
  display: flex;
  width: 100%;
  gap: 30px;
  height: calc(100vh - 240px);
  align-items: stretch;
  overflow: visible;
}

/* 좌측 패널: 탭 네비게이션 + 컨텐츠 */
.left-panel {
  flex: 2;
  min-width: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 우측 패널: 미리보기 (항상 표시) */
.right-panel {
  flex: 1;
  min-width: 380px;
  max-width: 380px;
  position: sticky;
  top: 20px;
  height: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.right-panel .preview-section {
  padding: 18px;
}

.right-panel .canvas-container {
  text-align: center;
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #ddd;
}

.right-panel #avatarCanvas {
  max-width: 100%;
  width: 260px;
  height: 260px;
  border-radius: 8px;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
}

.right-panel .preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.right-panel .preview-actions .btn {
  width: 100%;
  padding: 10px;
  font-weight: 600;
  border-radius: 8px;
  font-size: 14px;
}

/* 탭 컨텐츠 영역 */
.left-panel .tab-contents {
  padding: 0 20px 20px;
  flex: 1;
  overflow-y: auto;
  height: 0;
}

/* 탭별 컨텐츠 */
.left-panel .tab-content {
  display: none !important;
  height: 100%;
  width: 100%;
}

.left-panel .tab-content.active {
  display: block !important;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 사용자 검색 및 카드 컨테이너 */
.left-panel .user-search-container {
  margin-bottom: 20px;
}

.left-panel .user-cards-container {
  height: calc(100% - 140px);
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
}

/* 사용자 카드 그리드 최적화 */
.left-panel .user-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

/* 섹션 타이틀 스타일 */
.left-panel .section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

/* 탭 네비게이션 영역 */
.left-panel .customize-tabs {
  flex-shrink: 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* 커스터마이징 그룹 스타일 */
.left-panel .customization-group {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.left-panel .customization-group h4 {
  color: #495057;
  font-size: 1.1rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 메시지 입력 컨테이너 */
.left-panel .message-input-container {
  position: relative;
}

.left-panel .message-input-container input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
}

.left-panel .character-count {
  position: absolute;
  right: 10px;
  bottom: -20px;
  font-size: 12px;
  color: #6c757d;
}

/* 아바타 커스터마이징 섹션 */
.avatar-customization-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.customization-group {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e9ecef;
}

.customization-group:last-child {
  margin-bottom: 30px;
  border-bottom: none;
  margin-bottom: 0;
}

.customization-group h4 {
  margin-bottom: 15px;
  color: #495057;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 카테고리 컨테이너 */
.categories-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.avatar-category {
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px 20px;
  color: var(--dark-color);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-name {
  font-weight: 600;
  font-size: 1rem;
}

.category-selection {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.avatar-category.selected .category-header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* 아바타 옵션 그리드 컨테이너 */
.avatar-options {
  padding: 15px;
  /* 패딩 줄임 */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  /* 최소 너비 조정 */
  gap: 10px;
  /* 간격 줄임 */
  background: white;
}

/* 아바타 옵션 */
.avatar-option {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 10px;
  /* 패딩 줄임 */
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  /* flexbox 사용 */
  flex-direction: column;
  /* 세로 정렬 */
  align-items: center;
  /* 가로 중앙 정렬 */
  justify-content: center;
  /* 세로 중앙 정렬 */
  min-height: 120px;
  /* 최소 높이 설정 (정사각형에 가깝게) */
}

.avatar-option:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.avatar-option.selected {
  border-color: #28a745;
  background-color: #f8fff9;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.avatar-option img {
  width: 80px;
  /* 이미지 크기 조정 */
  height: 80px;
  /* 이미지 크기 조정 */
  object-fit: contain;
  /* 이미지 비율 유지하며 컨테이너에 맞춤 */
  border-radius: 8px;
  margin-bottom: 5px;
  /* 텍스트와의 간격 줄임 */
}

.avatar-option-name {
  font-size: 0.85rem;
  /* 폰트 크기 조정 */
  font-weight: 500;
  color: #495057;
  margin-top: 0;
  /* 이미지와의 간격은 img의 margin-bottom으로 조절 */
  word-break: keep-all;
  /* 단어 단위로 줄바꿈 */
}

.color-select-container {
  margin-top: 10px;
}

.color-select {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* 팔레트 관리 스타일 */
.palettes-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 20px;
  margin-top: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  background-color: #f8f9fa;
}

.palette-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 80px;
}

.palette-image-container {
  position: relative;
  display: inline-block;
}

.palette-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
  transition: all 0.3s ease;
}

.palette-circle:hover {
  border-color: #007bff;
  transform: scale(1.1);
}

.palette-actions {
  position: absolute;
  top: -5px;
  right: -5px;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.palette-image-container:hover .palette-actions {
  display: flex;
}

.palette-actions .btn {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  min-width: unset;
}

.palette-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
  text-align: center;
}

.palette-id {
  font-size: 0.7rem;
  color: var(--primary-600) !important;
  text-align: center;
}

.no-palettes {
  color: #6c757d;
  font-style: italic;
  margin: 0;
  text-align: center;
  width: 100%;
}

.more-count {
  font-size: 0.8rem;
  color: #6c757d;
  margin-left: 10px;
  align-self: center;
}

/* 아이템 슬롯 */
.item-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 20px;
}

.item-slot {
  background: white;
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.item-slot.filled {
  border-color: #28a745;
  border-style: solid;
  background-color: #f8fff9;
}

.slot-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 10px;
  border-radius: 8px;
}

.slot-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-placeholder {
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
}

.slot-remove-btn:hover {
  background: #c82333;
}

/* 아이템 그리드 */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.item-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  background: #fafafa;
  position: relative;
  transition: all 0.2s ease;
}

.item-card:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.option-card:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.item-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
}

.item-image-container {
  margin-bottom: 10px;
}

.option-image-container {
  margin-bottom: 10px;
}

.item-card-name {
  font-weight: 600;
  margin-bottom: 5px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}

.option-name {
  font-weight: 600;
  margin-bottom: 5px;
}

/* 메시지 입력 */
.message-input-container {
  position: relative;
}

.message-input-container input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  padding-right: 80px;
}

.character-count {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #666;
  background: white;
  padding: 0 5px;
}

/* 미리보기 패널 */
.preview-section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.canvas-container {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #ddd;
}

#avatarCanvas {
  max-width: 100%;
  border-radius: 8px;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
}

.selected-items-info {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.selected-items-info h4 {
  margin-bottom: 12px;
  color: #495057;
  font-size: 1rem;
}

.selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.selected-item:last-child {
  border-bottom: none;
}

.selected-item strong {
  color: #333;
  min-width: 80px;
}

.selected-item span {
  color: #666;
  text-align: right;
  flex: 1;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.preview-actions .btn {
  width: 100%;
  padding: 12px;
  font-weight: 600;
  border-radius: 8px;
}

/* 로딩 상태 */
.customize-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 500;
  color: #495057;
}

/* 반응형 디자인 - 커스터마이징 */
@media (max-width: 1024px) {
  .customization-with-preview {
    flex-direction: column;
    gap: 20px;
  }

  .preview-panel {
    position: static;
    min-width: 0;
    order: -1;
  }

  .customize-container {
    flex-direction: column;
  }

  .customize-preview-panel {
    position: static;
    order: -1;
  }

  .avatar-options {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .item-slots {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .customize-container {
    gap: 20px;
  }

  .customize-main-content,
  .customize-preview-panel {
    gap: 15px;
  }

  .section {
    padding: 20px;
  }

  .avatar-options {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    padding: 15px;
    gap: 8px;
  }

  .avatar-option {
    padding: 10px;
  }

  .avatar-option img {
    width: 60px;
    height: 60px;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    padding: 15px;
    gap: 8px;
  }

  .item-card {
    padding: 10px;
  }

  .item-card img {
    width: 60px;
    height: 60px;
  }

  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .canvas-container {
    padding: 15px;
  }

  #avatarCanvas {
    max-width: 100%;
    height: auto;
  }
}

/* 파일 미리보기 공통 스타일 */
.file-input-with-preview {
  display: flex;
  align-items: center;
  gap: 15px;
}

.file-preview-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  flex-shrink: 0;
  overflow: hidden;
}

.file-preview-circle .preview-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.file-preview-circle .preview-placeholder {
  font-size: 11px;
  color: #6c757d;
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
}

.drag-drop-area {
  flex: 1;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  position: relative;
}

.drag-drop-area:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.drag-drop-area.drag-over {
  border-color: #28a745;
  background: #f8fff8;
}

.drag-drop-area.has-file {
  border-color: #28a745;
  background: #f8fff8;
}

.drag-drop-area input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  top: 0;
  left: 0;
}

.drag-drop-text {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.drag-drop-area.has-file .drag-drop-text {
  color: #28a745;
  font-weight: 500;
}

/* Character Options Tab Styles */
.category-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0;
  margin: 10px 0;
  background: white;
  overflow: hidden;
  /* 자식 요소의 border-radius를 위해 추가 */
}

.category-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  /* 헤더 텍스트 색상을 어둡게 */
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  /* 드래그 핸들과 텍스트 사이 간격 */
}

.category-title .drag-handle {
  margin-right: 0 !important;
  /* 기존 margin 제거 */
  flex-shrink: 0;
  /* 크기 고정 */
  width: 20px;
  text-align: center;
}

.category-title::before {
  content: "▶";
  font-size: 12px;
  margin-right: 0;
  /* margin 제거 */
  transition: transform 0.2s;
  color: #333;
  /* 화살표 색상도 어둡게 */
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

/* 카테고리 제목 텍스트 부분 */
.category-title-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.category-card:not(.collapsed) .category-title::before {
  transform: rotate(90deg);
}

.category-card.collapsed .category-options {
  display: none;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  /* 옵션 그리드에도 패딩 추가 */
}
.palette-options-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

/* 스티커 관리 아이템 그리드 */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  /* 아이템 그리드에도 패딩 추가 */
}

.option-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  background: #fafafa;
  position: relative;
  transition: all 0.2s ease;
}

.option-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
}

.option-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.option-actions {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 10px;
}

.category-options {
  /* margin-top: 15px; */
  /* category-card의 padding으로 대체 */
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.color-option-item {
  margin-bottom: 10px;
}

.color-option-preview {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 5px;
}

.palette-preview {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 3px;
}

.color-options-display {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
  justify-content: center;
}

.color-option-display {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0px 0px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 12px;
}

.color-option-display img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.color-option-display .palette-circle {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: none;
}

.category-card.sortable-ghost,
.option-card.sortable-ghost {
  opacity: 0.4;
  background: #f0f8ff;
}

.category-card.sortable-chosen,
.option-card.sortable-chosen {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.category-card.sortable-drag,
.option-card.sortable-drag {
  opacity: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: rotate(5deg);
}

.drag-handle {
  cursor: grab;
  color: #666;
  font-size: 16px;
  margin-right: 10px;
  padding: 5px;
  user-select: none;
}

.drag-handle:hover {
  color: #333;
}

.drag-handle:active {
  cursor: grabbing;
}

.sortable-disabled .drag-handle {
  cursor: not-allowed !important;
  color: #ccc !important;
}

.drag-drop-area {
  border: 2px dashed #ddd;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  background-color: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.drag-drop-area:hover {
  border-color: #007bff;
  background-color: #f0f8ff;
}

.drag-drop-area.drag-over {
  border-color: #28a745;
  background-color: #f0fff0;
  border-style: solid;
}

.drag-drop-area input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drag-drop-text {
  color: #666;
  font-size: 11px;
  margin: 0;
}

.drag-drop-icon {
  font-size: 16px;
  margin-bottom: 4px;
  color: #999;
}

.drag-drop-area.has-file {
  border-color: #28a745;
  background-color: #f0fff0;
}

.drag-drop-area.has-file .drag-drop-text {
  color: #28a745;
  font-weight: 500;
}

.form-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

/* form-section 변형 클래스들은 제거됨 */

/* 🔧 다중 업로드 모드 일괄 설정 스타일 */
.batch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 15px;
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  margin-top: 10px;
}

.batch-input {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 8px 12px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.batch-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.batch-input::placeholder {
  color: #6c757d;
  font-size: 13px;
}

/* 드롭다운 스타일 개선 */
.batch-input select,
select.batch-input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M8 10.5L4 6.5h8L8 10.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 32px;
  cursor: pointer;
}

.batch-input:hover {
  border-color: #adb5bd;
}

.batch-input:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

/* 일괄 적용 버튼 특별 스타일 */
.batch-controls .btn-secondary {
  margin-left: auto;
  padding: 8px 16px;
  font-weight: 600;
  white-space: nowrap;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .batch-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .batch-input {
    min-width: auto;
    width: 100%;
  }

  .batch-controls .btn-secondary {
    margin-left: 0;
    width: 100%;
  }
}

/* 구체적인 미리보기 이미지 스타일 강화 */
.file-input-with-preview .file-preview-circle img.preview-image,
.color-preview img.preview-image,
.palette-preview-container img.preview-image,
.hair-middle-preview img.preview-image,
.hair-back-preview img.preview-image,
#thumbnailPreview img.preview-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* 더 구체적인 컬러 옵션 이미지 스타일 */
.color-option-item .color-preview.file-preview-circle img,
.color-option-item .palette-preview-container.file-preview-circle img,
.color-option-item .hair-middle-preview.file-preview-circle img,
.color-option-item .hair-back-preview.file-preview-circle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* 가장 강력한 선택자 - 모든 원형 미리보기 이미지 */
div[class*="preview"].file-preview-circle img,
div[class*="preview-container"].file-preview-circle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* 최강 선택자 - 디버깅용 */
.file-preview-circle img[src] {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* 모든 img 태그에 대한 강제 스타일 */
.file-input-with-preview img,
.color-option-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

.field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.field-group.basic-info-group {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 컬러 옵션 수평 배치용 스타일 */
.field-group.ultra-compact {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.field-group.ultra-compact .form-group {
  flex: 1;
  margin-bottom: 0;
  min-width: 0; /* flex 아이템에서 텍스트 오버플로우 방지 */
}

/* 모든 컬럼이 균일한 너비를 가지도록 설정 */
.field-group.ultra-compact .form-group {
  flex: 1; /* 모든 컬럼 균일한 너비 */
  min-width: 200px; /* 최소 너비 보장 */
}

/* 헤어 리소스 영역도 수평 배치에 포함 */
.hair-resource-group.ultra-compact {
  display: flex;
  gap: 20px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex: 1;
}

.hair-resource-group.ultra-compact > div {
  flex: 1;
  margin-left: 0 !important;
}

/* ultra-compact 클래스 내 모든 썸네일 이미지 크기 통일 */
.field-group.ultra-compact .color-preview,
.field-group.ultra-compact .file-preview,
.field-group.ultra-compact .file-preview-circle,
.field-group.ultra-compact .option-image,
.field-group.ultra-compact .avatar-option img,
.field-group.ultra-compact .item-card img,
.field-group.ultra-compact img {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover;
  border-radius: 8px;
}

/* 원형 이미지는 border-radius 유지 */
.field-group.ultra-compact .file-preview-circle,
.field-group.ultra-compact .item-card img {
  border-radius: 50% !important;
}

/* 기본 정보 섹션 컴팩트화 */
#basicInfoSection {
  margin-bottom: 15px;
}

#basicInfoSection .section-title {
  margin-bottom: 12px;
  padding: 8px 0;
  font-size: 16px;
}

/* 기본 정보 4개 요소를 균등하게 한 줄 배치 */
.field-group.basic-info-group {
  display: flex;
  gap: 16px; /* 균등한 간격 */
  align-items: flex-end;
  margin-bottom: 12px;
}

/* 모든 폼 그룹을 동일한 너비로 설정 */
.field-group.basic-info-group .form-group {
  flex: 1; /* 모든 요소 동일한 너비 */
  margin-bottom: 0;
  min-width: 0;
}

.field-group.basic-info-group .form-group label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  display: block;
}

.field-group.basic-info-group .form-group input {
  padding: 6px 10px;
  font-size: 14px;
  height: 34px;
  width: 100%;
  box-sizing: border-box;
}

/* 썸네일 그룹 스타일 */
#basicInfoSection .thumbnail-group {
  flex: 2; /* 다른 요소보다 1.5배 넓게 */
  margin-bottom: 0;
}

#basicInfoSection .thumbnail-group label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  display: block;
}

#basicInfoSection .thumbnail-group .file-input-with-preview {
  gap: 8px;
  align-items: flex-end;
  height: 34px; /* 다른 입력 필드와 동일한 높이 */
}

#basicInfoSection .thumbnail-group .file-preview-circle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

#basicInfoSection .thumbnail-group .drag-drop-area {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 10px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}

#basicInfoSection .thumbnail-group .drag-drop-area .drag-drop-text {
  margin: 0;
  line-height: 1.2;
}

/* 앞머리 여부 그룹 스타일 */
.field-group.basic-info-group .hair-bang-group {
  flex: 1; /* 다른 요소와 동일한 너비 */
  margin-bottom: 0;
}

.field-group.basic-info-group .hair-bang-group label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  display: block;
}

.field-group.basic-info-group .hair-bang-group .checkbox-container {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px; /* 다른 입력 필드와 동일한 높이 */
}

.field-group.basic-info-group .hair-bang-group .checkbox-label {
  font-size: 12px;
  color: #666;
}

/* 앞머리 여부 체크박스 크기 24px로 설정 */
#optionIsHairBang {
  width: 24px !important;
  height: 24px !important;
  transform: none !important;
  margin: 0 !important;
  position: relative !important;
}


/* 태블릿 이하에서는 세로 배치로 전환 */
@media (max-width: 1024px) {
  .field-group.ultra-compact {
    flex-direction: column;
    gap: 15px;
  }
  
  .field-group.ultra-compact .form-group:first-child,
  .field-group.ultra-compact .form-group:nth-child(2) {
    flex: 1;
  }
  
  .hair-resource-group.ultra-compact {
    flex-direction: column;
    gap: 15px;
  }
}

/* 모바일에서는 기본 정보도 세로 배치로 전환 */
@media (max-width: 768px) {
  .field-group.basic-info-group {
    flex-direction: column;
    gap: 12px; /* 모바일에서도 일관된 간격 */
  }
  
  .field-group.basic-info-group .form-group,
  .field-group.basic-info-group .thumbnail-group,
  .field-group.basic-info-group .hair-bang-group {
    flex: 1;
    width: 100%;
  }
  
  #basicInfoSection .thumbnail-group .file-input-with-preview {
    gap: 12px;
    height: auto; /* 모바일에서는 높이 제한 해제 */
  }
  
  #basicInfoSection .thumbnail-group .file-preview-circle {
    width: 50px;
    height: 50px;
  }
  
  #basicInfoSection .thumbnail-group .drag-drop-area {
    min-height: 50px;
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .field-group.basic-info-group .hair-bang-group .checkbox-container {
    height: auto; /* 모바일에서는 높이 제한 해제 */
    padding: 8px 0;
  }
}

.color-option-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.color-option-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.color-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.color-option-title {
  font-weight: 500;
  color: #495057;
  font-size: 13px;
}

.toggle-btn {
  background: #6c757d;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  color: white;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.toggle-btn:hover {
  background: #5a6268;
}

.toggle-btn.active {
  background: #28a745;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 500;
}

.status-indicator.required {
  background: #ffe6e6;
  color: #dc3545;
}

.status-indicator.optional {
  background: #e6ffe6;
  color: #28a745;
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.palette-preview-container {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.palette-preview-container .palette-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px dashed #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #999;
  flex-shrink: 0;
  line-height: 1;
  text-align: center;
}

.color-preview img {
  max-width: 28px;
  max-height: 28px;
  border-radius: 3px;
  border: 1px solid #ddd;
  flex-shrink: 0;
  margin-bottom: 0px;
}

.hair-resource-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 4px;
  margin-top: 4px;
}

.thumbnail-preview-container {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.thumbnail-preview-container .thumbnail-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #999;
  flex-shrink: 0;
  line-height: 1;
  text-align: center;
}

.thumbnail-preview-container img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e9ecef;
}

/* 일반 버튼 스타일 */
.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 캐릭터 옵션 다중 선택 관련 스타일 */
.char-multi-select-controls {
  display: none;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 8px;
  margin-right: 8px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.char-multi-select-controls.show {
  display: flex;
}

.char-multi-select-controls .select-info {
  font-size: 12px;
  color: #666;
  font-weight: normal;
  white-space: nowrap;
}

.char-multi-select-controls .btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  background-color: #dc3545;
  color: white;
  border: 1px solid #dc3545;
  cursor: pointer;
}

.char-multi-select-controls .btn-sm:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.char-multi-select-controls .btn-sm:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.65;
}

.char-multi-select-controls .checkbox-container {
  gap: 4px;
  align-items: center;
}

.char-multi-select-controls .checkbox-container input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.char-multi-select-controls .checkbox-container label {
  font-size: 12px;
  color: #666;
  font-weight: normal;
  white-space: nowrap;
}

/* 헤더 액션 영역 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 헤더 버튼들 */
.header-buttons {
  display: flex;
  gap: 5px;
}

.header-buttons .btn {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  border: 1px solid #ddd !important;
  background-color: white !important;
  color: #333 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.header-buttons .btn:hover {
  background-color: #f8f9fa !important;
  border-color: #007bff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* 스티커 관리 전용 아이템 카드 스타일 */
.item-card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.item-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.item-card.selected {
  border-color: #007bff;
  background-color: #e3f2fd;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.item-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 1;
}

.item-image-container {
  width: 100px;
  height: 100px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.item-card-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.animation-info {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.item-actions {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 10px;
}

/* 아이템 카드와 옵션 카드 상단 한 줄 정렬 */
.item-card>div:first-child,
.option-card>div:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  /* 왼쪽부터 시작 */
  margin-bottom: 8px !important;
  padding: 0 8px;
  height: 20px !important;
  /* 고정 높이 */
  position: relative !important;
  padding-left: 30px;
  /* 체크박스 공간 확보 */
}
/* .palette-option-card {
  max-width: 130px;
} */
.palette-option-image-container {
  height: 50px;
}
.palette-option-image-container img {
  max-width: 50px;
  max-height: 50px;
  object-fit: cover;
}

.palette-option-card-header {
  padding-left: 0px !important;
}

/* 체크박스를 첫 번째 div 앞에 위치 */
.item-checkbox,
.option-checkbox {
  position: absolute;
  top: 0px;
  /* div 높이 중앙 정렬 */
  left: 0px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 1;
}

/* 드래그 핸들을 첫 번째 요소로 */
.item-card .drag-handle,
.option-card .drag-handle {
  position: static !important;
  width: 20px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  line-height: 18px !important;
  margin-right: auto !important;
  /* 왼쪽에 고정 */
}

/* 순서 텍스트를 오른쪽 끝에 */
.item-card small,
.option-card small {
  font-size: 11px !important;
  color: #666;
  font-weight: 500 !important;
  margin-left: auto !important;
  /* 오른쪽 끝으로 밀어냄 */
}

/* 다중 업로드 컨테이너 스타일 */
.multi-upload-container {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin: 15px 0;
  background-color: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.multi-upload-container:hover {
  border-color: #007bff;
  background-color: #e3f2fd;
}

.multi-upload-container.dragover {
  border-color: #007bff;
  background-color: #e3f2fd;
}

/* 파일 아이템 스타일 */
.file-items-container {
  margin-top: 15px;
}

.file-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background-color: white;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.file-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.file-info {
  flex: 1;
}

.file-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.remove-file {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.remove-file:hover {
  background-color: #c82333;
}

/* 진행률 바 스타일 */
.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease;
}

.upload-status {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.animation-fields {
  border-top: 1px solid #e9ecef;
  padding-top: 15px;
  margin-top: 15px;
}

.animation-field {
  display: none;
}

.animation-field.show {
  display: block;
}

/* 옵션 카드에 체크박스 추가 */
.option-checkbox {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 10;
  opacity: 1;
  display: block;
}

.option-card.selected {
  border-color: #007bff;
  background-color: #e3f2fd;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.option-checkbox {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 10;
  opacity: 1;
  display: block;
}

.item-card.selected {
  border-color: #007bff;
  background-color: #e3f2fd;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.option-card.selected {
  border-color: #007bff;
  background-color: #e3f2fd;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* 캐릭터 옵션 관리 헤더 액션 영역 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 다중 업로드 UI 스타일 */
.upload-mode-selector {
  display: flex;
  gap: 20px;
  margin: 15px 0;
}

.mode-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.mode-option:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.mode-option input[type="radio"] {
  margin-bottom: 8px;
}

.mode-option input[type="radio"]:checked+.mode-label {
  color: #007bff;
  font-weight: 600;
}

.mode-option:has(input[type="radio"]:checked) {
  border-color: #007bff;
  background-color: #e3f2fd;
}

.mode-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

.mode-option small {
  color: #666;
  font-size: 12px;
  line-height: 1.3;
}

/* 업로드 가이드 */
.upload-guide {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.upload-guide h4 {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 14px;
}

.rule-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: white;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.rule-item code {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Pretendard", "SFMono-Regular", "Monaco", "Inconsolata",
    "Roboto Mono", monospace;
  font-size: 12px;
  min-width: 180px;
}

.rule-item span {
  color: #666;
  font-size: 12px;
}

.guide-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 8px;
  margin: 0;
  font-size: 12px;
  color: #856404;
}

/* 다중 파일 업로드 영역 */
.multi-file-upload-area {
  margin: 15px 0;
}

.upload-dropzone {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.upload-dropzone:hover {
  border-color: #007bff;
  background: #e3f2fd;
}

.upload-dropzone.dragover {
  border-color: #28a745;
  background: #d4edda;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  margin: 0 0 4px 0;
}

.upload-subtext {
  font-size: 12px;
  color: #6c757d;
  margin: 0;
}

/* 파싱 결과 표시 */
.parse-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.parse-results-header h4 {
  margin: 0;
  color: #495057;
}

.parse-stats {
  display: flex;
  gap: 15px;
  font-size: 12px;
}

.parse-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.parse-stat.success {
  background: #d4edda;
  color: #155724;
}

.parse-stat.error {
  background: #f8d7da;
  color: #721c24;
}

.parse-stat.warning {
  background: #fff3cd;
  color: #856404;
}

.parse-messages {
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 6px;
}

.parse-messages.error-messages {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.parse-messages.warning-messages {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.parse-messages h5 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.parse-messages ul {
  margin: 0;
  padding-left: 20px;
}

.parse-messages li {
  font-size: 12px;
  margin-bottom: 4px;
}

/* 옵션 미리보기 */
.options-preview {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.preview-option {
  border-bottom: 1px solid #e9ecef;
  padding: 15px;
}

.preview-option:last-child {
  border-bottom: none;
}

.preview-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.preview-option-title {
  font-weight: 600;
  color: #495057;
}

.preview-option-id {
  font-size: 12px;
  color: #6c757d;
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
}

.preview-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-color {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 8px;
  background: #f8f9fa;
  flex: 1;
  min-width: 150px;
}

.preview-color-name {
  font-size: 12px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 4px;
}

.preview-images {
  display: flex;
  gap: 6px;
}

.preview-image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.preview-image-thumb {
  width: 40px;
  height: 40px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  object-fit: cover;
}

.preview-image-label {
  font-size: 10px;
  color: #6c757d;
}

.preview-image-missing {
  width: 40px;
  height: 40px;
  border: 1px dashed #dee2e6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  color: #adb5bd;
  font-size: 10px;
}

/* 팔레트 일괄 교체 도구 스타일 */
.palette-batch-tool {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.tool-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.tool-controls .form-group:last-child {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: end;
}

.target-options-list {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.target-options-list h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 16px;
}

.target-option-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #f8f9fa;
}

.target-option-item:hover {
  background: #e9ecef;
}

.target-option-info {
  flex: 1;
  margin-left: 10px;
}

.target-option-category {
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.target-option-name {
  color: #6c757d;
  font-size: 12px;
  margin-top: 2px;
}

.target-option-color {
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  margin-left: 10px;
}

.batch-summary {
  margin-top: 15px;
  padding: 10px;
  background: #e3f2fd;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  color: #1976d2;
}

.batch-progress {
  margin-top: 15px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  display: none;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 12px;
  color: #6c757d;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .tool-controls {
    grid-template-columns: 1fr;
  }

  .tool-controls .form-group:last-child {
    grid-column: 1;
    flex-direction: column;
    align-items: stretch;
  }
}

/* 대시보드 스타일 */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.dashboard-content {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.dashboard-message {
  text-align: center;
  padding: 40px 20px;
}

.dashboard-message h3 {
  color: #ff6b35;
  font-size: 2rem;
  margin-bottom: 20px;
}

.dashboard-message p {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 10px;
  }

  .dashboard-content {
    padding: 20px;
  }

  .dashboard-message {
    padding: 20px 10px;
  }

  .dashboard-message h3 {
    font-size: 1.5rem;
  }

  .dashboard-message p {
    font-size: 1rem;
  }
}

/* 사용자 관리 테이블 스타일 */
#userTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#userTable th,
#userTable td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
  max-width: 0;
  /* 말줄임표를 위한 설정 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#userTable th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}

#userTable tbody tr:hover {
  background-color: #f8f9fa;
}

/* 특정 컬럼의 최대 너비 설정 */
#userTable th:nth-child(1),
/* 체크박스 */
#userTable td:nth-child(1) {
  max-width: 40px;
  min-width: 40px;
  padding: 8px 4px;
  text-align: center;
}

#userTable th:nth-child(2),
/* 아바타 / AR ID */
#userTable td:nth-child(2) {
  max-width: 100px;
  min-width: 100px;
}

#userTable th:nth-child(3),
/* 한글이름 */
#userTable td:nth-child(3) {
  max-width: 80px;
  min-width: 80px;
}

#userTable th:nth-child(4),
/* 영문이름 */
#userTable td:nth-child(4) {
  max-width: 90px;
  min-width: 90px;
}

#userTable th:nth-child(5),
/* 이메일 */
#userTable td:nth-child(5) {
  max-width: 160px;
  min-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#userTable th:nth-child(6),
/* 역할 */
#userTable td:nth-child(6) {
  max-width: 90px;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#userTable th:nth-child(7),
/* 부서 */
#userTable td:nth-child(7) {
  max-width: 80px;
  min-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#userTable th:nth-child(8),
/* 소속역할 */
#userTable td:nth-child(8) {
  max-width: 100px;
  min-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#userTable th:nth-child(9),
/* 전화번호 */
#userTable td:nth-child(9) {
  max-width: 100px;
  min-width: 100px;
}

#userTable th:nth-child(10),
/* 관리자 권한 */
#userTable td:nth-child(10) {
  max-width: 80px;
  min-width: 80px;
  text-align: center;
}

#userTable th:nth-child(11),
/* 명함 활성화 */
#userTable td:nth-child(11) {
  max-width: 80px;
  min-width: 80px;
  text-align: center;
}

#userTable th:nth-child(12),
/* 작업 */
#userTable td:nth-child(12) {
  max-width: 50px;
  min-width: 50px;
  text-align: center;
}

/* 아바타 이미지 스타일 */
#userTable .avatar-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

#userTable .avatar-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

#userTable .avatar-text {
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

/* 상태 아이콘 스타일 */
#userTable .status-icon {
  display: inline-block;
  font-size: 16px;
  margin: 0 2px;
  cursor: help;
  transition: transform 0.2s ease;
}

#userTable .status-icon:hover {
  transform: scale(1.2);
}

#userTable .status-icon.admin {
  color: #dc3545;
}

#userTable .status-icon.active {
  color: #28a745;
}

/* 기존 배지 스타일 (다른 곳에서 사용할 수 있으므로 유지) */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  min-width: 60px;
}

.status-badge.admin {
  background-color: #dc3545;
  color: white;
}

.status-badge.active {
  background-color: #28a745;
  color: white;
}

.status-badge.inactive {
  background-color: #6c757d;
  color: white;
}

/* 작업 버튼 스타일 */
#userTable .action-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#userTable .action-btn:hover {
  background-color: #e3f2fd;
}

/* 툴팁 스타일 (긴 텍스트를 위한) */
#userTable td[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 체크박스, 관리자 권한, 명함 활성화, 작업 버튼은 툴팁 제외 */
#userTable td:nth-child(1):hover::after,
#userTable td:nth-child(10):hover::after,
#userTable td:nth-child(11):hover::after,
#userTable td:nth-child(12):hover::after {
  display: none;
}

/* 사용자 관리 모달 스타일 */
#editUserModal .modal-content,
#createUserModal .modal-content {
  max-width: 800px;
  width: 90%;
}

#editUserModal .form-row,
#createUserModal .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

#editUserModal .form-row .form-group,
#createUserModal .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

#editUserModal .form-group:not(.form-row .form-group),
#createUserModal .form-group:not(.form-row .form-group) {
  margin-bottom: 15px;
}

/* 체크박스 그룹 스타일 개선 */
#editUserModal .checkbox-group,
#createUserModal .checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

#editUserModal .checkbox-group input[type="checkbox"],
#createUserModal .checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

#editUserModal .checkbox-group label,
#createUserModal .checkbox-group label {
  margin: 0;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
}

/* 모바일 반응형 */
@media (max-width: 768px) {

  #editUserModal .form-row,
  #createUserModal .form-row {
    flex-direction: column;
    gap: 15px;
  }

  #editUserModal .modal-content,
  #createUserModal .modal-content {
    width: 95%;
    margin: 20px auto;
  }
}

.palette-selector {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.palette-selection-area {
  flex: 1;
}

.palette-category-group {
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.palette-category-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 15px;
  font-weight: 600;
  font-size: 14px;
}

.palette-category-content {
  padding: 15px;
  background: white;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.palette-option {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.palette-option:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.palette-option.selected {
  border-color: #28a745;
  background-color: #f8fff9;
}

.palette-option img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  border: 2px solid #e9ecef;
}

.palette-option.selected img {
  border-color: #28a745;
}

.palette-option-name {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 4px;
}

.palette-option-id {
  font-size: 10px;
  color: #6c757d;
}

.no-palettes-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.no-palettes-message p {
  margin: 10px 0;
}

/* 컬러 선택 모달 스타일 */
.color-selector-modal {
  z-index: 3000;
  /* 기본 모달(2000)보다 높은 z-index */
}

.color-selector-modal .modal-content {
  max-width: 800px;
}

.color-selector-modal .palette-option {
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-selector-modal .palette-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-selector-modal .palette-option.selected {
  border: 2px solid #007bff;
  background-color: #f8f9ff;
}

/* 컬러 선택 영역 스타일 */
.color-selection-area {
  display: flex;
  gap: 12px;
  align-items: center;
}

.color-preview-container {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border: 2px dashed #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

.color-preview-container .preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.color-preview-container .preview-placeholder {
  text-align: center;
  color: #999;
  font-size: 10px;
  line-height: 1.1;
}

.color-selection-controls {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-selection-controls .color-name {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  min-width: 120px;
}

.color-selection-controls .color-name:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.color-selection-controls .btn {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.color-selection-controls small {
  display: none;
  /* 안내 텍스트 숨김 */
}

/* 대시보드 전용 스타일 */
/* 분석 대시보드 전용 스타일 */
.time-range-controls {
  display: flex;
  gap: 8px;
  margin-right: 20px;
}

.time-range-btn {
  padding: 8px 16px;
  font-size: 14px;
  border: 2px solid #6c757d;
  transition: all 0.3s ease;
}

.time-range-btn:hover:not(.active) {
  background-color: #545b62;
  border-color: #545b62;
}

.time-range-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auto-refresh-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  width: fit-content;
  min-width: 16px;
}

.auto-refresh-toggle input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  /* flex-shrink: 0; */
  margin: 0;
  max-width: 16px;
}

.last-update {
  margin-top: 0px;
  font-size: 12px;
  color: #666;
  text-align: right;
}

/* 통계 카드 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #e0e0e0;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card.realtime {
  border-left: 4px solid #ff4444;
}

.stat-icon {
  font-size: 32px;
  opacity: 0.8;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.stat-subtext {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.stat-success-rate {
  font-size: 12px;
  color: #28a745;
  margin-top: 4px;
  font-weight: 500;
}

/* 세션 플로우 */
.flow-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  min-width: 150px;
}

.flow-step-icon {
  font-size: 24px;
}

.flow-step-value {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
}

.flow-step-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.flow-arrow {
  font-size: 24px;
  color: #999;
  font-weight: bold;
}

/* 차트 컨테이너 */
.chart-container {
  position: relative;
  height: 400px;
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* 차트 내부 캔버스 반응형 처리 */
.chart-container canvas {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  overflow: hidden;
}

.charts-full {
  grid-column: span 2;
}

.chart-half .chart-container {
  height: 300px;
  min-width: 0;
  overflow: hidden;
}

.chart-half h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 사용자 분석 전용 스타일 */
.user-analytics-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.user-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.user-stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #e0e0e0;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.user-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-stat-icon {
  font-size: 32px;
  opacity: 0.8;
}

.user-stat-content {
  flex: 1;
}

.user-stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 4px;
}

.user-stat-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.user-stat-subtext {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.user-trends-chart {
  position: relative;
}

.chart-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.chart-control-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-control-btn:hover {
  background: #f8f9fa;
}

.chart-control-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* TOP 10 사용자 테이블 */
.top-users-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-users-table-container {
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.top-users-table {
  width: 100%;
  border-collapse: collapse;
}

.top-users-table th,
.top-users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.top-users-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.top-users-table tr:hover {
  background: #f8f9fa;
}

.loading-cell,
.no-data {
  text-align: center;
  color: #666;
  font-style: italic;
}

.user-row {
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-row:hover {
  background: #e3f2fd !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-row.registered-user {
  background: #f8fff8;
}

.user-row.registered-user:hover {
  background: #e8f5e8 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-row.temp-user {
  background: #fff8f8;
}

.user-row.temp-user:hover {
  background: #fde8e8 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-display {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.user-name {
  font-weight: 600;
  align-items: center;
  color: #333;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}

.user-role,
.user-part {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}

/* 섹션 헤더 및 컨트롤 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.limit-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.limit-selector label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.limit-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 80px;
}

.limit-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.custom-limit-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: 80px;
  text-align: center;
}

.custom-limit-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 사용자 상세 차트 */
.user-detail-chart {
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e0e0e0;
}

.user-detail-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
}

.selected-user-stats {
  font-size: 14px;
  color: #666;
}

/* 대시보드 반응형 디자인 */
@media (max-width: 768px) {
  .time-range-controls {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  .control-buttons {
    flex-wrap: wrap;
  }

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

  .flow-stats {
    flex-direction: column;
    gap: 10px;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .charts-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .chart-container {
    height: 300px;
    padding: 15px;
    min-width: 0;
  }

  .chart-half .chart-container {
    height: 250px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .limit-selector {
    flex-wrap: wrap;
    gap: 6px;
  }

  .limit-selector label {
    font-size: 13px;
  }

  .limit-select {
    min-width: 70px;
    font-size: 13px;
  }

  .custom-limit-input {
    width: 70px;
    font-size: 13px;
  }

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

  .top-users-table {
    font-size: 14px;
  }

  .top-users-table th,
  .top-users-table td {
    padding: 8px;
  }

  .user-detail-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .flow-step {
    min-width: auto;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .stat-card {
    text-align: center;
    flex-direction: column;
    gap: 10px;
  }

  .chart-container {
    height: 250px;
    padding: 10px;
  }

  .chart-half .chart-container {
    height: 200px;
  }

  .charts-row {
    gap: 10px;
  }
}

/* AR ID 중복 체크 스타일 */
.arid-input-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.arid-status {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.arid-status.available {
  color: #28a745;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

.arid-status.unavailable {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.arid-status.loading {
  color: #6c757d;
  background-color: #e2e3e5;
  border: 1px solid #d6d8db;
}

.arid-status.invalid {
  color: #856404;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
}

/* 이메일 중복 체크 스타일 */
.email-input-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-status {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.email-status.available {
  color: #28a745;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

.email-status.unavailable {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

.email-status.loading {
  color: #6c757d;
  background-color: #e2e3e5;
  border: 1px solid #d6d8db;
}

.email-status.invalid {
  color: #856404;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
}

/* 자동완성 컨테이너 스타일 */
.autocomplete-container {
  position: relative;
  width: 100%;
}

.autocomplete-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.autocomplete-options.show {
  display: block;
}

.autocomplete-option {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.2s;
  font-size: 14px;
}

.autocomplete-option:hover {
  background-color: #f8f9fa;
}

.autocomplete-option:last-child {
  border-bottom: none;
}

.autocomplete-option.highlight {
  background-color: #007bff;
  color: white;
}

.autocomplete-container input:focus+.autocomplete-options {
  border-color: #007bff;
}

/* 인기 스티커 통계 스타일 */
.popular-stickers-container {
  margin-top: 20px;
}

.popular-stickers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .popular-stickers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.popular-sticker-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 12px 20px 20px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  min-height: 180px;
}

.popular-sticker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 상단 라인 디자인 제거 */

.sticker-rank {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #a6a6a6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(100, 100, 100, 0.3);
  z-index: 10;
}

.sticker-rank.top-3 {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.sticker-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 10px;
  height: 130px;
}

.sticker-thumbnail {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #f0f0f0;
  background: #f8f9fa;
  flex-shrink: 0;
}

.sticker-thumbnail.missing {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 36px;
}

.sticker-info {
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  height: 130px;
  margin-right: 45px;
  padding-top: 5px;
}

.sticker-name {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
  max-height: 70px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-grow: 1;
}

/* 스티커 카테고리 제거됨 */

.sticker-stats {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: auto;
  margin: 0px;
  padding: 0px;
}

.sticker-stat {
  position: relative;
  text-align: center;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 80px;
  top: 10px;
  left: 0px;
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
}

.sticker-stat span {
  white-space: nowrap;
}

.sticker-stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #667eea;
  display: block;
  line-height: 1.2;
}

.sticker-stat-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
  margin-top: 2px;
}

/* 사용자 툴팁 스타일 */
.user-tooltip {
  position: fixed !important;
  background: #ff0000 !important;
  /* 빨간색으로 임시 변경 - 보이는지 확인용 */
  border: 3px solid #000000 !important;
  /* 굵은 검은색 테두리 */
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8) !important;
  /* 더 진한 그림자 */
  z-index: 99999 !important;
  /* 더 높은 z-index */
  max-width: 300px !important;
  min-width: 200px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: none !important;
  color: white !important;
  /* 흰색 텍스트 */
  font-size: 14px !important;
  font-weight: bold !important;
}

.tooltip-header {
  background: var(--primary-color);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid #e9ecef;
  border-radius: 16px 16px 0 0;
}

.tooltip-content {
  padding: 8px 0;
  max-height: 200px;
  overflow-y: auto;
}

.user-item {
  padding: 6px 12px;
  font-size: 13px;
  color: #495057;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
}

.user-item:last-child {
  border-bottom: none;
}

.user-item:hover {
  background-color: #f8f9fa;
}

.no-users {
  padding: 12px;
  font-size: 13px;
  color: #6c757d;
  font-style: italic;
  text-align: center;
}

/* 스티커 카드 호버 효과 강화 */
.popular-sticker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.loading-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.loading-placeholder .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.no-stickers-message {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.no-stickers-message .icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.no-stickers-message h4 {
  margin: 0 0 10px 0;
  color: #495057;
}

.no-stickers-message p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 768px) {
  .popular-stickers-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .popular-sticker-card {
    padding: 15px;
  }

  .sticker-content {
    gap: 15px;
    height: 100px;
  }

  .sticker-thumbnail {
    width: 80px;
    height: 80px;
  }

  .sticker-thumbnail.missing {
    font-size: 24px;
  }

  .sticker-name {
    font-size: 16px;
  }

  .sticker-stats {
    justify-content: center;
  }

  .sticker-stat {
    padding: 6px 12px;
    min-width: 70px;
  }

  .sticker-stat-value {
    font-size: 16px;
  }
}

/* =====================================
   라벨 관리 시스템 스타일
   ===================================== */

/* 라벨 상태 패널 */
.label-status-panel {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.status-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.status-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-label {
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 20px;
}

/* 라벨 통계 패널 */
.label-stats-panel {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.label-stats-panel h4 {
  margin: 0 0 16px 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-title {
  font-size: 14px;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #495057;
  line-height: 1;
}

.stat-desc {
  font-size: 11px;
  color: #868e96;
  margin-top: 4px;
}

/* 통계 테이블 */
.stats-details {
  margin-top: 20px;
}

.stats-details h5 {
  margin: 0 0 12px 0;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stats-table thead th {
  background: #495057;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 12px 8px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  color: #495057;
}

.stats-table tbody tr:hover {
  background: #f8f9fa;
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

/* 라벨 배지 */
.label-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  color: white;
  margin: 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 제어 버튼 추가 스타일 */
.controls .btn {
  margin-right: 8px;
  margin-bottom: 8px;
}

.controls .btn:last-child {
  margin-right: 0;
}

.controls .btn span {
  margin-right: 4px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .label-status-panel {
    padding: 16px;
  }

  .status-item {
    padding: 12px;
  }

  .status-value {
    font-size: 14px;
  }

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

  .stats-table {
    font-size: 11px;
  }

  .stats-table thead th,
  .stats-table tbody td {
    padding: 8px 6px;
  }

  .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .controls .btn {
    flex: 1;
    min-width: calc(50% - 4px);
    margin: 0;
    font-size: 13px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .status-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .controls .btn {
    flex: none;
    width: 100%;
  }
}

/* 라벨 관리 시스템 추가 스타일 */
.label-badge.label-auto {
  background-color: #6c757d;
  color: white;
}

.label-badge.label-manual {
  background-color: #007bff;
  color: white;
}

.label-badge.label-new {
  background-color: #28a745;
  /* 초록 */
  color: white;
}

.label-badge.label-hot {
  background-color: #dc3545;
  /* 빨강 */
  color: white;
}

.label-badge.label-popular {
  background-color: #ffc107;
  /* 노랑 */
  color: white;
}

.label-badge.label-featured {
  background-color: #007bff;
  /* 파랑 */
  color: white;
}

.category-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 20px;
}

.category-labels {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-labels strong {
  color: #666;
  font-size: 12px;
}

/* 라벨 관리 모달 스타일 */
.current-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 15px;
}

.label-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.checkbox-item {
  display: flex;
  padding: 12px;
  min-height: 40px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  transition: all 0.2s ease;

  flex-direction: column;
  flex-wrap: nowrap;
  align-content: flex-start;
  justify-content: space-evenly;
  align-items: center;
}

.checkbox-item:hover {
  border-color: #007bff;
  background-color: #f8f9ff;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 10px;
  margin-top: 2px;
  transform: scale(1.2);
  flex-shrink: 0;
}

.label-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  width: 100%;
}

.label-description {
  color: #666;
  font-size: 12px;
  flex-shrink: 0;
}

.label-info {
  background-color: #e9ecef;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.label-info p {
  margin-bottom: 8px;
}

.label-info p:last-child {
  margin-bottom: 0;
}

.label-info strong {
  color: #495057;
}

.label-info em {
  color: #6c757d;
  font-style: italic;
}

/* 라벨 통계 테이블 스타일 */
.stats-table .label-badge {
  margin: 1px;
  font-size: 9px;
  padding: 1px 6px;
}

/* 통계 요약 스타일 */
.stats-summary {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
  border: 1px solid #e9ecef;
}

.summary-item {
  margin-bottom: 8px;
  font-size: 14px;
  color: #495057;
}

.summary-item:last-child {
  margin-bottom: 0;
}

.summary-item strong {
  color: #212529;
  margin-right: 8px;
}

/* 아이템 라벨 스타일 */
.item-labels {
  position: absolute;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0;
  width: 100%;
  justify-content: center;
}

.item-labels .label-badge {
  font-size: 8px;
  padding: 1px 4px;
  margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .category-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .category-labels {
    margin-left: 20px;
  }

  .label-checkboxes {
    grid-template-columns: 1fr;
  }

  .checkbox-item {
    padding: 8px;
  }

  .label-checkbox-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .label-description {
    margin-left: 0;
    font-size: 11px;
  }

  .item-labels {
    justify-content: flex-start;
  }
}

/* ===== 공통 컴포넌트 스타일 ===== */

/* 공통 모달 스타일 */
.common-modal .modal-content {
  position: absolute;
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.common-modal .modal-header {
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  border-radius: 12px 12px 0 0;
}

.common-modal .modal-footer {
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-radius: 0 0 12px 12px;
}

/* 공통 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-down {
  animation: slideDown 0.3s ease;
}

/* 공통 스크롤바 스타일 */
.common-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.common-scrollbar::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

.common-scrollbar::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

.common-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* 공통 로딩 오버레이 */
.common-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.common-loading-content {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.common-loading-content .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
  border-color: var(--primary-color);
  border-right-color: transparent;
  animation: spin 1s linear infinite;
}

.common-loading-content p {
  margin-top: 1rem;
  margin-bottom: 0;
  color: var(--gray-600);
  font-weight: 500;
}

/* 컬러 옵션 카드 스타일 */
.color-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.color-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: normal;
  padding: 8px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 60px;
}

.color-option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.color-option-card.selected {
  border-color: #007bff;
  background: #f8f9ff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.color-preview {
  position: relative;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border-radius: 50%;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-preview img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 50%;
}

.color-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 50%;
}

.color-placeholder {
  font-size: 14px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
}

.color-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #495057;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-selection-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.color-selection-indicator.active {
  background: #007bff;
  border-color: #007bff;
}

.selection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.color-selection-indicator.active .selection-dot {
  opacity: 1;
}

/* 반응형 조정 */
@media (max-width: 768px) {
  .color-options-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
  }
  
  .color-option-card {
    padding: 6px;
    min-height: 70px;
  }
  
  .color-preview {
    width: 32px;
    height: 32px;
  }
  
  .color-name {
    font-size: 0.7rem;
  }
}

/* 선택된 컬러 표시 및 모달 관련 스타일 */
.selected-color-display {
  position: relative;
  cursor: pointer;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: auto;
}

/* 선택된 컬러 표시의 미리보기 크기를 50% 축소 */
.selected-color-display .color-option-card.display-only .color-preview {
  width: 20px;
  height: 20px;
  margin-bottom: 0;
}

.selected-color-display .color-option-card {
  margin-bottom: 4px;
  pointer-events: none; /* 클릭 이벤트를 부모로 위임 */
}

.selected-color-display .color-option-card.display-only {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0px;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 선택된 컬러 표시에서 컬러 이름과 선택 토글 숨기기 */
.selected-color-display .color-option-card.display-only .color-name {
  display: none;
}

.selected-color-display .color-option-card.display-only .color-selection-indicator {
  display: none;
}


.color-modal-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  background: transparent;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  font-size: 0.7rem;
  color: #6c757d;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.color-modal-trigger:hover {
  background: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
}

.expand-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  margin-left: 4px;
}

.color-modal-trigger:hover .expand-icon {
  transform: rotate(180deg);
}

/* 컬러 모달 스타일 */
.color-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.color-modal-overlay.show {
  opacity: 1;
}

.color-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 90vw;
  max-height: 90vh;
  width: 600px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.color-modal-overlay.show .color-modal {
  transform: scale(1);
}

.color-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.color-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.color-modal-content {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.color-modal-content .color-options-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.color-modal-content .color-option-card {
  min-height: 100px;
  padding: 12px;
}

.color-modal-content .color-preview {
  width: 50px;
  height: 50px;
  margin-bottom: 8px;
}

.color-modal-content .color-name {
  font-size: 0.8rem;
}

/* 모달 반응형 */
@media (max-width: 768px) {
  .color-modal {
    width: 95vw;
    margin: 20px;
  }
  
  .color-modal-header {
    padding: 16px 20px;
  }
  
  .color-modal-header h3 {
    font-size: 1rem;
  }
  
  .color-modal-content {
    padding: 20px;
    max-height: 70vh;
  }
  
  .color-modal-content .color-options-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .color-modal-content .color-option-card {
    min-height: 90px;
    padding: 10px;
  }
  
  .color-modal-content .color-preview {
    width: 45px;
    height: 45px;
  }
  
  .selected-color-display {
    padding: 0;
    min-height: auto;
  }
  
  .selected-color-display .color-option-card.display-only .color-preview {
    width: 18px;
    height: 18px;
  }
  
  .color-modal-trigger {
    font-size: 0.65rem;
    padding: 2px 4px;
  }
}

/* =================================
   스티커 사용자 모달 스타일
   ================================= */

/* 모달 오버레이 */
#stickerUsersModal.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 90vw;
  max-height: 90vh;
  width: 600px;
  overflow: hidden;
  /* animation: slideIn 0.3s ease-out; */
}

.modal-lg .modal-content {
  max-width: 800px;
  width: 90vw;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 모달 헤더 */
#stickerUsersModal .modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #f8f9fa;
}

.modal-title-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.modal-sticker-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-sticker-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-title-info {
  flex: 1;
}

#stickerUsersModal .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
}

.modal-sticker-stats {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #6c757d;
}

#stickerUsersModal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stickerUsersModal .modal-close:hover {
  background: #f8f9fa;
  color: #343a40;
}

/* 모달 바디 */
#stickerUsersModal .modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

/* 사용자 그리드 */
#stickerUsersModal .users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.user-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.user-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  position: relative;
}

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

.user-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 50%;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c3e50;
  margin-bottom: 2px;
}

.user-id {
  font-size: 0.8rem;
  color: #6c757d;
}

.user-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f3f4;
}

.user-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.user-detail-row:last-child {
  margin-bottom: 0;
}

.user-detail-label {
  color: #6c757d;
}

.user-detail-value {
  font-weight: 500;
  color: #495057;
}

/* 로딩 메시지 */
#stickerUsersModal .loading-message {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-size: 0.95rem;
}

/* 사용자 없음 메시지 */
.no-users-message {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.no-users-message .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.no-users-message h4 {
  margin-bottom: 8px;
  color: #495057;
}

/* 모달 푸터 */
#stickerUsersModal .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 클릭 가능한 스티커 카드 스타일 개선 */
.popular-sticker-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.popular-sticker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.popular-sticker-card:active {
  transform: translateY(0);
}

/* 스티커 모달 반응형 */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    margin: 20px;
  }
  
  .modal-lg .modal-content {
    width: 95vw;
  }
  
  #stickerUsersModal .users-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-title-container {
    gap: 12px;
  }
  
  .modal-sticker-thumbnail {
    width: 40px;
    height: 40px;
  }
  
  #stickerUsersModal .modal-title {
    font-size: 1.1rem;
  }
}

/* ========================================
   토글 스위치 스타일 (사용자 관리)
   ======================================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.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: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

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

.toggle-switch input:checked + .toggle-slider {
  background-color: #4caf50;
}

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

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   일괄 초기화 진행 상황 오버레이
======================================== */

.progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.progress-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.progress-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.progress-body {
  padding: 30px;
}

.progress-info {
  margin-bottom: 25px;
  text-align: center;
}

.progress-info p {
  margin: 0 0 15px 0;
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

.progress-bar-container {
  width: 100%;
  height: 30px;
  background-color: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
}

#progressCount {
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
}

.progress-details {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.progress-stat {
  text-align: center;
  font-size: 1rem;
  color: #555;
}

.progress-stat span {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 5px;
}

#progressSuccess span {
  color: #4caf50;
}

#progressFail span {
  color: #f44336;
}