body {
  font-family: 'Roboto', sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}

#app {
  padding-top: 0;
  min-height: 100vh;
}

/* 메뉴바가 표시될 때 상단 패딩 추가 */
.navbar[style*="display: flex"] ~ #app {
  padding-top: 60px;
}

@media (max-width: 768px) {
  .navbar[style*="display: flex"] ~ #app {
    padding-top: 50px;
  }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #6200ee;
  color: white;
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  z-index: 10000;
  position: relative;
  background-color: transparent;
  border: none;
  outline: none;
}

.mobile-menu-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
  pointer-events: none;
  user-select: none;
}

/* 모바일 메뉴 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #6200ee;
  z-index: 10001;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-items {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  padding: 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  text-align: left;
  width: 100%;
}

.mobile-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-item .nav-icon {
  font-size: 20px;
  min-width: 24px;
}

.mobile-menu-item .nav-text {
  font-size: 16px;
  font-weight: 500;
}

/* 데스크톱 사용자 정보 */
.desktop-user-info {
  display: flex;
  align-items: center;
}



.nav-buttons {
  display: flex;
  gap: 12px;
}

/* 데스크톱에서 메뉴 표시 보장 */
@media (min-width: 769px) {
  .desktop-nav {
    display: flex !important;
  }
  
  .desktop-user-info {
    display: flex !important;
  }
}

.nav-button {
  background: transparent;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-text {
  font-size: 13px;
  line-height: 1;
}

.nav-button.active {
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
}

.flex {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.row {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.textfield, select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  flex: 1;
}

.button {
  padding: 12px;
  background-color: #6200ee;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.button:hover {
  background-color: #3700b3;
}

.hidden {
  display: none !important;
}

/* Guest 사용자용 Admin 메뉴 강제 숨김 (보안 강화) */
body:not(.admin-user) .mobile-menu-item[data-page="/admin/edge-status"],
body:not(.admin-user) .mobile-menu-item[data-page="/data_management"],
body:not(.admin-user) .mobile-menu-item[data-page="/ai_server"],
body:not(.admin-user) .mobile-menu-item[data-page="/settings"],
body:not(.admin-user) .mobile-menu-item[data-page="/admin/users"],
body:not(.admin-user) .nav-button[data-page="/admin/edge-status"],
body:not(.admin-user) .nav-button[data-page="/data_management"],
body:not(.admin-user) .nav-button[data-page="/ai_server"],
body:not(.admin-user) .nav-button[data-page="/settings"],
body:not(.admin-user) .nav-button[data-page="/admin/users"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Admin 사용자일 때 대시보드 제외한 모든 메뉴 표시 */
body.admin-user .nav-button:not([data-page="/dashboard"]),
body.admin-user .mobile-menu-item:not([data-page="/dashboard"]) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.user-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-card .vendor {
  font-weight: bold;
  color: #333;
}

.user-card .role {
  font-size: 14px;
  color: #666;
}

.sales-page {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
}

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

.view-buttons button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
}

.view-buttons button.active {
  background-color: #6200ee;
  color: white;
}

.sales-top {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.calendar-wrapper {
  min-width: 300px;
  max-width: 360px;
  flex: none;
}

.calendar-wrapper .flatpickr-calendar {
  display: block !important;
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  height: 100%;
}

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

.sales-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.sales-cards {
  padding: 0 20px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex: 1 1 250px;
  max-width: 32%;
  box-sizing: border-box;
}

.bold { 
  font-weight: bold; 
}

.has-sales {
  background-color: #81c784 !important;
  color: white !important;
  border-radius: 50%;
  font-weight: bold;
}

.highlighted {
  outline: 3px solid #ff9800;
  background: #fffde7;
  transition: outline 0.3s, background 0.3s;
}

#sales-summary {
  flex: 1;
}

.summary-card {
  background: #ffffff;
  border-left: 6px solid #6200ee;
  border-radius: 12px;
  padding: 24px;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.summary-card .summary-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.summary-card div span {
  font-weight: bold;
  color: #333;
}

.card.bread-highlight {
  border: 2px solid #ffb74d;
  box-shadow: 0 0 10px rgba(255, 179, 0, 0.3);
}

.failed-card {
  border: 2px solid #ff4444;
  background-color: #ffecec;
}

.flatpickr-months {
  display: flex !important;
  justify-content: center;
  align-items: center;
  position: relative;
  font-size: 17px;
  margin-bottom: 10px;
}

.flatpickr-weekdays {
  padding-top: 4px;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  position: absolute;
  top: 8px;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  z-index: 10;
  display: block !important;
}

.flatpickr-day.has-sales {
  background-color: #81c784 !important;
  color: white !important;
  border-radius: 50% !important;
  font-weight: bold;
}

.flatpickr-day.today.has-sales:not(.selected) {
  border: 2px solid #2196f3 !important;
  background-color: #81c784 !important;
  color: white !important;
}

.flatpickr-day.selected.has-sales {
  background-color: #43a047 !important;
  color: white !important;
  font-weight: bold;
}

.flatpickr-day.selected.today.has-sales {
  background-color: #1b5e20 !important;
  color: #fff !important;
  border: 2px solid #2196f3 !important;
}

.flatpickr-day.today:not(.has-sales):not(.selected) {
  border: 2px solid #2196f3 !important;
}

.flatpickr-day.selected.today:not(.has-sales) {
  background: #3f51b5 !important;
  color: white !important;
}

#snackbar {
  visibility: hidden;
  min-width: 200px;
  background-color: #323232;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 14px 24px;
  position: fixed;
  z-index: 999;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  transition: visibility 0s, opacity 0.3s ease-in-out;
}

#chart {
  display: none;
  max-height: 200px;
  margin: 12px;
}

.auto-refresh-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(98, 0, 238, 0.1);
  border-radius: 8px;
  flex-direction: column;
  width: fit-content;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-top: 4px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

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

input:checked + .toggle-slider {
  background-color: #6200ee;
}

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

#serverGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 20px;
}

