/* ========== 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;
  --color-bg-body: #f9f9f9;
  --color-bg-card: #ffffff;
  --color-bg-input: #ffffff;

  /* 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);
  --color-border: #e0e0e0;

  /* Table */
  --color-table-header: #f5f5f5;
  --color-table-row-hover: #f9f9f9;
  --color-table-border: #f0f0f0;
}

/* ========== 다크모드 ========== */
[data-theme="dark"] {
  /* Background */
  --color-bg-body: #121212;
  --color-bg-card: #1e1e1e;
  --color-bg-input: #2a2a2a;

  /* Text Colors */
  --color-text-primary: #e0e0e0;
  --color-text-secondary: #a0a0a0;
  --color-text-light: #707070;

  /* Neutral Colors (반전) */
  --color-gray-50: #1a1a1a;
  --color-gray-100: #252525;
  --color-gray-200: #333333;
  --color-gray-300: #444444;
  --color-gray-400: #666666;
  --color-gray-500: #888888;
  --color-gray-600: #aaaaaa;
  --color-gray-700: #cccccc;

  /* Border & Shadow */
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --box-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.4);
  --color-border: #333333;

  /* Table */
  --color-table-header: #252525;
  --color-table-row-hover: #2a2a2a;
  --color-table-border: #333333;
}

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

body {
  font-family: '맑은 고딕', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg-body);
  color: var(--color-text-primary);
  min-height: 100vh;
  padding: 20px 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

header {
  background-color: var(--color-bg-card);
  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);
  transition: background-color 0.3s ease;
}

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: var(--color-bg-card);
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--box-shadow);
  transition: background-color 0.3s ease;
}

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 var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s, background-color 0.3s;
  background-color: var(--color-bg-input);
  color: var(--color-text-primary);
}

.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: var(--color-bg-card);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--color-border);
  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: var(--color-table-header);
  color: var(--color-text-primary);
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
  font-size: 13px;
}

table td {
  padding: 8px;
  border-bottom: 1px solid var(--color-table-border);
  vertical-align: middle;
  color: var(--color-text-primary);
}

table tr:hover {
  background-color: var(--color-table-row-hover);
}

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

/* ========== Empty State UI ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  color: var(--color-text-secondary);
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.7;
}

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

.empty-state-desc,
.empty-state-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  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;
}

.status.packed {
  background-color: #cce5ff;
  color: #004085;
}

/* 하단 고정 액션바 */
.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-bg-card);
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 24px;
}

.bottom-action-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bottom-action-count {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 14px;
}

.bottom-action-count strong {
  color: var(--color-primary);
}

.bottom-action-buttons {
  display: flex;
  gap: 8px;
}

.bottom-action-buttons .btn {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  border: none;
}

.bottom-action-buttons .btn-packing {
  background-color: #0066cc;
  color: #fff;
}

.bottom-action-buttons .btn-packing:hover {
  background-color: #0052a3;
}

.bottom-action-buttons .btn-payment {
  background-color: var(--color-success);
  color: #fff;
}

.bottom-action-buttons .btn-payment:hover {
  background-color: #218838;
}

/* 버튼 타입 - 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;
}

/* 버튼 타입 - Outline (테두리만) */
.btn-outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--color-gray-100);
  border-color: var(--color-gray-300);
}

.btn-outline:active:not(:disabled) {
  background-color: var(--color-gray-200);
}

/* 버튼 아이콘 (왼쪽) */
.btn-icon-left {
  margin-right: 4px;
}

/* ==========================================
   액션 툴바 & 필터 바
   ========================================== */

/* 액션 툴바 */
.action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px 8px 0 0;
  border-bottom: none;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-right {
  display: flex;
  align-items: center;
}

/* 액션 버튼 기본 스타일 */
.btn.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: var(--color-text-primary);
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn.btn-action:hover:not(:disabled) {
  background: #f5f5f5;
}

.btn.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 삭제 버튼 */
.btn.btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: #dc3545;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn.btn-delete:hover:not(:disabled) {
  background: #fff5f5;
}

.btn.btn-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 필터 툴바 */
.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-gray-50);
  border: 1px solid var(--color-border);
  border-radius: 0 0 8px 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

[data-theme="dark"] .filter-toolbar {
  background: var(--color-gray-100);
}

