.shared-bulk-panel {
  accent-color: #fb7185 !important;
  position: fixed !important;
  bottom: 20px !important;
  top: auto !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: calc(100vw - 24px) !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: auto !important;
  box-sizing: border-box !important;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 9000 !important;
  overflow: hidden !important; 
  max-height: 80vh;
  overflow-y: auto;
  pointer-events: auto !important;
  animation: bulkPanelSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 데스크탑(769px 이상)에서 사이드바 열림 시 리스트 가용 영역 중심에 완벽 고정 */
@media (min-width: 769px) {
  body:not(.sidebar-hidden):not(.view-grid-active) .shared-bulk-panel,
  body:not(.sidebar-hidden):not(.view-grid-active) .bulk-panel-restore-btn {
    left: calc((100vw - var(--sidebar-width, 420px)) / 2) !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    max-width: calc(100vw - var(--sidebar-width, 420px) - 24px) !important;
    min-width: 0 !important;
  }
}

/* 화면 너비 768px 이하(모바일/작은 화면)에서는 어떤 상태이든 무조건 화면 전체 중앙(50%) */
@media (max-width: 768px) {
  body .shared-bulk-panel,
  body .bulk-panel-restore-btn,
  body:not(.sidebar-hidden) .shared-bulk-panel,
  body:not(.sidebar-hidden) .bulk-panel-restore-btn {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
  }
}

.bulk-panel-restore-btn {
  position: fixed !important;
  bottom: 18px !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9000 !important;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 18px !important;
  border-radius: 30px !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(251, 113, 133, 0.5) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  color: #fb7185 !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease, left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto !important;
}

.bulk-panel-restore-btn:hover {
  background: #fb7185 !important;
  color: white !important;
  transform: translateX(-50%) translateY(-2px) scale(1.04) !important;
  box-shadow: 0 12px 28px rgba(251, 113, 133, 0.4) !important;
}

@keyframes bulkPanelSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.shared-bulk-panel .bulk-panel-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 5px;
  box-sizing: border-box !important;
}

.shared-bulk-panel .bulk-header-left,
.shared-bulk-panel .bulk-header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0 !important;
}

.shared-bulk-panel .bulk-edit-fields-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box !important;
}

.shared-bulk-panel .scroll-wrapper-outer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0;
  box-sizing: border-box !important;
}

.shared-bulk-panel .scroll-container {
  overflow-x: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  padding: 0 0;
  box-sizing: border-box !important;
}

.shared-bulk-panel .scroll-container::-webkit-scrollbar {
  display: none;
}

.shared-bulk-panel .scroll-arrow {
  position: absolute;
  z-index: 10 !important;
  background: rgba(30, 41, 59, 0.9);
  display: none;
}

.shared-bulk-panel .scroll-arrow.visible {
  display: flex;
}

.shared-bulk-panel .bulk-field-group {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 6px;
  white-space: nowrap;
}

.shared-bulk-panel .bulk-field-group:first-child {
  margin-left: 0; 
}

.shared-bulk-panel .bulk-field-group:last-child {
  margin-right: 0; 
}

.shared-bulk-panel .bulk-edit-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shared-bulk-panel .bulk-edit-buttons::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1201px) {
  .shared-bulk-panel {
    min-width: 800px;
  }
}

@media (max-width: 1200px) {
  .shared-bulk-panel {
    width: 100%;
    max-width: 95vw;
    padding: 8px 10px;
  }
  
  .shared-bulk-panel .bulk-edit-fields-container,
  .shared-bulk-panel .bulk-edit-fields,
  .shared-bulk-panel .bulk-edit-buttons {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .shared-bulk-panel {
    width: 100%;
    max-width: 98vw;
    padding: 6px 8px;
  }
  
  .shared-bulk-panel .bulk-panel-header {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* [NEW] Global Checkbox Styling for better visibility on Mobile */
input[type="checkbox"] {
  accent-color: #fb7185 !important;
  cursor: pointer;
}

tbody.bulk-edit-active .checkbox-col,
tbody.bulk-edit-active .checkbox-col *,
body.bulk-edit-active .checkbox-col,
body.bulk-edit-active .checkbox-col * {
  cursor: pointer !important;
}

.item-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #fb7185 !important;
  cursor: pointer !important;
  filter: drop-shadow(0 0 2px rgba(251, 113, 133, 0.4));
}


/* Multi-job Panel Styling (Bottom-Right) */
#bulk-jobs-panel {
  position: fixed !important;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-height: 80vh;
  z-index: 9100 !important;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  color: white;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, right 0.3s ease;
}

#bulk-jobs-panel.collapsed {
  transform: translateY(calc(100% - 40px));
}

#bulk-jobs-panel.hidden {
  display: none;
}

.bulk-jobs-header {
  padding: 10px 15px;
  background: rgba(236, 72, 153, 0.15);
  border-bottom: 1px solid rgba(236, 72, 153, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.bulk-jobs-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-jobs-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.bulk-jobs-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ec4899;
  color: white;
}

.bulk-jobs-list {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(80vh - 40px);
}

.bulk-job-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: all 0.3s ease;
}

.bulk-job-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.bulk-job-card.failed {
  border-color: rgba(239, 110, 110, 0.4);
  background: rgba(239, 110, 110, 0.05);
}

.bulk-job-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bulk-job-title {
  font-weight: bold;
  font-size: 0.85rem;
  color: #fb7185;
}

.bulk-job-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.bulk-job-close-btn:hover {
  color: #ef4444;
}

.bulk-job-msg {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-job-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bulk-job-progress-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.bulk-job-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  width: 0%;
  transition: width 0.3s ease;
}

.bulk-job-card.completed .bulk-job-progress-bar {
  background: #10b981;
}

.bulk-job-card.failed .bulk-job-progress-bar {
  background: #ef4444;
}

.bulk-job-percent {
  font-size: 0.8rem;
  font-weight: bold;
  min-width: 32px;
  text-align: right;
}

.bulk-job-stats {
  display: flex;
  gap: 10px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.bulk-job-stats span {
  display: flex;
  align-items: center;
  gap: 2px;
}

@media (min-width: 769px) {
  body:not(.sidebar-hidden) #bulk-jobs-panel {
    right: calc(var(--sidebar-width, 420px) + 20px);
  }
}