.server-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  cursor: move;
  user-select: none;
}

.server-card.dragging {
  opacity: 0.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.server-card.offline {
  background: #f0f0f0;
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.4);
}

.last-seen {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

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

.server-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.status-tag {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.status-tag.online {
  background: #E8F5E9;
  color: #388E3C;
}

.status-tag.offline {
  background: #FFEBEE;
  color: #D32F2F;
}

.update-time {
  font-size: 13px;
  color: #999;
}

.stat-label {
  font-size: 15px;
  color: #555;
}

.stat-value {
  font-size: 15px;
  font-weight: bold;
  color: #111;
}

.stat-bar-bg {
  background: #eee;
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.gpu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.gpu-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gpu-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

@media (max-width: 768px) {
  /* 네비게이션 바 모바일 최적화 */
  .navbar {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 12px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
  }
  
  /* 모바일 메뉴 토글 버튼 표시 */
  .mobile-menu-toggle {
    display: flex !important;
    z-index: 10000 !important;
    position: relative !important;
  }
  
  /* 데스크톱 메뉴 숨기기 (모바일에서만) */
  .desktop-nav {
    display: none !important;
  }
  
  .desktop-user-info {
    display: none !important;
  }
  

  
  /* 모바일 메뉴 표시 */
  .mobile-menu {
    display: block !important;
    z-index: 10001 !important;
  }
  
  .nav-buttons {
    display: none !important;
  }
  
  .nav-button {
    font-size: 13px !important;
    padding: 10px 8px !important;
    border-radius: 8px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    gap: 2px !important;
  }
  
  .nav-icon {
    font-size: 16px !important;
  }
  
  .nav-text {
    font-size: 11px !important;
    display: block !important;
  }
  
  /* 모바일 메뉴 아이템 텍스트 표시 */
  .mobile-menu-item .nav-text {
    display: block !important;
    font-size: 14px !important;
    color: white !important;
    margin-left: 8px !important;
  }
  
  .mobile-menu-item .nav-icon {
    font-size: 18px !important;
    color: white !important;
    min-width: 20px !important;
    text-align: center !important;
  }
  
  .mobile-menu-item {
    display: flex !important;
    align-items: center !important;
    padding: 16px 20px !important;
    gap: 12px !important;
  }
  
  .nav-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
  }
  
  .nav-button.active {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    font-weight: 600 !important;
  }
  
  /* 사용자 정보 및 로그아웃 영역 */
  .navbar > div:last-child {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }
  
  #username-label {
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-right: 0 !important;
  }
  
  #logout-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
  }

  .sales-top {
    flex-direction: column !important;
    gap: 12px !important;
    height: auto !important;
  }

  .calendar-wrapper,
  #sales-summary,
  .sales-chart {
    flex: none !important;
    width: 100% !important;
  }

  .sales-chart {
    height: 300px !important;
    margin-top: 8px !important;
  }

  .summary-card {
    padding: 16px !important;
    font-size: 15px !important;
  }

  .summary-card .summary-title {
    font-size: 18px !important;
  }

  .sales-cards {
    flex-direction: column;
    gap: 10px;
  }

  .card {
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }

  .msc-box {
    font-size: 12px;
    height: 64px;
  }
  
  /* 앱 전체 레이아웃 조정 */
  #app {
    padding: 8px !important;
  }
  
  .flex {
    padding: 12px !important;
    gap: 16px !important;
  }
  
  /* 모바일에서 헤더 간격 조정 */
  .sales-page {
    padding: 12px !important;
    gap: 16px !important;
  }

  /* AI 서버 모니터링 카드 모바일 최적화 */
  #serverGrid {
    grid-template-columns: 1fr !important; /* 단일 열로 표시하여 가로 스크롤/깨짐 방지 */
    gap: 12px !important;
  }

  .server-card {
    padding: 16px !important; /* 모바일에서 여백 축소 */
    gap: 12px !important;
  }

  .gpu-grid {
    grid-template-columns: 1fr !important; /* GPU 카드도 세로로 쌓이도록 */
  }
}