/* 필터 그룹 */
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 페이지당 표시 개수 - 오른쪽 끝 */
.filter-page-size {
  margin-left: auto;
}

/* 필터 검색 */
.filter-search {
  flex: 1;
  min-width: 160px;
  max-width: 240px;
}

.filter-search .search-inline {
  width: 100%;
}

.filter-search .search-inline input {
  width: 100%;
  padding-left: 10px;
}

/* 날짜 범위 필터 */
.filter-date-range {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-date-range > .form-input {
  width: 120px;
}

.filter-date-range .date-separator {
  color: var(--color-text-secondary);
  font-size: 12px;
}

/* 시간 입력 그룹 (24시간제) */
.time-input-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.time-hour {
  width: 46px !important;
  min-width: 46px !important;
  padding: 6px 1px 6px 4px !important;
  font-size: 12px !important;
}

.time-min {
  width: 30px !important;
  min-width: 30px !important;
  padding: 6px 2px !important;
  text-align: center;
  font-size: 12px !important;
  -moz-appearance: textfield;
}

.time-min::-webkit-outer-spin-button,
.time-min::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.time-unit {
  color: var(--color-text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

/* 결제상태 셀렉트 */
.filter-toolbar .form-input {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
}

.filter-toolbar select.form-input {
  min-width: 100px;
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
  .action-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .action-left {
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
  }

  .action-left .btn {
    flex: 1;
    min-width: calc(50% - 4px);
  }

  .action-right {
    width: 100%;
    margin-top: 6px;
  }

  .action-right .btn {
    width: 100%;
  }

  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .filter-group {
    width: 100%;
  }

  .filter-search {
    max-width: none;
  }

  .filter-date-quick {
    order: -1;
  }

  .filter-date-quick .date-quick-btns {
    width: 100%;
    justify-content: space-between;
  }

  .filter-date-quick .btn-quick {
    flex: 1;
    text-align: center;
  }

  .filter-date-range {
    width: 100%;
    flex-wrap: wrap;
  }

  .filter-date-range .form-input {
    flex: 1;
  }

  .time-input-group {
    flex-shrink: 0;
  }

  .filter-toolbar select.form-input {
    width: 100%;
  }
}

/* 채팅 섹션 스타일 */
.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;
  }
}

/* 상품 관리 페이지 스타일 */
.product-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.product-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
}

.product-form-compact {
  padding: 14px 18px;
}

.product-form-compact h2 {
  margin-bottom: 0;
  font-size: 16px;
  border-bottom: none;
  padding-bottom: 0;
}

.product-list-compact {
  padding: 14px 18px;
}

.product-list-compact h2 {
  margin-bottom: 0;
  font-size: 16px;
  border-bottom: none;
  padding-bottom: 0;
}

.order-list-compact {
  padding: 14px 18px;
}

.order-list-compact h2 {
  margin-bottom: 0;
  font-size: 16px;
  border-bottom: none;
  padding-bottom: 0;
}

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

/* order-form 내 버튼 - 입력폼 높이에 맞춤 */
.order-form .btn-action {
  height: 38px;
  padding: 0 12px;
}

.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;
  }

  /* 모바일에서는 가로 길이 제한 제거 */
  .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;
}

/* 테이블 오버레이 로딩 */
.table-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  border-radius: 8px;
}

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

.table-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.table-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.table-loading-text {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

/* 스켈레톤 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 var(--color-border);
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

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

.table-wrapper::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* ========== 다크모드 토글 버튼 ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: var(--color-gray-100);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 20px;
}

.theme-toggle:hover {
  background-color: var(--color-gray-200);
  transform: scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: transform 0.3s ease;
}

/* 라이트 모드: 달 아이콘 표시 */
.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: block;
}

