/* ========== CSS 변수 (디자인 시스템) ========== */
:root {
  /* YouTube Red Theme */
  --color-primary: #FF0000;
  --color-primary-dark: #CC0000;
  --color-primary-light: #FF3333;
  --color-secondary: #282828;
  --color-secondary-dark: #181818;
  --color-secondary-light: #404040;
  --color-accent: #CC0000;

  /* Background */
  --color-bg-gradient-start: #FF0000;
  --color-bg-gradient-end: #CC0000;

  /* Text Colors */
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-light: #999999;
  --color-text-white: #ffffff;

  /* UI Colors */
  --color-success: #28a745;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-info: #17a2b8;

  /* Neutral Colors */
  --color-gray-50: #f9f9f9;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e0e0e0;
  --color-gray-300: #ddd;
  --color-gray-400: #999;
  --color-gray-500: #666;
  --color-gray-600: #555;
  --color-gray-700: #333;

  /* Border & Shadow */
  --border-radius: 6px;
  --border-radius-lg: 12px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: '맑은 고딕', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-gray-50);
  min-height: 100vh;
  padding: 20px 0;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background-color: #ffffff;
  color: var(--color-text-primary);
  padding: 20px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--box-shadow-lg);
}

header h1 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

header p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 15px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.top-nav a {
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  background-color: transparent;
}

.top-nav a:hover {
  background-color: var(--color-gray-100);
  color: var(--color-primary);
}

.top-nav a.active {
  background-color: var(--color-primary);
  color: var(--color-text-white);
}

main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

section {
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

section h2 {
  margin-bottom: 15px;
  color: var(--color-text-primary);
  border-bottom: 3px solid var(--color-primary);
  padding-bottom: 8px;
  font-size: 16px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-weight: 600;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-gray-50);
}

/* ========== 버튼 시스템 (표준화) ========== */

/* 버튼 베이스 스타일 */
.btn,
button[class*="btn-"] {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus,
button[class*="btn-"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.25);
}

/* 버튼 크기 - Extra Small */
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 3px;
}

/* 버튼 크기 - Small */
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

/* 버튼 크기 - Medium (기본) */
.btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* 버튼 크기 - Large */
.btn-lg {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
}

/* 전체 너비 버튼 */
.btn-block {
  display: block;
  width: 100%;
}

/* 버튼 타입 - Primary (YouTube Red) */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  border: 1px solid var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(255, 0, 0, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 0, 0, 0.2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-gray-200);
  transition: all 0.2s;
}

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

.stat-label {
  display: block;
  color: #666;
  font-size: 12px;
  margin-bottom: 5px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background-color: #f5f5f5;
  color: #333;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  font-size: 13px;
}

table td {
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

table tr:hover {
  background-color: #f9f9f9;
}

.no-data {
  text-align: center;
  color: #999;
  padding: 20px !important;
}

/* Empty State - 빈 상태 개선 */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  color: var(--color-text-secondary);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}

.empty-state-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.empty-state-action {
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.status.pending {
  background-color: #fff3cd;
  color: #856404;
}

.status.completed {
  background-color: #d4edda;
  color: #155724;
}

/* 버튼 타입 - Secondary (YouTube Dark) */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-white);
  border: 1px solid var(--color-secondary);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 버튼 타입 - Success */
.btn-success {
  background-color: #28a745;
  color: white;
  border: 1px solid #28a745;
}