/* 매우 작은 화면 (스마트폰) 추가 최적화 */
@media (max-width: 480px) {
  .navbar {
    padding: 6px 8px !important;
    z-index: 9999 !important;
  }
  

  
  .nav-buttons {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    max-width: 320px !important;
  }
  
  .nav-button {
    font-size: 12px !important;
    padding: 8px 6px !important;
    gap: 1px !important;
  }
  
  .nav-icon {
    font-size: 18px !important;
  }
  
  .nav-text {
    font-size: 10px !important;
    display: none !important; /* 매우 작은 화면에서는 텍스트 숨기기 */
  }
  
  .navbar > div:last-child {
    max-width: 320px !important;
    padding: 6px !important;
    font-size: 12px !important;
  }
  
  #logout-btn {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
  
  #app {
    padding: 6px !important;
  }
}

/* MonthlySalesCalendar 스타일 */
.monthly-sales-calendar {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: 'Roboto', sans-serif;
  max-width: 100%;
  overflow-x: auto;
}

.msc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 18px;
  color: #333;
}

.msc-header button {
  background: none;
  border: none;
  color: #6200ea;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.msc-header button:hover {
  background: rgba(98, 0, 234, 0.08);
  color: #3700b3;
}

.msc-nav.today {
  background-color: #ede7f6;
  font-weight: bold;
  border: 1px solid #6200ea;
  border-radius: 6px;
}

.msc-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.msc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.msc-box {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 6px 4px;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  font-size: 13px;
  color: #444;
  position: relative;
  transition: background 0.2s ease;
}

.msc-box.active {
  background: #ede7f6;
  box-shadow: inset 0 0 0 2px #6200ea;
}