/* 다크 모드: 해 아이콘 표시 */
[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle {
  background-color: var(--color-gray-200);
}

[data-theme="dark"] .theme-toggle:hover {
  background-color: var(--color-gray-300);
}

/* ========== 다크모드 추가 스타일 ========== */
[data-theme="dark"] .chat-message {
  background-color: var(--color-gray-100);
  border-left-color: var(--color-primary);
}

[data-theme="dark"] .chat-message.order-message {
  background-color: #1a2e1a;
  border-left-color: var(--color-success);
}

[data-theme="dark"] .chat-messages {
  background-color: var(--color-gray-50);
  border-color: var(--color-border);
}

[data-theme="dark"] .youtube-url-section {
  background-color: var(--color-gray-100);
}

[data-theme="dark"] .chat-status {
  background-color: var(--color-gray-100);
}

[data-theme="dark"] .empty-state {
  background-color: var(--color-bg-card);
  border-color: var(--color-border);
}

[data-theme="dark"] .empty-tips {
  background-color: var(--color-gray-100);
}

[data-theme="dark"] .chart-container {
  background-color: var(--color-bg-card);
}

[data-theme="dark"] .notification-dropdown {
  background-color: var(--color-bg-card);
}

[data-theme="dark"] .notification-dropdown-header,
[data-theme="dark"] .notification-dropdown-footer {
  background-color: var(--color-gray-100);
}

[data-theme="dark"] .notification-item.unread {
  background-color: #2a1a1a;
}

[data-theme="dark"] .notification-item.unread:hover {
  background-color: #3a2a2a;
}

[data-theme="dark"] .help-modal-content {
  background-color: var(--color-bg-card);
}

[data-theme="dark"] .help-modal-body {
  color: var(--color-text-primary);
}

[data-theme="dark"] .help-modal-footer {
  background-color: var(--color-gray-100);
  border-top-color: var(--color-border);
}

[data-theme="dark"] .tooltip-text {
  background-color: var(--color-gray-700);
}

[data-theme="dark"] .tooltip-text::after {
  border-color: var(--color-gray-700) transparent transparent transparent;
}

/* ========== 고객 관리 페이지 UI 개선 ========== */

/* 고객 등록 섹션 카드 스타일 */
.customer-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  max-width: none; /* 헤더와 동일한 너비 */
}

.customer-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
}

/* 컴팩트 모드 */
.customer-form-compact {
  padding: 14px 18px;
}

.customer-form-compact h2 {
  margin-bottom: 0;
  font-size: 16px;
}

/* 섹션 헤더 행 (제목 + 버튼) */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header-row h2 {
  border-bottom: none;
  padding-bottom: 0;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* 날짜 빠른 선택 버튼 그룹 */
.date-quick-btns {
  display: flex;
  gap: 4px;
}

.date-quick-btns .btn-quick {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.date-quick-btns .btn-quick:hover {
  background: var(--color-gray-100);
  color: var(--color-text-primary);
}

.date-quick-btns .btn-quick.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* 헤더 액션 내 폼 인풋 */
.header-actions .form-input {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  min-width: 80px;
}

.header-actions input[type="date"].form-input {
  min-width: 130px;
}

.header-actions select.form-input {
  min-width: 90px;
}

/* 날짜 구분자 */
.date-separator {
  color: var(--color-text-light);
  font-size: 13px;
}

/* 테이블 컨트롤 바 */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.table-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 버튼 그룹 바 */
.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-gray-50);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.action-bar-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-bar-right {
  margin-left: auto;
}

/* 입력 테이블 개선 */
.input-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border);
}

.input-table thead {
  background: linear-gradient(135deg, var(--color-gray-100) 0%, var(--color-gray-50) 100%);
}

.input-table th {
  padding: 14px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-primary);
  text-align: left;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.input-table th .required {
  color: var(--color-danger);
  margin-left: 2px;
}

.input-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-table-border);
  vertical-align: top;
}

.input-table tbody tr {
  transition: background-color 0.2s;
}

.input-table tbody tr:hover {
  background-color: var(--color-gray-50);
}

.input-table tbody tr:last-child td {
  border-bottom: none;
}

/* 컴팩트 입력 테이블 */
.input-table-compact th {
  padding: 10px 8px;
  font-size: 12px;
}

.input-table-compact td {
  padding: 6px 8px;
}

.input-table-compact .form-input {
  padding: 8px 10px;
  font-size: 13px;
}

.input-table-compact .action-cell .btn-icon {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.input-table-compact .address-wrapper .btn-search {
  padding: 8px 10px;
  font-size: 12px;
}

/* 입력 필드 스타일 */
.input-table .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
}

.input-table .form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.input-table .form-input::placeholder {
  color: var(--color-text-light);
}

.input-table .form-input.input-error {
  border-color: var(--color-danger);
  background-color: #fff5f5;
}

.input-table .form-input.input-success {
  border-color: var(--color-success);
}

/* 주소 입력 래퍼 */
.address-wrapper {
  display: flex;
  gap: 8px;
}

