/* 백오피스 스타일 - 신형 UI */

:root {
  --primary-color: #1c7ed6;
  --secondary-color: #6b7684;
  --success-color: #2e7d32;
  --danger-color: #c62828;
  --warning-color: #f57c00;
  --info-color: #1c7ed6;
  --light-color: #f8f9fa;
  --dark-color: #191f28;
}

body {
  font-family: 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background-color: #f8f9fa;
  color: #191f28;
}

/* 네비게이션 - 신형 UI */
.navbar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff !important;
}

.navbar-brand i {
  margin-right: 0.5rem;
}

.nav-link {
  font-weight: 500;
  border-radius: 8px;
  margin: 0 4px;
  padding: 8px 12px !important;
  transition: all 0.15s;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 컨텐츠 섹션 */
.content-section {
  animation: fadeIn 0.3s ease-in;
}

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

/* 페이지 타이틀 */
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #191f28;
  margin-bottom: 0;
}

/* 통계 카드 - 신형 UI */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-card-primary .stat-icon {
  background: #e7f5ff;
  color: #1c7ed6;
}

.stat-card-success .stat-icon {
  background: #e8f5e9;
  color: #2e7d32;
}

.stat-card-warning .stat-icon {
  background: #fff3e0;
  color: #f57c00;
}

.stat-card-info .stat-icon {
  background: #e3f2fd;
  color: #1976d2;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #191f28;
  line-height: 1.2;
}

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

/* 일반 카드 */
.card {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #fff;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #f1f3f5;
  padding: 16px 20px;
  font-weight: 600;
  color: #191f28;
}

.card-body {
  padding: 20px;
}

.modern-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.modern-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f3f5;
}

.modern-card-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #191f28;
}

.modern-card-body {
  padding: 20px;
}

.card-header {
  background-color: white;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
}

/* 상태 배지 - 신형 UI */
.status-badge, .badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: none;
}

.status-pending, .badge.bg-warning {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffeaa7;
}

.status-approved, .badge.bg-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: none;
}

.status-rejected, .badge.bg-danger {
  background-color: #ffebee;
  color: #c62828;
  border: none;
}

.status-partially-approved {
  background-color: #e3f2fd;
  color: #1976d2;
  border: none;
}

.status-in-rental {
  background-color: #f1f3f5;
  color: #495057;
  border: none;
}

.status-returned {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: none;
}

.status-cancelled {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #f5c6cb;
}

/* 우선순위 배지 */
.priority-high {
  background-color: var(--danger-color);
  color: white;
}

.priority-medium {
  background-color: var(--warning-color);
  color: var(--dark-color);
}

.priority-low {
  background-color: var(--info-color);
  color: white;
}

/* 테이블 스타일 - 신형 UI */
.table {
  margin-bottom: 0;
}

.table th {
  border-top: none;
  font-weight: 600;
  font-size: 13px;
  color: #6b7684;
  background-color: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
  padding: 12px 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  vertical-align: middle;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f5;
}

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

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

.table-responsive {
  border-radius: 12px;
  overflow: hidden;
}

/* DataTables 커스터마이징 */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 0.375rem 0.75rem;
}

/* 버튼 스타일 - 신형 UI */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 8px 16px;
  transition: all 0.15s;
}

.btn-primary {
  background-color: #1c7ed6;
  border-color: #1c7ed6;
}

.btn-primary:hover {
  background-color: #1864ab;
  border-color: #1864ab;
  transform: translateY(-1px);
}

.btn-success {
  background-color: #2e7d32;
  border-color: #2e7d32;
}

.btn-success:hover {
  background-color: #1b5e20;
  border-color: #1b5e20;
}

.btn-danger {
  background-color: #c62828;
  border-color: #c62828;
}

.btn-danger:hover {
  background-color: #b71c1c;
  border-color: #b71c1c;
}

.btn-outline-primary {
  color: #1c7ed6;
  border-color: #1c7ed6;
}

.btn-outline-primary:hover {
  background-color: #1c7ed6;
  border-color: #1c7ed6;
}

.btn-outline-secondary {
  color: #6b7684;
  border-color: #dee2e6;
}

.btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
}

.btn-sm {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
}

.btn-group .btn {
  margin-right: 8px;
}

.btn-group .btn:last-child {
  margin-right: 0;
}

/* Form 스타일 - 신형 UI */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 10px 14px;
  font-size: 14px;
  transition: all 0.15s;
}

.form-control:focus, .form-select:focus {
  border-color: #1c7ed6;
  box-shadow: 0 0 0 3px rgba(28, 126, 214, 0.1);
}

.form-label {
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  margin-bottom: 6px;
}

/* 주문 상세 모달 */
.order-detail-section {
  margin-bottom: 2rem;
}

.order-detail-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.order-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
}

.order-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.availability-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.availability-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

/* 고객 정보 카드 */
.customer-info {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
}

.customer-info .info-item {
  margin-bottom: 0.5rem;
}

.customer-info .info-label {
  font-weight: 600;
  color: var(--secondary-color);
  display: inline-block;
  width: 80px;
}

/* 알림 리스트 */
.notification-item {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

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

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

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.notification-icon.warning {
  background-color: #fff3cd;
  color: #856404;
}

.notification-icon.danger {
  background-color: #f8d7da;
  color: #721c24;
}

.notification-icon.info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* 재고 상태 표시 */
.stock-status {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.stock-status.good {
  background-color: var(--success-color);
}

.stock-status.low {
  background-color: var(--warning-color);
}

.stock-status.out {
  background-color: var(--danger-color);
}

/* 로딩 상태 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--secondary-color);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
  
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .btn-group .btn {
    margin-right: 0;
  }
  
  .modal-dialog {
    margin: 0.5rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .btn-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

/* 프린트 스타일 */
@media print {
  .navbar,
  .modal-footer,
  .btn,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_paginate {
    display: none !important;
  }
  
  .container-fluid {
    padding: 0;
  }
  
  .card {
    border: 1px solid #000;
    box-shadow: none;
  }
  
  .table {
    font-size: 12px;
  }
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 툴팁 스타일 */
.tooltip {
  font-size: 0.8rem;
}

.tooltip-inner {
  background-color: var(--dark-color);
  border-radius: 4px;
}

/* 체크박스 스타일 */
.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 진행률 바 */
.progress {
  height: 8px;
  border-radius: 4px;
}

.progress-bar {
  border-radius: 4px;
}