.msc-box.empty {
  background: transparent;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.msc-box.high-sales {
  background-color: #aed581; /* 연녹색 */
  font-weight: bold;
}

.msc-box.mid-sales {
  background-color: #fff59d; /* 연노랑 */
}
  
.msc-box.low-sales {
  background-color: #ffccbc; /* 연주황 */
}

.msc-box.sunday .day-number {
  color: #e53935; /* 빨간색 */
}

.msc-box.saturday .day-number {
  color: #1e88e5; /* 파란색 */
}

.msc-box.today {
  background: #fff8e1 !important; /* 노란 배경 강조 */
  box-shadow: inset 0 0 0 2px #fbc02d;
}

.msc-box:hover {
  background: #e0e0e0;
  cursor: pointer;
}

.msc-box .day-number {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #212121;
}

.msc-box .sales {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333;
}

@media (max-width: 768px) {
  .msc-box {
    font-size: 12px;
    height: 64px;
  }
}

/* 드래그 앤 드롭 관련 스타일 */
.server-card[draggable="true"] {
  cursor: move;
}

.server-card[draggable="true"]:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.server-card[draggable="true"]:active {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 드래그 중일 때의 시각적 피드백 */
.server-card.dragging {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* 드롭 영역 표시 */
.server-card[draggable="true"]:not(.dragging) {
  transition: border-color 0.2s ease;
}

.server-card[draggable="true"]:not(.dragging):hover {
  border-color: #4CAF50;
}

/* AI 서버 상태 아이템 스타일 */
.stat-item {
  margin-bottom: 8px;
}

.stat-item .stat-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
}

.stat-item .stat-value {
  font-weight: bold;
  color: #333;
}

/* 빈 상태 메시지 스타일 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: white;
  border-radius: 12px;
  margin: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

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

.empty-state .title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.empty-state .subtitle {
  font-size: 14px;
  opacity: 0.8;
} 

/* 게시판 관리 스타일 */
.board-manager {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

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

.board-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.board-actions {
  display: flex;
  gap: 12px;
}

.board-content {
  padding: 20px;
}

.board-table {
  width: 100%;
  overflow-x: auto;
}

.board-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

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

.board-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

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

.order-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.order-number {
  font-weight: 600;
  color: #495057;
  min-width: 20px;
  text-align: center;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  color: #6c757d;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #e9ecef;
  color: #495057;
}

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

.btn-icon.btn-danger:hover {
  background: #dc3545;
  color: white;
}

.board-title {
  font-weight: 500;
  color: #212529;
}

.board-description {
  color: #6c757d;
  font-size: 14px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-media {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6c757d;
  font-size: 14px;
}

.board-targets {
  font-size: 14px;
  color: #495057;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

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

.status-badge.inactive {
  background: #f8d7da;
  color: #721c24;
}

.board-actions {
  display: flex;
  gap: 6px;
}

/* 폼 스타일 */
.form-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.form-header h3 {
  margin: 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

#board-form-element {
  padding: 20px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.checkbox-group {
  display: flex;
  gap: 20px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

/* 통계 카드 스타일 */
.board-stats {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

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

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.stat-icon {
  background: #6c757d;
}

.stat-icon.active {
  background: #28a745;
}

.stat-icon.inactive {
  background: #dc3545;
}

.stat-icon.media {
  background: #17a2b8;
}

.stat-icon.kiosk {
  background: #fd7e14;
}

.stat-icon.pos {
  background: #6f42c1;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #212529;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
}

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

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

.empty-state p {
  font-size: 16px;
  margin-bottom: 20px;
}

/* 버튼 스타일 */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5a6fd8;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

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

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .board-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .board-actions {
    width: 100%;
    justify-content: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .checkbox-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .board-table {
    font-size: 14px;
  }
  
  .board-table th,
  .board-table td {
    padding: 8px;
  }
  
  .board-description {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .board-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .form-actions {
    flex-direction: column;
  }
} 

/* Settings 페이지 스타일 */
.settings-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
}

.page-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-header h1 {
  font-size: 1.8em;
  margin-bottom: 8px;
  font-weight: 600;
}

.page-header p {
  font-size: 0.9em;
  opacity: 0.9;
  margin: 0;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-section {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}

.settings-section h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.4em;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
  font-weight: 600;
}

.settings-section h3 {
  color: #555;
  margin: 15px 0 10px 0;
  font-size: 1.1em;
  font-weight: 600;
}

.ai-settings {
  border: 1px solid #667eea;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.9em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9em;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

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

.form-help {
  display: block;
  margin-top: 4px;
  font-size: 0.8em;
  color: #666;
  font-style: italic;
}

.vendor-settings {
  margin-top: 20px;
}

.vendor-item {
  background: #f8f9fa;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  border-left: 3px solid #667eea;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.vendor-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

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

.vendor-name {
  font-weight: 600;
  color: #333;
  font-size: 1em;
}

.local-toggle {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.local-toggle:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
}

.local-toggle.disabled {
  background: #6c757d;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

.local-toggle.disabled:hover {
  background: #5a6268;
  box-shadow: 0 3px 10px rgba(108, 117, 125, 0.4);
}

.url-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.url-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85em;
  transition: all 0.3s ease;
}

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

.url-input input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.url-input button {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.url-input button:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

/* AI 서버 상태 관련 스타일 (현재 비활성화)
.status-section {
  margin-top: 25px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.status-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.status-card h4 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1em;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
}

.status-online {
  color: #28a745;
  font-weight: 700;
  font-size: 1.1em;
}

.status-offline {
  color: #dc3545;
  font-weight: 700;
  font-size: 1.1em;
}

.status-disabled {
  color: #6c757d;
  font-weight: 700;
  font-size: 1.1em;
}

.status-card p {
  margin: 8px 0;
  color: #555;
  font-size: 0.95em;
}

.status-card p strong {
  color: #333;
  font-weight: 600;
}
*/

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.notification.error {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.notification.warning {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  color: #333;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

.hidden {
  display: none !important;
}

/* Settings 페이지 반응형 디자인 */
@media (max-width: 768px) {
  .settings-page {
    padding: 10px;
    max-width: 100%;
  }
  
  .page-header {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .page-header h1 {
    font-size: 1.5em;
  }
  
  .page-header p {
    font-size: 0.8em;
  }
  
  .settings-section {
    padding: 15px;
  }
  
  .settings-section h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
  }
  
  .settings-section h3 {
    font-size: 1em;
  }
  
  .vendor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .vendor-name {
    font-size: 0.9em;
  }
  
  .local-toggle {
    padding: 6px 12px;
    font-size: 0.75em;
  }
  
  .url-input {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .url-input input {
    padding: 6px 10px;
    font-size: 0.8em;
  }
  
  .url-input button {
    padding: 6px 12px;
    font-size: 0.75em;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
    padding: 8px 20px;
    font-size: 0.85em;
  }
  
  /* AI 서버 상태 관련 스타일 (현재 비활성화)
  .status-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .status-card {
    padding: 12px;
  }
  
  .status-card h4 {
    font-size: 0.9em;
  }
  */
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
    font-size: 0.8em;
  }
}

@media (max-width: 480px) {
  .settings-page {
    padding: 8px;
  }
  
  .page-header {
    padding: 12px;
  }
  
  .page-header h1 {
    font-size: 1.3em;
  }
  
  .settings-section {
    padding: 12px;
  }
  
  .settings-section h2 {
    font-size: 1.1em;
  }
  
  .vendor-item {
    padding: 12px;
    margin-bottom: 10px;
  }
  
  .vendor-name {
    font-size: 0.85em;
  }
  
  .local-toggle {
    padding: 5px 10px;
    font-size: 0.7em;
  }
  
  .btn {
    padding: 6px 16px;
    font-size: 0.8em;
  }
  
  .form-group {
    margin-bottom: 12px;
  }
  
  .form-group label {
    font-size: 0.85em;
  }
  
  .form-group input {
    padding: 8px;
    font-size: 0.85em;
  }
  
  .form-help {
    font-size: 0.75em;
  }
} 