.address-wrapper .form-input {
  flex: 1;
}

.address-wrapper .btn-search {
  padding: 10px 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.address-wrapper .btn-search:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* 액션 버튼 셀 */
.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-icon.btn-register {
  background: var(--color-primary);
  color: white;
}

.btn-icon.btn-register:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

.btn-icon.btn-delete {
  background: var(--color-gray-200);
  color: var(--color-text-secondary);
}

.btn-icon.btn-delete:hover {
  background: var(--color-danger);
  color: white;
}

/* 닉네임 상태 표시 개선 */
.field-status {
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-status.checking {
  color: var(--color-text-light);
}

.field-status.available {
  color: var(--color-success);
}

.field-status.duplicate {
  color: var(--color-danger);
}

.field-status .status-icon {
  font-size: 14px;
}

/* 진행바 개선 */
.progress-wrapper {
  display: none;
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--color-gray-50);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.progress-wrapper.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.progress-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

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

.progress-track {
  height: 8px;
  background: var(--color-gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 단축키 힌트 개선 */
.shortcut-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--color-gray-50);
  border-radius: 8px;
  margin-top: 16px;
  border: 1px dashed var(--color-border);
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 3px 8px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ========== 고객 목록 섹션 개선 ========== */

.customer-list {
  border: 1px solid var(--color-border);
}

.customer-list-compact {
  padding: 14px 18px;
}

.customer-list-compact h2 {
  margin-bottom: 0;
  font-size: 16px;
  border-bottom: none;
  padding-bottom: 0;
}

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

/* 인라인 검색 */
.search-inline {
  position: relative;
  display: flex;
  align-items: center;
}

.search-inline .search-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  /* 레거시: 다른 페이지에서 사용 가능 */
  color: var(--color-text-light);
  pointer-events: none;
}

.search-inline input {
  padding: 6px 10px 6px 32px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  width: 160px;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  transition: all 0.2s;
}

.search-inline input:focus {
  outline: none;
  border-color: var(--color-primary);
  width: 200px;
}

.btn-search-clear {
  color: var(--color-danger) !important;
  border-color: var(--color-danger) !important;
}
.btn-search-clear:hover {
  background: var(--color-danger) !important;
  color: white !important;
}

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

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
}

.stat-card.stat-total::before { background: var(--color-primary); }
.stat-card.stat-new::before { background: var(--color-success); }
.stat-card.stat-vip::before { background: var(--color-warning); }
.stat-card.stat-inactive::before { background: var(--color-text-light); }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

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

/* 검색 입력 개선 */
.search-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--color-text-light);
  pointer-events: none;
  transition: color 0.2s;
}

.search-wrapper .search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.2s;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
}

.search-wrapper .search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

.search-wrapper .search-input:focus + .search-icon {
  color: var(--color-primary);
}

.search-wrapper .search-input::placeholder {
  color: var(--color-text-light);
}

/* 벌크 액션 바 */
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-gray-50);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bulk-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-bar-right {
  display: flex;
  gap: 10px;
}

/* 커스텀 체크박스 */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
}

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

