/* ✅ modern-dashboard.css - 모던 대시보드 전용 스타일 */

/* ========== 대시보드 레이아웃 ========== */
.dashboard-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ========== 메인 레이아웃 ========== */
.dashboard-main {
  flex: 1;
  padding: 2rem 0;
  min-height: calc(100vh - 80px);
}

/* ========== 헤더 ========== */
/* Navbar 컴포넌트가 헤더 스타일을 관리하므로 여기서는 제거 */
/* 필요한 경우 navbar.html의 <style> 태그에서 수정하세요 */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.dashboard-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dashboard-btn .btn-icon {
  font-size: 1rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
  font-weight: 400;
}

.header-center .current-time {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.time-label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: var(--space-1);
}

.time-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.header-right .user-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: var(--primary-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-800);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  opacity: 0.8;
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-radius: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(59, 130, 246, 0.2);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.user-profile:hover .profile-menu,
.profile-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: #374151;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  margin: 0.25rem;
}

.menu-item:hover {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #1f2937;
  transform: translateX(2px);
}

.menu-item:first-child {
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.menu-item:last-child {
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.menu-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
  opacity: 0.8;
}

.menu-item:hover .menu-icon {
  opacity: 1;
}

.logout-btn {
  color: #dc2626 !important;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
  padding-top: 0.875rem;
  font-weight: 600;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
  color: #b91c1c !important;
}

/* ========== 메인 콘텐츠 ========== */
.dashboard-main {
  flex: 1;
  padding: var(--space-8) 1rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* ========== 요약 섹션 ========== */
.summary-section {
  margin-bottom: var(--space-8);
}

.summary-card {
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
}

.summary-card .card-body {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.summary-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.summary-icon.success {
  background: var(--success-100);
  color: var(--success-700);
}

.summary-icon.primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.summary-icon.warning {
  background: var(--warning-100);
  color: var(--warning-700);
}

.summary-icon.error {
  background: var(--error-100);
  color: var(--error-700);
}

.summary-content {
  flex: 1;
}

.summary-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
}

.summary-value {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: 0.5rem;
}

.value-number {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.value-unit {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-change {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0;
}

.summary-change.positive {
  color: var(--success-600);
}

.summary-change.negative {
  color: var(--error-600);
}

.summary-change.neutral {
  color: var(--text-tertiary);
}

.change-icon {
  font-size: 0.875rem;
}

/* ========== 콘텐츠 섹션 ========== */
.content-section {
  margin-bottom: var(--space-8);
}

.content-card {
  height: fit-content;
}

.col-span-2 {
  grid-column: span 2;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.date-input {
  padding: 0.5rem var(--space-3);
  border: 1px solid var(--border-medium);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.date-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ========== 작업 현황 섹션 ========== */
.work-status-section {
  margin-bottom: var(--space-8);
}

.work-status-container,
.work-status-container-enhanced {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-status-container-enhanced {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.work-status-container-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600), var(--secondary-500));
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

/* ========== 빠른 작업 섹션 ========== */
.quick-actions-section {
  margin-bottom: var(--space-8);
}

.quick-actions-grid-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: none;
  width: 100%;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: var(--space-8);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  border-radius: var(--radius-2xl);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  text-align: center;
  min-height: 180px;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4, #10b981);
  background-size: 300% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quick-action-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.quick-action-card:hover::before,
.quick-action-card:hover::after {
  opacity: 1;
}

.quick-action-card:hover {
  background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 50%, #e0f2fe 100%);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(59, 130, 246, 0.1);
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.2);
}

.action-icon-large {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.action-icon-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quick-action-card:hover .action-icon-large {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
  transform: scale(1.15) rotate(5deg);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    0 0 0 3px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: white;
}

.quick-action-card:hover .action-icon-large::before {
  opacity: 1;
}

.action-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.action-content p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.quick-action-card:hover .action-content h3 {
  color: #1e40af;
}

.quick-action-card:hover .action-content p {
  color: #374151;
}

.action-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #6b7280;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-10px) scale(0.8);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.quick-action-card:hover .action-arrow {
  opacity: 1;
  transform: translateX(0) scale(1);
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.admin-only {
  opacity: 0.6;
  pointer-events: none;
}

.admin-only.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 반응형 빠른 작업 */
@media (max-width: 1024px) {
  .quick-actions-grid-full {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .quick-actions-grid-full,
  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .quick-action-card {
    min-height: 140px;
    padding: 1.5rem;
    gap: 0.75rem;
  }
  
  .action-icon-large {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
  
  .quick-action-card:hover .action-icon-large {
    transform: scale(1.1) rotate(3deg);
  }
  
  .action-content h3 {
    font-size: 1rem;
  }
  
  .action-content p {
    font-size: 0.8rem;
  }
  
  .work-status-container-enhanced {
    min-height: 300px;
  }
  
  .action-arrow {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
  }
}

/* ========== 작업자 섹션 ========== */
.workers-section {
  margin-bottom: var(--space-8);
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.workers-container {
  min-height: 200px;
}

/* ========== 푸터 ========== */
.dashboard-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: 1.5rem;
  margin-top: auto;
}

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

.footer-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-600);
}

/* ========== 토스트 알림 ========== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-primary);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  padding: 1rem;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight var(--transition-normal) ease-out;
}

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

.toast.error {
  border-left: 4px solid var(--error-500);
}

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

.toast.info {
  border-left: 4px solid var(--info-500);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== 작업 현황 스타일 ========== */
.work-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.project-status-card {
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border-light);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.work-count {
  font-size: 0.75rem;
}

.project-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.stat-value {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-value.error {
  color: var(--error-600);
}

/* ========== 작업자 카드 스타일 ========== */
.workers-grid {
  gap: 1rem;
}

.worker-card {
  transition: var(--transition-normal);
}

.worker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.worker-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.worker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-700);
  font-size: 1.125rem;
}

.worker-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
}

.worker-info {
  flex: 1;
}

.worker-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 var(--space-1) 0;
  color: var(--text-primary);
}

.worker-job {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

.worker-status {
  display: flex;
  align-items: center;
}

.worker-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.stat {
  text-align: center;
  flex: 1;
}

.stat.error .stat-value {
  color: var(--error-600);
}

/* ========== 테이블 스타일 ========== */
.workers-table {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th {
  background: var(--gray-50);
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-primary);
}

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

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

.worker-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ========== 빈 상태 및 오류 상태 ========== */
.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon,
.error-icon {
  font-size: var(--text-5xl);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3,
.error-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.empty-state p,
.error-state p {
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  max-width: 400px;
  line-height: 1.5;
}

/* ========== 토스트 스타일 보완 ========== */
.toast-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.125rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

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

/* ========== 반응형 디자인 ========== */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-main {
    padding: 0.75rem;
    margin: 0;
    max-width: 100%;
    width: 100%;
  }

  /* 헤더는 항상 가로 배치 유지 (navbar.html에서 관리) */
  .header-content {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  
  .grid-cols-4,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .summary-card .card-body {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .dashboard-header {
    padding: 0.75rem 1rem;
  }
  
  .brand-title {
    font-size: 1.125rem;
  }
  
  .brand-subtitle {
    font-size: 0.75rem;
  }
  
  .user-info {
    display: none;
  }
  
  .toast-container {
    left: 1rem;
    right: 1rem;
  }
  
  .toast {
    min-width: auto;
  }
}

/* ========== 작업자 상태 관리 ========== */
.worker-status-list {
  width: 100%;
}

.worker-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
}

/* 개선된 헤더 스타일 */
.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-title h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.header-date {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 개선된 범례 스타일 */
.legend-item {
  font-size: 0.75rem;
  padding: var(--space-1) 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  border: 1px solid transparent;
  position: relative;
}

.legend-item::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-1);
}

.legend-complete { background: #ecfdf5; color: #059669; }
.legend-complete::before { background: #059669; }

.legend-overtime { background: #ecfeff; color: #0891b2; }
.legend-overtime::before { background: #0891b2; }

.legend-vacation { background: #fffbeb; color: #f59e0b; }
.legend-vacation::before { background: #f59e0b; }

.legend-partial { background: #fff7ed; color: #f97316; }
.legend-partial::before { background: #f97316; }

.legend-incomplete { background: #fef2f2; color: #ef4444; }
.legend-incomplete::before { background: #ef4444; }

.legend-error { background: #fef2f2; color: #dc2626; }
.legend-error::before { background: #dc2626; }

/* 한 줄 레이아웃으로 변경 */
.worker-status-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* 한 줄 작업자 카드 - 개선된 가독성 */
.worker-status-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: var(--space-5) 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 85px;
}

.worker-status-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-500);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.worker-status-row:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.worker-status-row:hover::before {
  opacity: 1;
}

/* 상태별 색상 - 개선된 근로 상태 기준 */
.worker-status-row.complete::before { background: #059669; } /* 정시근로 - 초록색 */
.worker-status-row.overtime::before { background: #0891b2; } /* 연장근로 - 청록색 */
.worker-status-row.vacation-full::before { background: #f59e0b; } /* 연차 - 주황색 */
.worker-status-row.vacation-half::before { background: #fbbf24; } /* 반차 - 밝은 주황색 */
.worker-status-row.vacation-half-half::before { background: #fcd34d; } /* 조퇴 - 노란색 */
.worker-status-row.vacation-quarter::before { background: #fde047; } /* 반반차 - 밝은 노란색 */
.worker-status-row.partial::before { background: #f97316; } /* 부분입력 - 주황색 */
.worker-status-row.incomplete::before { background: #ef4444; } /* 미입력 - 빨간색 */
.worker-status-row.error::before { background: #dc2626; } /* 오류 - 진한 빨간색 */
.worker-status-row.overtime-warning::before { background: #dc2626; } /* 확인필요 - 진한 빨간색 */

/* 한 줄 레이아웃 요소들 */
.worker-basic-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 200px;
}

.worker-stats-inline {
  display: flex;
  gap: 1rem;
  flex: 1;
  justify-content: center;
}

.worker-stats-inline .stat-item {
  text-align: center;
  padding: 0.5rem var(--space-3);
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #f3f4f6;
  min-width: 80px;
}

.worker-stats-inline .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: var(--space-1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.worker-stats-inline .stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}

.worker-stats-inline .stat-value.warning {
  color: #dc2626;
}

.worker-stats-inline .stat-item.error .stat-value {
  color: #ef4444;
}

.worker-actions-inline {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

/* 상태 배지 스타일 */
.status-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  min-width: 70px;
  text-align: center;
}

.status-complete { background: #ecfdf5; color: #059669; border-color: #6ee7b7; }
.status-overtime { background: #ecfeff; color: #0891b2; border-color: #67e8f9; }
.status-vacation-full { background: #fffbeb; color: #f59e0b; border-color: #fde68a; }
.status-vacation-half { background: #fffbeb; color: #f59e0b; border-color: #fde68a; }
.status-vacation-half-half { background: #fffbeb; color: #f59e0b; border-color: #fde68a; }
.status-vacation-quarter { background: #fffbeb; color: #f59e0b; border-color: #fde68a; }
.status-partial { background: #fff7ed; color: #f97316; border-color: #fed7aa; }
.status-incomplete { background: #fef2f2; color: #ef4444; border-color: #fca5a5; }
.status-error { background: #fef2f2; color: #dc2626; border-color: #f87171; }
.status-overtime-warning { background: #fef2f2; color: #dc2626; border-color: #f87171; }

.worker-avatar {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: 700;
  font-size: var(--text-xl);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.worker-details {
  flex: 1;
}

.worker-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 var(--space-1) 0;
  line-height: 1.2;
}

.worker-job {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

.worker-status-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.status-icon {
  font-size: 1.5rem;
}

.status-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.worker-stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: var(--space-3);
  background: var(--bg-secondary);
  border-radius: 0.75rem;
}

.worker-stats-row .stat-item {
  flex: 1;
  text-align: center;
}

.worker-stats-row .stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.worker-stats-row .stat-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.worker-stats-row .stat-value.warning {
  color: var(--error-600);
}

.worker-stats-row .stat-item.error .stat-value {
  color: var(--error-600);
}

.worker-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.worker-actions .btn {
  flex: 1;
  min-width: 120px;
  font-size: 0.875rem;
  padding: 0.5rem var(--space-3);
}

.worker-edit-btn {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border: none;
  color: var(--text-inverse);
}

.worker-edit-btn:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-1px);
}

.vacation-btn {
  background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
  border: none;
  color: var(--text-inverse);
}

.vacation-btn:hover {
  background: linear-gradient(135deg, var(--warning-600), var(--warning-700));
  transform: translateY(-1px);
}

.confirm-overtime-btn {
  background: linear-gradient(135deg, var(--error-500), var(--error-600));
  border: none;
  color: var(--text-inverse);
}

.confirm-overtime-btn:hover {
  background: linear-gradient(135deg, var(--error-600), var(--error-700));
  transform: translateY(-1px);
}

/* ========== 모달 시스템 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-container {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  color: var(--text-inverse);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-inverse);
  font-size: var(--text-xl);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: var(--transition-normal);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* 모달 작업자 정보 */
.modal-worker-info {
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-worker-avatar {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.modal-worker-details {
  flex: 1;
}

.modal-worker-details h3 {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.modal-worker-details p {
  margin: 0;
  color: var(--text-secondary);
}

.modal-worker-summary {
  display: flex;
  gap: 1rem;
}

.modal-stat {
  text-align: center;
  padding: var(--space-3);
  background: var(--bg-primary);
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  min-width: 80px;
}

.modal-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.modal-stat-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-stat-value.warning {
  color: var(--error-600);
}

/* 모달 섹션 */
.modal-section {
  margin-bottom: 1.5rem;
}

.modal-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-light);
}

.modal-section-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 기존 작업 목록 */
.modal-existing-work {
  max-height: 200px;
  overflow-y: auto;
}

.modal-work-item {
  background: var(--bg-secondary);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-light);
  transition: var(--transition-normal);
}

.modal-work-item:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-sm);
}

.modal-work-info h5 {
  margin: 0 0 var(--space-1) 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-work-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.modal-error-badge {
  display: inline-block;
  background: var(--error-100);
  color: var(--error-700);
  padding: var(--space-1) 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  margin-top: var(--space-1);
}

.modal-work-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-work-hours {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-600);
}

/* 새 작업 폼 */
.modal-work-form {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-form-group {
  margin-bottom: 1rem;
}

.modal-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-select,
.modal-input {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid var(--border-light);
  border-radius: 0.75rem;
  font-size: 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition-normal);
}

.modal-select:focus,
.modal-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-quick-time {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.modal-time-btn {
  padding: 0.5rem var(--space-3);
  border: 1px solid var(--primary-300);
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.modal-time-btn:hover {
  background: var(--primary-200);
  border-color: var(--primary-400);
}

.modal-save-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 1rem;
}

/* 휴가 처리 버튼 */
.modal-vacation-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-vacation-btn {
  flex: 1;
  min-width: 150px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* 빈 상태 */
.modal-empty-state {
  text-align: center;
  padding: var(--space-8);
  color: var(--text-secondary);
}

.modal-empty-icon {
  font-size: var(--text-4xl);
  margin-bottom: 0.5rem;
}

/* 작업자 상태 반응형 */
@media (max-width: 1200px) {
  .worker-status-rows {
    /* 한 줄 레이아웃은 그대로 유지 */
  }
}

@media (max-width: 768px) {
  .worker-status-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .status-legend {
    justify-content: center;
  }
  
  .worker-status-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .worker-basic-info {
    flex: none;
    justify-content: center;
  }
  
  .worker-stats-inline {
    justify-content: space-around;
  }
  
  .worker-actions-inline {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* 모달 반응형 */
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-form-row {
    grid-template-columns: 1fr;
  }
  
  .modal-worker-info {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .modal-worker-summary {
    justify-content: center;
  }
  
  .modal-vacation-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .worker-stats-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .worker-actions .btn {
    min-width: 100px;
    font-size: 0.75rem;
  }
}

/* ========== 근태 현황 그리드 (Added dynamically) ========== */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.worker-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.worker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.worker-card.status-alert {
  background-color: #fef2f2;
}

.worker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.worker-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.worker-job {
  font-size: 0.75rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

.worker-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-badge {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.work-hours {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.worker-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed #e5e7eb;
}

.alert-text {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
  width: 100%;
}

/* ========== 작업 현황 테이블 ========== */
.work-status-table-container {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

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

.work-status-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #d1d5db;
}

.work-status-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  border-right: 1px solid #e5e7eb;
}

.work-status-table th:last-child {
  border-right: none;
}

.work-status-table tbody tr {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  transition: var(--transition-fast);
}

.work-status-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.work-status-table tbody tr:hover {
  background: #f3f4f6;
}

.work-status-table tbody tr:last-child {
  border-bottom: none;
}

.work-status-table td {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  vertical-align: middle;
  border-right: 1px solid #f3f4f6;
  color: #1f2937;
}

.work-status-table td:last-child {
  border-right: none;
}

/* 로딩 상태 */
.work-status-table .loading-state {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-tertiary);
}

.work-status-table .loading-state .spinner {
  margin: 0 auto var(--space-4);
}

/* 작업자 정보 셀 */
.worker-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.worker-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.worker-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.worker-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.9375rem;
  line-height: 1.2;
}

.worker-job {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.2;
}

/* 상태 배지 */
.worker-status {
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid;
}

.status-badge .status-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.status-badge.status-success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.status-badge.status-info {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.status-badge.status-warning {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde047;
}

.status-badge.status-error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.status-badge.status-critical {
  background: #fecaca;
  color: #7f1d1d;
  border-color: #f87171;
}

.status-badge.status-vacation {
  background: #fed7aa;
  color: #9a3412;
  border-color: #fdba74;
}

.status-badge.status-incomplete {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.status-badge.status-overtime {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #a5b4fc;
}

/* 작업시간 셀 */
.worker-hours {
  white-space: nowrap;
}

.hours-value {
  font-weight: 600;
  color: #111827;
  font-size: 1rem;
}

.hours-value.hours-warning {
  color: #dc2626;
  font-weight: 700;
}

/* 작업건수 셀 */
.worker-tasks {
  white-space: nowrap;
}

.tasks-summary {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.task-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.task-label {
  color: #6b7280;
  font-weight: 500;
}

.task-value {
  color: #111827;
  font-weight: 600;
}

.task-count.task-error .task-label {
  color: #dc2626;
}

.task-count.task-error .task-value {
  color: #991b1b;
  font-weight: 700;
}

/* 액션 버튼 */
.worker-actions {
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.action-btn.btn-edit {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.action-btn.btn-edit:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.action-btn.btn-vacation {
  background: white;
  color: #ea580c;
  border-color: #ea580c;
}

.action-btn.btn-vacation:hover {
  background: #ea580c;
  color: white;
}

.action-btn.btn-confirm {
  background: white;
  color: #16a34a;
  border-color: #16a34a;
}

.action-btn.btn-confirm:hover {
  background: #16a34a;
  color: white;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .work-status-table {
    display: block;
  }

  .work-status-table thead {
    display: none;
  }

  .work-status-table tbody,
  .work-status-table tr,
  .work-status-table td {
    display: block;
    width: 100%;
  }

  .work-status-table tr {
    margin-bottom: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1rem;
    background: white;
  }

  .work-status-table td {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--warm-100);
  }

  .work-status-table td:last-child {
    border-bottom: none;
  }

  .work-status-table td::before {
    content: attr(data-label);
    font-weight: var(--font-semibold);
    display: block;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    text-transform: uppercase;
  }

  .worker-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    text-align: center;
  }
}

/* ========== 작업장 상세 모달 (개선) ========== */
.workplace-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.workplace-modal-container {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: workplaceModalIn 0.3s ease-out;
  overflow: hidden;
}

@keyframes workplaceModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.workplace-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  border-radius: 16px 16px 0 0;
}

.workplace-modal-title-section {
  flex: 1;
}

.workplace-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.workplace-modal-subtitle {
  margin: 8px 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.workplace-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.workplace-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* 탭 네비게이션 */
.workplace-modal-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0 16px;
  overflow-x: auto;
}

.workplace-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.workplace-tab:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.workplace-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: #fff;
}

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

.tab-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.workplace-tab.active .tab-badge {
  background: #3b82f6;
}

/* 탭 콘텐츠 */
.workplace-modal-body {
  flex: 1;
  overflow-y: auto;
}

.workplace-tab-contents {
  padding: 24px;
}

.workplace-tab-content {
  display: none;
}

.workplace-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

/* 현황 개요 - 요약 카드 */
.workplace-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.workplace-summary-cards .summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.workplace-summary-cards .summary-card.workers {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #93c5fd;
}

.workplace-summary-cards .summary-card.visitors {
  background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
  border-color: #c4b5fd;
}

.workplace-summary-cards .summary-card.tasks {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
  border-color: #6ee7b7;
}

.workplace-summary-cards .summary-icon {
  font-size: 2rem;
}

.workplace-summary-cards .summary-info {
  display: flex;
  flex-direction: column;
}

.workplace-summary-cards .summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.workplace-summary-cards .summary-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

/* 섹션 스타일 */
.workplace-section {
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

.section-icon {
  font-size: 1.1rem;
}

/* 현재 작업 목록 */
.current-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.current-task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  border-left: 4px solid #3b82f6;
}

.current-task-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.task-info {
  flex: 1;
}

.task-name {
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px;
}

.task-detail {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* 설비 현황 */
.equipment-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.equipment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.equipment-icon {
  font-size: 1.5rem;
}

.equipment-info {
  flex: 1;
}

.equipment-name {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
  margin: 0;
}

.equipment-status {
  font-size: 0.8rem;
  margin: 0;
}

.equipment-status.normal {
  color: #16a34a;
}

.equipment-status.warning {
  color: #f59e0b;
}

.equipment-status.error {
  color: #dc2626;
}

/* 작업자/방문자 목록 */
.workers-list,
.visitors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worker-item,
.visitor-item {
  padding: 16px;
  border-radius: 10px;
  border-left: 4px solid;
}

.worker-item {
  background: #eff6ff;
  border-left-color: #3b82f6;
}

.visitor-item {
  background: #faf5ff;
  border-left-color: #8b5cf6;
}

.worker-item-header,
.visitor-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.worker-item-title,
.visitor-item-title {
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.worker-item-badge,
.visitor-item-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.worker-item-badge {
  background: #dbeafe;
  color: #1e40af;
}

.visitor-item-badge {
  background: #f3e8ff;
  color: #7c3aed;
}

.worker-item-detail,
.visitor-item-detail {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 상세 지도 */
.detail-map-container {
  width: 100%;
  max-height: 500px;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px;
}

/* 이미지와 마커를 감싸는 래퍼 - 이미지 크기에 맞춰짐 */
.map-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.map-image-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 480px;
  height: auto;
}

/* 마커 레이어 - 래퍼 내에서 이미지 위에 오버레이 */
.map-image-wrapper .equipment-markers-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.detail-map-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #9ca3af;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  display: block;
}

.detail-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #6b7280;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid;
}

/* 빈 메시지 */
.empty-message {
  text-align: center;
  color: #9ca3af;
  padding: 32px 16px;
  font-size: 0.9rem;
}

/* 모달 푸터 */
.workplace-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.workplace-modal-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.workplace-modal-footer .btn-outline {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
}

.workplace-modal-footer .btn-outline:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.workplace-modal-footer .btn-primary {
  background: #3b82f6;
  border: 1px solid #3b82f6;
  color: #fff;
}

.workplace-modal-footer .btn-primary:hover {
  background: #2563eb;
}

/* 설비 마커 레이어 */
.equipment-markers-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* 설비 마커 - 작업장 관리 스타일과 동일 */
.equipment-marker {
  position: absolute;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid #047857;
  border-radius: 3px;
  background: transparent;
  transition: all 0.15s ease;
}

.equipment-marker:hover {
  z-index: 100;
  border-width: 3px;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.3);
}

/* 마커 라벨 - 텍스트 표시 */
.equipment-marker .marker-label {
  position: absolute;
  left: 3px;
  top: 100%;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #047857;
  white-space: nowrap;
  text-shadow:
    1px 1px 0 #fff,
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    0 1px 0 #fff,
    0 -1px 0 #fff,
    1px 0 0 #fff,
    -1px 0 0 #fff;
}

/* 상태별 색상 */
.equipment-marker.active {
  border-color: #047857;
}
.equipment-marker.active .marker-label {
  color: #047857;
}

.equipment-marker.maintenance {
  border-color: #d97706;
}
.equipment-marker.maintenance .marker-label {
  color: #d97706;
}

.equipment-marker.repair {
  border-color: #dc2626;
  animation: pulse-border 1.5s infinite;
}
.equipment-marker.repair .marker-label {
  color: #dc2626;
}

.equipment-marker.inactive {
  border-color: #6b7280;
  border-style: dashed;
}
.equipment-marker.inactive .marker-label {
  color: #6b7280;
}

/* 임시 이동된 설비 */
.equipment-marker.moved {
  border-color: #f59e0b;
  border-style: dashed;
  border-width: 3px;
  background: rgba(245, 158, 11, 0.15);
  animation: movedPulse 2s infinite;
}
.equipment-marker.moved .marker-label {
  color: #d97706;
}

@keyframes movedPulse {
  0%, 100% { border-color: #f59e0b; }
  50% { border-color: #fbbf24; }
}

@keyframes pulse-border {
  0%, 100% { border-color: #dc2626; }
  50% { border-color: #fca5a5; }
}

.no-markers-message {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* 설비 툴팁 */
.equipment-tooltip {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 200;
  min-width: 220px;
  max-width: 300px;
  overflow: hidden;
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

.tooltip-header strong {
  color: #1f2937;
  font-size: 0.95rem;
}

.tooltip-status {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.tooltip-status.active {
  background: #dcfce7;
  color: #166534;
}

.tooltip-status.maintenance {
  background: #fef3c7;
  color: #92400e;
}

.tooltip-status.repair {
  background: #fee2e2;
  color: #991b1b;
}

.tooltip-status.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.tooltip-body {
  padding: 12px 16px;
}

.tooltip-body p {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: #374151;
}

.tooltip-body p:last-child {
  margin-bottom: 0;
}

.tooltip-body .label {
  color: #6b7280;
  font-weight: 500;
  margin-right: 4px;
}

.tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.tooltip-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.tooltip-actions {
  padding: 8px 16px 12px;
  border-top: 1px solid #e5e7eb;
}

.tooltip-detail-btn {
  width: 100%;
  padding: 8px 12px;
  background: #047857;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tooltip-detail-btn:hover {
  background: #065f46;
}

/* ==========================================
   설비 상세 슬라이드 패널
   ========================================== */

.equipment-slide-panel {
  position: absolute;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.equipment-slide-panel.open {
  right: 0;
}

.slide-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.slide-panel-back {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
}

.slide-panel-back:hover {
  color: #111827;
}

.slide-panel-title-section {
  flex: 1;
  min-width: 0;
}

.slide-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-panel-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 4px;
}

.slide-panel-status.active { background: #d1fae5; color: #065f46; }
.slide-panel-status.maintenance { background: #fef3c7; color: #92400e; }
.slide-panel-status.repair_needed { background: #fee2e2; color: #991b1b; }
.slide-panel-status.inactive { background: #e5e7eb; color: #374151; }
.slide-panel-status.external { background: #dbeafe; color: #1e40af; }
.slide-panel-status.repair_external { background: #ede9fe; color: #5b21b6; }

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

.panel-section {
  margin-bottom: 20px;
}

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

.panel-section-header h4,
.panel-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.btn-icon-sm {
  width: 24px;
  height: 24px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #6b7280;
}

.btn-icon-sm:hover {
  background: #f3f4f6;
}

.panel-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panel-info-item {
  font-size: 0.8rem;
}

.panel-info-item .label {
  color: #9ca3af;
  display: block;
  font-size: 0.7rem;
}

.panel-info-item .value {
  color: #111827;
  font-weight: 500;
}

/* 사진 그리드 */
.panel-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.panel-photo-item {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.panel-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-photo-item .delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.panel-photo-item:hover .delete-btn {
  opacity: 1;
}

.panel-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px;
  color: #9ca3af;
  font-size: 0.8rem;
}

/* 액션 버튼 */
.panel-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.panel-action-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.panel-action-btn span:first-child {
  font-size: 1.1rem;
}

.panel-action-btn.move {
  background: #dbeafe;
  color: #1e40af;
}
.panel-action-btn.move:hover { background: #bfdbfe; }

.panel-action-btn.repair {
  background: #fef3c7;
  color: #92400e;
}
.panel-action-btn.repair:hover { background: #fde68a; }

.panel-action-btn.export {
  background: #ede9fe;
  color: #5b21b6;
}
.panel-action-btn.export:hover { background: #ddd6fe; }

/* 이력 리스트 */
.panel-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 0.8rem;
}

.panel-history-date {
  color: #6b7280;
  white-space: nowrap;
  min-width: 70px;
}

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

.panel-history-title {
  font-weight: 500;
  color: #111827;
}

.panel-history-detail {
  color: #6b7280;
  font-size: 0.75rem;
  margin-top: 2px;
}

.panel-history-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.panel-history-badge.pending { background: #fef3c7; color: #92400e; }
.panel-history-badge.completed { background: #d1fae5; color: #065f46; }
.panel-history-badge.exported { background: #ede9fe; color: #5b21b6; }
.panel-history-badge.returned { background: #d1fae5; color: #065f46; }

.panel-history-action {
  padding: 4px 8px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
}

/* 미니 모달 */
.mini-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.mini-modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mini-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.mini-modal-header h4 {
  margin: 0;
  font-size: 1rem;
}

.mini-modal-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

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

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

.mini-modal-body label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #374151;
}

.mini-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
}

.mini-photo-preview {
  margin-top: 8px;
}

.mini-photo-preview img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 6px;
}

/* 이동 모달 스타일 */
.move-step-content {
  min-height: 350px;
}

.move-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 0.9rem;
}

.step-badge {
  width: 24px;
  height: 24px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-step-back {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 1rem;
}

.btn-step-back:hover {
  background: #f3f4f6;
}

.move-help-text {
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  padding: 8px;
  margin: 0;
  background: #fffbeb;
}

.move-factory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
}

.move-factory-card {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.move-factory-card:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.move-factory-card .factory-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.move-factory-card .factory-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}

.move-layout-map {
  width: 100%;
  height: 300px;
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}

.move-layout-map img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.move-layout-map .layout-region {
  position: absolute;
  border: 2px solid rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.move-layout-map .layout-region:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
}

.move-layout-map .layout-region .region-label {
  position: absolute;
  bottom: 2px;
  left: 2px;
  font-size: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 4px;
  border-radius: 2px;
  white-space: nowrap;
}

.move-detail-map {
  width: 100%;
  height: 350px;
  overflow: auto;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  -webkit-overflow-scrolling: touch;
}

.move-map-wrapper {
  position: relative;
  display: inline-block;
  cursor: crosshair;
  min-width: 800px;
}

.move-map-wrapper img {
  display: block;
  width: 800px;
  height: auto;
}

.move-markers-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.move-position-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #dc2626;
  border: 3px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  pointer-events: none;
  animation: markerPulse 1s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* 작업장 선택 그리드 (레이아웃 위치 없을 때) */
.move-workplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 16px;
  max-height: 350px;
  overflow-y: auto;
}

.move-workplace-card {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: white;
}

.move-workplace-card:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.move-workplace-card .wp-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.move-workplace-card .wp-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #111827;
  line-height: 1.3;
}

/* 이동 상세지도 설비 마커 */
.move-eq-marker {
  position: absolute;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
  background: transparent;
}

.move-eq-marker .eq-label {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-shadow:
    1px 1px 0 #fff,
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    0 1px 0 #fff,
    0 -1px 0 #fff;
}

/* 기존 설비 (초록색 테두리) */
.move-eq-marker.existing {
  border: 2px solid #047857;
}
.move-eq-marker.existing .eq-label {
  color: #047857;
}

/* 현재 이동 중인 설비 (주황색 테두리, 대시) */
.move-eq-marker.current-moving {
  border: 3px dashed #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}
.move-eq-marker.current-moving .eq-label {
  color: #d97706;
}

/* 이동 목표 위치 (빨간색, 깜빡임) */
.move-eq-marker.target {
  border: 3px solid #dc2626;
  background: rgba(220, 38, 38, 0.2);
  z-index: 20;
  animation: targetPulse 1s ease-in-out infinite;
}
.move-eq-marker.target .eq-label {
  color: #dc2626;
}

@keyframes targetPulse {
  0%, 100% { border-color: #dc2626; }
  50% { border-color: #fca5a5; }
}

.panel-move-map {
  width: 100%;
  height: 200px;
  background: #f3f4f6;
  border-radius: 8px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.panel-move-map img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
}

.panel-move-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #dc2626;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  pointer-events: none;
}

.help-text {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
}

/* 모달 반응형 */
@media (max-width: 768px) {
  .workplace-modal-container {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .workplace-modal-header {
    border-radius: 0;
  }

  .workplace-modal-tabs {
    padding: 0 8px;
  }

  .workplace-tab {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .tab-text {
    display: none;
  }

  .workplace-summary-cards {
    grid-template-columns: 1fr;
  }

  .equipment-summary {
    grid-template-columns: 1fr;
  }

  .workplace-modal-footer {
    flex-direction: column;
    gap: 12px;
    border-radius: 0;
  }

  .workplace-modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .equipment-marker .marker-label {
    font-size: 9px;
  }
}

/* ==================== 임시 이동 설비 목록 ==================== */
.moved-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 768px) {
  .moved-equipment-grid { grid-template-columns: 1fr; }
}

.moved-equipment-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 4px solid #f59e0b;
}

.moved-equipment-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

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

.moved-eq-code {
  font-weight: 700;
  font-size: 0.9rem;
  color: #374151;
}

.moved-eq-badge {
  background: #fef3c7;
  color: #d97706;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.moved-eq-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.moved-eq-location {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.location-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.location-label {
  font-size: 0.8rem;
  color: #6b7280;
}

.location-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.location-value.current {
  color: #f59e0b;
  font-weight: 600;
}

.location-arrow {
  text-align: center;
  color: #9ca3af;
  font-size: 1rem;
  margin: 4px 0;
}

.moved-eq-date {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 12px;
}

.moved-equipment-card .btn {
  width: 100%;
}

/* 모달 내 이동 설비 탭 스타일 */
.moved-eq-tab-content {
  padding: 16px 0;
}

.moved-eq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.moved-eq-item {
  background: white;
  border-radius: 8px;
  padding: 12px;
  border-left: 4px solid #9ca3af;
}

.moved-eq-item.in {
  border-left-color: #22c55e;
  background: #f0fdf4;
}

.moved-eq-item.out {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.moved-eq-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.moved-eq-item-header .eq-code {
  font-weight: 700;
  font-size: 0.85rem;
  color: #374151;
}

.moved-eq-item-header .eq-name {
  font-size: 0.9rem;
  color: #111827;
}

.moved-eq-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #6b7280;
}

.moved-eq-item-info .arrow {
  color: #9ca3af;
}

.moved-eq-item-info .to-location {
  font-weight: 500;
}

.moved-eq-item-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}