.btn-success:hover:not(:disabled) {
  background-color: #218838;
  border-color: #1e7e34;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-success:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 버튼 타입 - Danger */
.btn-danger {
  background-color: #dc3545;
  color: white;
  border: 1px solid #dc3545;
}

.btn-danger:hover:not(:disabled) {
  background-color: #c82333;
  border-color: #bd2130;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-danger:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 버튼 타입 - Info */
.btn-info {
  background-color: #17a2b8;
  color: white;
  border: 1px solid #17a2b8;
}

.btn-info:hover:not(:disabled) {
  background-color: #138496;
  border-color: #117a8b;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-info:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 버튼 타입 - Warning */
.btn-warning {
  background-color: #ffc107;
  color: #212529;
  border: 1px solid #ffc107;
}

.btn-warning:hover:not(:disabled) {
  background-color: #e0a800;
  border-color: #d39e00;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-warning:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 버튼 비활성 상태 (모든 타입 공통) */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-success:disabled,
.btn-danger:disabled,
.btn-info:disabled,
.btn-warning:disabled,
button:disabled[class*="btn-"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

/* 채팅 섹션 스타일 */
.chat-section {
  /* 1열 레이아웃으로 span 불필요 */
}

.youtube-url-section {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.youtube-url-section .form-group {
  margin-bottom: 0;
}

.chat-status {
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 6px;
  text-align: center;
}

.status-indicator {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.status-indicator.online {
  background-color: #28a745;
  color: white;
}

.status-indicator.offline {
  background-color: #6c757d;
  color: white;
}

.chat-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.chat-controls .btn-primary,
.chat-controls .btn-secondary {
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

.chat-messages {
  background-color: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  height: 300px;
  overflow-y: auto;
}

.chat-message {
  background-color: white;
  border-left: 4px solid #003366;
  padding: 8px 12px;
  margin-bottom: 5px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-message:hover {
  transform: translateX(5px);
}

.chat-message.order-message {
  border-left-color: #28a745;
  background-color: #f0f8f4;
}

.chat-message.processed {
  opacity: 0.6;
  border-left-color: #999;
}

.chat-author {
  font-weight: bold;
  color: #003366;
  font-size: 13px;
  min-width: 100px;
  flex-shrink: 0;
}

.chat-text {
  color: #333;
  font-size: 13px;
  flex: 1;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-time {
  color: #888;
  font-size: 11px;
  min-width: 60px;
  flex-shrink: 0;
  text-align: right;
}

.chat-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.chat-actions .btn-sm {
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

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

  header h1 {
    font-size: 24px;
  }

  .chat-controls {
    flex-direction: column;
  }

  .chat-controls .btn-primary,
  .chat-controls .btn-secondary {
    width: 100%;
  }

  .top-nav {
    flex-direction: column;
    gap: 8px;
  }

  .top-nav a {
    width: 100%;
  }

  /* 모바일에서는 채팅 메시지를 여러 줄로 표시 */
  .chat-message {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .chat-author,
  .chat-time {
    min-width: auto;
  }

  .chat-text {
    white-space: normal;
    width: 100%;
  }

  .chat-actions {
    width: 100%;
  }
}

/* ============================================================
   Phase 4: KPI 증감률 표시 스타일
   ============================================================ */

.change-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.change-indicator.up {
  color: #28a745;
  background-color: #e8f5e9;
}

.change-indicator.up::before {
  content: "↑";
  font-size: 16px;
  font-weight: bold;
}

.change-indicator.down {
  color: #dc3545;
  background-color: #ffebee;
}

.change-indicator.down::before {
  content: "↓";
  font-size: 16px;
  font-weight: bold;
}

.change-indicator.stable {
  color: #666;
  background-color: #f5f5f5;
}

.change-indicator.stable::before {
  content: "→";
  font-size: 16px;
  font-weight: bold;
}

/* ============================================================
   Phase 3 누락 기능: 차트 로딩 스피너 애니메이션
   ============================================================ */

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

.chart-loading {
  position: relative;
  opacity: 0.6;
}

.chart-error {
  border: 2px dashed var(--color-danger, #dc3545);
}

/* ============================================================
   Phase 5: 반응형 차트 스타일
   ============================================================ */

.chart-container {
  position: relative;
  width: 100%;
  min-height: 300px;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container canvas {
  max-width: 100%;
  height: auto !important;
}

/* 태블릿 (768px ~ 1024px) */
@media (max-width: 1024px) {
  .chart-container {
    min-height: 250px;
    padding: 15px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 모바일 (~ 767px) */
@media (max-width: 767px) {
  .chart-container {
    min-height: 200px;
    padding: 10px;
    margin-bottom: 20px;
  }

  .chart-container canvas {
    height: 200px !important;
  }

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

  .dashboard-card {
    padding: 15px;
  }

  .dashboard-card .value {
    font-size: 24px;
  }

  .dashboard-card h3 {
    font-size: 14px;
  }
}

/* 고객 및 상품 관리 페이지 스타일 */
.customer-form,
.product-form {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* order-form은 order-list 안에 포함되므로 max-width 제한 없음 */
.order-form {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.customer-list,
.product-list,
.order-list {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
  font-family: inherit;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #003366;
  background-color: #f9f9f9;
}

.out-of-stock {
  color: #dc3545;
  font-weight: bold;
}

.low-stock {
  color: #ff9800;
  font-weight: bold;
}

.description-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

  /* 모바일에서는 가로 길이 제한 제거 */
  .customer-form,
  .product-form,
  .customer-list,
  .product-list,
  .order-list {
    max-width: none;
  }
}

/* ========== 로딩 상태 스타일 ========== */

/* 전역 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

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

/* 로딩 스피너 */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 인라인 로딩 스피너 (작은 크기) */
.spinner-sm {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 51, 102, 0.3);
  border-top-color: #003366;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

/* 테이블 로딩 상태 */
.table-loading {
  position: relative;
  min-height: 200px;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.table-loading tbody {
  opacity: 0.3;
  pointer-events: none;
}

/* 로딩 중 메시지 */
.loading-message {
  text-align: center;
  color: #666;
  padding: 40px 20px;
  font-size: 14px;
}

.loading-message .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 51, 102, 0.3);
  border-top-color: #003366;
  margin: 0 auto 15px;
}

/* 버튼 로딩 상태 */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  right: 10px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* 스켈레톤 UI */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-row {
  height: 50px;
  margin-bottom: 8px;
}

.skeleton-text {
  height: 20px;
  width: 100%;
  margin-bottom: 10px;
}

.skeleton-text.short {
  width: 60%;
}

/* 섹션 로딩 상태 */
.section-loading {
  position: relative;
  min-height: 300px;
  opacity: 0.6;
  pointer-events: none;
}

.section-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 51, 102, 0.3);
  border-top-color: #003366;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 5;
}

/* 데이터 없음 vs 로딩 중 구분 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 12px;
  margin: 20px 0;
  border: 2px dashed var(--color-gray-200);
  animation: fadeIn 0.5s ease-in;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
  display: block;
}

.empty-state h3 {
  color: #333;
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 600;
}

.empty-state p {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.empty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.empty-actions button {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-weight: 500;
}

.empty-actions .btn-primary {
  background: var(--color-primary);
  color: white;
}

.empty-actions .btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.3);
}

.empty-actions .btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.empty-actions .btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.empty-tips {
  background: var(--color-gray-50);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
  margin-top: 20px;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.empty-tips small {
  color: #555;
  line-height: 1.6;
  font-size: 13px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 기존 스타일 (호환성 유지) */
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.empty-state-subtext {
  font-size: 14px;
  color: #999;
}

/* ========== 도움말 시스템 (Help System) ========== */

/* Info Icon - 정보 아이콘 */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background-color: var(--color-info);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
  margin-left: 5px;
  transition: all 0.2s;
  vertical-align: middle;
}

.info-icon:hover {
  background-color: var(--color-primary);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

/* Tooltip - 간단한 툴팁 */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 1000;
  background-color: #333;
  color: white;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  width: 250px;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s, visibility 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Help Modal - 도움말 모달 */
.help-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease-in;
}

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

.help-modal-content {
  background-color: white;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

.help-modal-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.help-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.help-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.help-modal-close:hover {
  transform: rotate(90deg);
}

.help-modal-body {
  padding: 25px;
  max-height: calc(80vh - 160px);
  overflow-y: auto;
}

.help-modal-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--color-gray-200);
  text-align: center;
  background-color: var(--color-gray-50);
  border-radius: 0 0 12px 12px;
}

.help-modal-footer .btn {
  min-width: 200px;
}

.help-section {
  margin-bottom: 25px;
}

.help-section h3 {
  color: var(--color-text-primary);
  font-size: 18px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
}

.help-section p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.help-section ul {
  margin-left: 20px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.help-section code {
  background-color: var(--color-gray-100);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--color-primary);
}

/* Help Button - 도움말 버튼 */
.btn-help {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
  transition: all 0.3s;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-help:hover {
  background: var(--color-primary-dark);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

/* Shepherd.js 커스텀 스타일 */
.shepherd-element {
  z-index: 1950 !important;
}

.shepherd-modal-overlay-container {
  z-index: 1800 !important;
}

.shepherd-content {
  border-radius: 12px !important;
  padding: 0 !important;
}

.shepherd-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 15px 20px;
  border-radius: 12px 12px 0 0;
}

.shepherd-title {
  color: white !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.shepherd-text {
  padding: 20px !important;
  color: var(--color-text-secondary) !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
}

.shepherd-footer {
  padding: 15px 20px !important;
  border-top: 1px solid var(--color-gray-200) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.shepherd-button {
  padding: 8px 16px !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
  font-weight: 500 !important;
}

.shepherd-button-secondary {
  background: var(--color-gray-200) !important;
  color: var(--color-text-primary) !important;
}

.shepherd-button-secondary:hover {
  background: var(--color-gray-300) !important;
}

.shepherd-button-primary {
  background: var(--color-primary) !important;
  color: white !important;
}

.shepherd-button-primary:hover {
  background: var(--color-primary-dark) !important;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== 알림 센터 스타일 ========== */
.notification-center {
  position: relative;
  display: inline-block;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-bell:hover {
  background-color: rgba(255, 0, 0, 0.1);
}

.notification-bell svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-primary);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-danger);
  color: white;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 500px;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.notification-dropdown-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-gray-50);
}

.notification-dropdown-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.notification-dropdown-header .btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.notification-dropdown-header .btn-text:hover {
  background-color: rgba(255, 0, 0, 0.1);
}

.notification-list {
  max-height: 380px;
  overflow-y: auto;
}

.notification-empty {
  padding: 60px 20px;
  text-align: center;
}

.notification-empty p {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin: 0;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--color-gray-100);
  position: relative;
}

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

.notification-item:hover {
  background-color: var(--color-gray-50);
}

.notification-item.unread {
  background-color: #fff9f9;
}

.notification-item.unread:hover {
  background-color: #fff5f5;
}

.notification-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

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

.notification-message {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.5;
  word-wrap: break-word;
}

.notification-item.unread .notification-message {
  font-weight: 500;
}

.notification-time {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.notification-unread-dot {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

.notification-dropdown-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--color-gray-200);
  text-align: center;
  background: var(--color-gray-50);
}

.notification-dropdown-footer .btn-text {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.notification-dropdown-footer .btn-text:hover {
  background-color: rgba(255, 0, 0, 0.1);
}

/* 스크롤바 스타일 */
.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

.notification-list::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

/* ========== Delivery Tracking Animations ========== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

/* ========== Table Horizontal Scroll ========== */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar {
  height: 12px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 6px;
}

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