.custom-checkbox input:checked + .checkmark {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.custom-checkbox input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.custom-checkbox:hover .checkmark {
  border-color: var(--color-primary);
}

/* 데이터 테이블 개선 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border);
}

.data-table thead {
  background: var(--color-table-header);
}

.data-table th {
  padding: 14px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-primary);
  text-align: left;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.data-table th.sortable:hover {
  background: var(--color-gray-200);
}

.data-table th .sort-indicator {
  margin-left: 6px;
  opacity: 0.5;
}

.data-table th.sorted .sort-indicator {
  opacity: 1;
  color: var(--color-primary);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-table-border);
  vertical-align: middle;
  font-size: 14px;
}

.data-table tbody tr {
  transition: background-color 0.15s;
}

.data-table tbody tr:hover {
  background-color: var(--color-table-row-hover);
}

.data-table tbody tr.selected {
  background-color: #fff5f5;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 컴팩트 데이터 테이블 */
.data-table-compact {
  margin-top: 12px;
}

.data-table-compact th {
  padding: 10px 8px;
  font-size: 12px;
}

.data-table-compact td {
  padding: 8px;
  font-size: 13px;
}

.data-table-compact .action-buttons .btn-icon {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

/* 컴팩트 페이지네이션 */
.pagination-compact {
  margin-top: 12px;
  padding-top: 12px;
}

.pagination-compact .info-text {
  font-size: 13px;
}

.pagination-compact select {
  padding: 5px 8px;
  font-size: 13px;
}

.pagination-compact .page-btn {
  min-width: 32px;
  height: 32px;
  font-size: 13px;
}

/* 셀 스타일 */
.cell-name {
  font-weight: 500;
  color: var(--color-text-primary);
}

.cell-nickname {
  color: var(--color-primary);
  font-weight: 500;
}

.cell-phone {
  font-family: 'Consolas', monospace;
  color: var(--color-text-secondary);
}

.cell-address {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-secondary);
}

.cell-date {
  color: var(--color-text-light);
  font-size: 13px;
}

.cell-code {
  font-family: 'Consolas', monospace;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.cell-desc {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-secondary);
}

.cell-price {
  font-weight: 500;
  color: var(--color-text-primary);
}

/* 액션 버튼 그룹 */
.action-buttons {
  display: flex;
  gap: 6px;
}

.action-buttons .btn-icon {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.action-buttons .btn-edit {
  background: var(--color-gray-100);
  color: var(--color-text-secondary);
}

.action-buttons .btn-edit:hover {
  background: var(--color-info);
  color: white;
}

.action-buttons .btn-delete {
  background: var(--color-gray-100);
  color: var(--color-text-secondary);
}

.action-buttons .btn-delete:hover {
  background: var(--color-danger);
  color: white;
}

/* 페이지네이션 개선 */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.pagination-info select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  cursor: pointer;
}

.pagination-buttons {
  display: flex;
  gap: 4px;
}

.pagination-buttons .page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-buttons .page-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination-buttons .page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.pagination-buttons .page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 토스트 메시지 개선 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.toast-success {
  background: var(--color-success);
  color: white;
}

.toast.toast-error {
  background: var(--color-danger);
  color: white;
}

.toast.toast-info {
  background: var(--color-secondary);
  color: white;
}

.toast.toast-warning {
  background: var(--color-warning);
  color: #333;
}

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

/* 행 애니메이션 */
@keyframes rowHighlight {
  0% { background-color: rgba(40, 167, 69, 0.3); }
  100% { background-color: transparent; }
}

.row-highlight {
  animation: rowHighlight 1s ease-out;
}

@keyframes rowFadeOut {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-30px); }
}

.row-removing {
  animation: rowFadeOut 0.3s ease-out forwards;
}

/* ========== 다크모드 고객 페이지 ========== */
[data-theme="dark"] .customer-form {
  background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-gray-100) 100%);
}

[data-theme="dark"] .customer-form .section-desc {
  background: var(--color-gray-100);
}

[data-theme="dark"] .action-bar,
[data-theme="dark"] .bulk-bar,
[data-theme="dark"] .shortcut-bar {
  background: var(--color-gray-100);
}

[data-theme="dark"] .input-table,
[data-theme="dark"] .data-table {
  background: var(--color-bg-card);
}

[data-theme="dark"] .input-table thead,
[data-theme="dark"] .data-table thead {
  background: var(--color-gray-100);
}

[data-theme="dark"] .stat-card {
  background: var(--color-bg-card);
}

[data-theme="dark"] .progress-wrapper {
  background: var(--color-gray-100);
}

[data-theme="dark"] .input-table .form-input.input-error {
  background-color: #2a1a1a;
}

[data-theme="dark"] .data-table tbody tr.selected {
  background-color: #2a1a1a;
}

[data-theme="dark"] .custom-checkbox .checkmark {
  background: var(--color-gray-100);
}

/* ========== 반응형 고객 페이지 ========== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cell-address {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .customer-form-compact,
  .customer-list {
    padding: 12px;
  }

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

  .stat-card {
    padding: 14px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .action-bar,
  .bulk-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-bar-right,
  .bulk-bar-right {
    margin-left: 0;
    margin-top: 10px;
  }

  .shortcut-bar {
    display: none;
  }

  .input-table,
  .data-table {
    display: block;
    overflow-x: auto;
  }

  .pagination-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .pagination-info {
    width: 100%;
    justify-content: center;
  }
}

/* ========== 모달 스타일 ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal[style*="display: block"] {
  display: flex !important;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--color-bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* ========== 드롭다운 버튼 ========== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  min-width: 160px;
  padding: 4px 0;
  margin-top: 4px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-lg);
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--color-gray-100);
}

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

/* ========== 알림톡 옵션 모달 ========== */

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

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

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: background-color 0.2s;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 60vh;
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-body .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.modal-body .form-row {
  display: flex;
  gap: 16px;
}

.modal-body .form-row .form-group {
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-gray-50);
}

/* ========== 재고 인라인 조정 버튼 ========== */
.stock-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stock-value {
  min-width: 28px;
  text-align: center;
  font-weight: 500;
}

.btn-stock-adjust {
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-stock-adjust:hover {
  background: var(--color-gray-100);
  border-color: var(--color-gray-300);
}

.btn-stock-adjust:active {
  transform: scale(0.95);
}

/* ========== 입력 유효성 검사 스타일 ========== */
.form-input.error {
  border-color: var(--color-danger) !important;
  background-color: rgba(220, 53, 69, 0.05);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.field-error {
  display: block;
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 4px;
  min-height: 16px;
}

/* 필수 표시 */
.required {
  color: var(--color-danger);
  font-weight: bold;
}

/* ========== 회원등록 모달 (.show 클래스 사용) ========== */
.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

/* 회원등록 모달 전용 스타일 */
.register-modal {
  max-width: 420px;
}

.register-modal .form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.register-modal .form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.register-modal .input-readonly {
  background-color: var(--color-gray-100);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

.address-input-wrapper {
  display: flex;
  gap: 8px;
}

.address-input-wrapper input {
  flex: 1;
}

.btn-address-search {
  padding: 10px 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.btn-address-search:hover {
  background: var(--color-primary-dark);
}

/* ========== 토스트 메시지 (주문 페이지용) ========== */
.toast-message-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: var(--border-radius);
  background: var(--color-bg-card);
  box-shadow: var(--box-shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 360px;
  font-size: 14px;
}

.toast-message-popup.show {
  transform: translateX(0);
}

.toast-message-popup .toast-icon {
  font-size: 16px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.toast-message-popup.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-message-popup.toast-success .toast-icon {
  background: rgba(40, 167, 69, 0.1);
  color: var(--color-success);
}

.toast-message-popup.toast-error {
  border-left: 4px solid var(--color-danger);
}

.toast-message-popup.toast-error .toast-icon {
  background: rgba(220, 53, 69, 0.1);
  color: var(--color-danger);
}

.toast-message-popup.toast-warning {
  border-left: 4px solid var(--color-warning);
}

.toast-message-popup.toast-warning .toast-icon {
  background: rgba(255, 193, 7, 0.15);
  color: #b38600;
}

.toast-message-popup.toast-info {
  border-left: 4px solid var(--color-primary);
}

.toast-message-popup.toast-info .toast-icon {
  background: rgba(102, 126, 234, 0.1);
  color: var(--color-primary);
}

/* ========== 배송정보 미입력 행 강조 ========== */
.row-missing-info {
  background-color: rgba(255, 193, 7, 0.08) !important;
}

.row-missing-info:hover {
  background-color: rgba(255, 193, 7, 0.15) !important;
}

/* 다크모드 지원 */
[data-theme="dark"] .row-missing-info {
  background-color: rgba(255, 193, 7, 0.12) !important;
}

[data-theme="dark"] .row-missing-info:hover {
  background-color: rgba(255, 193, 7, 0.2) !important;
}

/* 배송정보 미입력 필터 버튼 (btn-quick과 통일, 주황색 강조) */
.btn-quick.btn-missing {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.btn-quick.btn-missing:hover {
  background: #ffe69c;
  border-color: #ffc107;
  color: #856404;
}

.btn-quick.btn-missing.active {
  background: #ffc107;
  color: #000;
  border-color: #ffc107;
}

/* 유사 닉네임 표시 */
.similar-nickname-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  background: #ffc107;
  color: #000;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  vertical-align: middle;
}

.similar-nickname-badge:hover {
  background: #ffb300;
  transform: scale(1.1);
}

/* 유사 닉네임 매칭 모달 */
.similar-customer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.similar-customer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

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

.similar-customer-info {
  flex: 1;
  min-width: 0;
}

.similar-customer-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.similar-customer-details {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.similar-customer-address {
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-match {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-match:hover {
  background: var(--color-primary-dark);
}

/* ==========================================
   앱 푸터 스타일
   ========================================== */
.app-footer {
  background: #1a1a2e;
  color: #fff;
  padding: 24px 32px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer-brand {
  font-size: 16px;
  font-weight: 700;
}

.footer-beta {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1400px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid #2d2d44;
  text-align: center;
}

.footer-company {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 6px;
}

.footer-copyright {
  font-size: 12px;
  color: #9ca3af;
}

@media (max-width: 768px) {
  .app-footer {
    padding: 20px 16px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========== 주문 수량 컨트롤 ========== */
.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

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

.qty-btn:active:not(:disabled) {
  transform: scale(0.9);
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
}

/* 수량 변경 펄스 효과 */
@keyframes qty-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.quantity-control.qty-changed {
  animation: qty-pulse 0.4s ease-out;
  border-radius: 4px;
}

.quantity-cell {
  text-align: center !important;
}

/* ========== 인라인 편집 셀 ========== */

.editable-cell {
  cursor: pointer;
  position: relative;
  padding: 4px 6px;
  border-radius: 3px;
  transition: background-color 0.15s;
}

.editable-cell:hover {
  background-color: var(--color-primary-50, #fff5f5);
}

.editable-cell:hover::after {
  content: '✏️';
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0.5;
}

.editable-cell.editing {
  padding: 0;
  background: transparent;
}

.editable-cell.editing::after {
  display: none;
}

.inline-input {
  width: 100%;
  padding: 4px 8px;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  font-size: inherit;
  font-family: inherit;
  background: white;
}

.inline-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.15);
}

.inline-input[type="number"]::-webkit-outer-spin-button,
.inline-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inline-input[type="number"] {
  -moz-appearance: textfield;
}

/* ========== 상품명 셀 (캡처 아이콘 포함) ========== */

.product-name-cell {
  min-width: 100px;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.capture-icon {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.capture-icon:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ========== 고객정보 통합 셀 ========== */

.customer-info-cell {
  min-width: 120px;
}

.customer-info {
  line-height: 1.4;
  max-width: 120px;
}

.customer-info > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.customer-nickname {
  font-size: 0.85em;
  color: var(--color-gray-500);
}

.customer-nickname-only {
  font-weight: 500;
}

.customer-phone {
  font-size: 0.85em;
  color: var(--color-gray-600);
}

.customer-unregistered {
  font-size: 0.85em;
  color: var(--color-gray-400);
}

.customer-unregistered.clickable {
  cursor: pointer;
  color: var(--color-primary);
}

.customer-unregistered.clickable:hover {
  text-decoration: underline;
}

.customer-unregistered-label {
  font-size: 0.85em;
  color: var(--color-gray-400);
}

/* ========== 닉네임 셀 ========== */

.nickname-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 80px;
}

.nickname-cell > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nickname-text {
  font-weight: 500;
  color: var(--color-text-primary);
}

/* ========== 주소 셀 ========== */

.address-cell {
  max-width: 200px;
}

.address-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

/* ==========================================
   인쇄/내보내기 옵션 모달
   ========================================== */

.export-option-group {
  margin-bottom: 20px;
}

.export-option-group:last-child {
  margin-bottom: 0;
}

.option-group-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-gray-50);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-option:hover,
.checkbox-option:hover {
  background: var(--color-gray-100);
  border-color: var(--color-primary);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.radio-option span,
.checkbox-option span {
  font-size: 14px;
  color: var(--color-text-primary);
}

.checkbox-option small {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.radio-option:has(input:checked),
.checkbox-option:has(input:checked) {
  background: rgba(var(--color-primary-rgb, 255, 0, 0), 0.08);
  border-color: var(--color-primary);
}

/* 3열 그리드 범위 선택 라디오 버튼 */
.range-radio-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: var(--color-gray-50);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 60px;
}

.range-radio-btn:hover {
  background: var(--color-gray-100);
  border-color: var(--color-primary);
}

.range-radio-btn input[type="radio"] {
  display: none;
}

.range-radio-btn span {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.range-radio-btn small {
  font-weight: 400;
  color: var(--color-text-secondary);
}

.range-radio-btn:has(input:checked) {
  background: rgba(var(--color-primary-rgb, 255, 0, 0), 0.08);
  border-color: var(--color-primary);
}

.range-radio-btn:has(input:checked) span {
  color: var(--color-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-gray-50);
}

/* ==========================================
   순수 HTML 테이블 스타일 (DataTables 대체)
   ========================================== */

/* 테이블 컨테이너 */
.simple-table-container {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* 검색결과 배너 */
.search-result-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--color-primary-light, #e8f0fe);
  border: 1px solid var(--color-primary, #4285f4);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  color: var(--color-text-primary);
}

[data-theme="dark"] .search-result-banner {
  background: rgba(66, 133, 244, 0.15);
}

.search-result-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-clear-btn {
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: var(--color-danger, #dc3545);
  color: white;
  border-color: var(--color-danger, #dc3545);
}

.search-result-banner + .simple-table-wrapper {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* 테이블 래퍼 (가로 스크롤 대응) */
.simple-table-wrapper {
  overflow-x: auto;
  background: var(--color-bg-card);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--color-border);
}

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

.simple-table-wrapper::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 0 0 8px 8px;
}

.simple-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 5px;
}

.simple-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

/* 테이블 기본 스타일 */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.simple-table thead {
  background: var(--color-table-header);
}

.simple-table thead th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.simple-table tbody td {
  padding: 10px;
  font-size: 13px;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-table-border);
  vertical-align: middle;
}

.simple-table tbody tr:hover {
  background: var(--color-table-row-hover);
}

.simple-table tbody tr:last-child td {
  border-bottom: none;
}

/* 컬럼별 너비 (개별 보기) */
.simple-table .col-checkbox {
  width: 40px;
  text-align: center;
}

.simple-table .col-customer {
  width: 80px;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simple-table .col-nickname {
  width: 80px;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simple-table .col-address {
  width: auto;
  min-width: 180px;
}

.simple-table .col-product {
  width: auto;
  min-width: 120px;
}

.simple-table .col-price {
  width: 90px;
  text-align: right;
}

.simple-table .col-quantity {
  width: 70px;
  text-align: center;
}

.simple-table .col-total {
  width: 100px;
  text-align: right;
}

.simple-table .col-status {
  width: 90px;
  text-align: center;
}

.simple-table .col-time {
  width: 130px;
  white-space: nowrap;
}

/* 컬럼별 너비 (그룹 보기) */
.simple-table .col-name {
  width: 80px;
}

.simple-table .col-phone {
  width: 110px;
}

.simple-table .col-orders {
  width: auto;
  min-width: 200px;
}

.simple-table .col-count {
  width: 60px;
  text-align: center;
}

.simple-table .col-carrier {
  width: 100px;
}

.simple-table .col-tracking {
  width: 140px;
}

/* 데이터 셀 정렬 */
.simple-table td.text-right {
  text-align: right;
}

.simple-table td.text-center {
  text-align: center;
}

/* 체크박스 스타일 */
.simple-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* 빈 상태 표시 */
.simple-table .empty-row td {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
}

.simple-table .empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.simple-table .empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.simple-table .empty-state-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* 배송정보 미입력 행 강조 */
.simple-table tbody tr.row-missing-info {
  background-color: rgba(255, 193, 7, 0.08);
}

.simple-table tbody tr.row-missing-info:hover {
  background-color: rgba(255, 193, 7, 0.15);
}

/* ========== 순수 테이블 페이지네이션 ========== */

.simple-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.simple-pagination-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.simple-pagination-info select {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--color-bg-input);
  color: var(--color-text-primary);
  cursor: pointer;
}

.simple-pagination-buttons {
  display: flex;
  gap: 4px;
}

.simple-pagination-buttons button {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.simple-pagination-buttons button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.simple-pagination-buttons button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.simple-pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 페이지네이션 반응형 */
@media (max-width: 640px) {
  .simple-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .simple-pagination-info {
    justify-content: center;
  }

  .simple-pagination-buttons {
    justify-content: center;
  }
}

/* ========== 테이블 로딩 상태 ========== */

.simple-table-loading {
  position: relative;
  min-height: 200px;
}

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

.simple-table-loading tbody tr {
  opacity: 0.5;
}

/* ========== 그룹 보기 주문 내역 셀 ========== */

.grouped-orders-cell {
  max-width: 280px;
}

.grouped-orders-cell .order-item {
  padding: 3px 0;
  font-size: 12px;
  line-height: 1.4;
}

.grouped-orders-cell .order-item:not(:last-child) {
  border-bottom: 1px dashed var(--color-border);
}
