/* 
 * Admin Override CSS - 부트스트랩 스타일 강제 오버라이드
 * 모든 선택자에 !important 사용으로 우선순위 최상위로 설정
 */

/* Pretendard 폰트 로드 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css');

/* 1. 전역 스타일 오버라이드 */
body, 
body * {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
  letter-spacing: -0.03em !important;
}

/* 2. 색상 변경 - 사이드바 */
.left-side-menu {
  background-color: #FFFFFF !important;
  border-right: 1px solid #E7E7EE !important;
}

.side-nav .side-nav-link {
  color: #5C595F !important;
  padding: 12px 20px !important;
  transition: all 0.2s ease !important;
}

.side-nav .side-nav-link:hover {
  background-color: #F8F6FF !important;
  color: #802FFF !important;
  padding-left: 24px !important;
}

.side-nav .side-nav-link.active,
.side-nav .menuitem-active > a {
  background-color: #F8F6FF !important;
  color: #802FFF !important;
  border-left: 4px solid #802FFF !important;
}

/* 3. 탑바 스타일 */
.navbar-custom {
  background-color: #FFFFFF !important;
  border-bottom: 1px solid #E7E7EE !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* 4. 버튼 스타일 오버라이드 */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #802FFF !important;
  border-color: #802FFF !important;
  box-shadow: none !important;
}

.btn-primary:hover {
  background-color: #A166FF !important;
  border-color: #A166FF !important;
}

.btn-secondary {
  background-color: #FFFFFF !important;
  color: #802FFF !important;
  border: 1px solid #802FFF !important;
}

.btn-secondary:hover {
  background-color: #F8F6FF !important;
  color: #802FFF !important;
  border-color: #802FFF !important;
}

/* 5. 카드 컴포넌트 */
.card {
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
  background-color: transparent !important;
  border-bottom: 1px solid #E7E7EE !important;
  padding: 20px 24px !important;
}

.card-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #5C595F !important;
  margin-bottom: 0 !important;
}

/* 6. 테이블 스타일 */
.table-bordered thead tr th {
  background-color: #FAFAFD !important;
  color: #5C595F !important;
  font-weight: 600 !important;
  border-color: #E7E7EE !important;
  padding: 16px 20px !important;
}

.table-bordered td {
  padding: 16px 20px !important;
  border-color: #F1F1F1 !important;
  color: #5C595F !important;
}

.table-hover tbody tr:hover {
  background-color: #FAFAFD !important;
}

/* 7. 폼 요소 */
.form-control {
  border: 1px solid #DADADA !important;
  border-radius: 8px !important;
  height: auto !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
}

.form-control:focus {
  border-color: #802FFF !important;
  box-shadow: 0 0 0 3px rgba(128, 47, 255, 0.1) !important;
}

/* 8. 배지 스타일 */
.badge-primary {
  background-color: #F8F6FF !important;
  color: #802FFF !important;
  font-weight: 500 !important;
  padding: 4px 12px !important;
}

.badge-success {
  background-color: rgba(92, 166, 251, 0.1) !important;
  color: #5CA6FB !important;
}

.badge-danger {
  background-color: rgba(251, 91, 107, 0.1) !important;
  color: #FB5B6B !important;
}

/* 9. 페이지 배경 */
.content-page {
  background-color: #FAFAFD !important;
}

/* 10. 링크 색상 */
a {
  color: #802FFF !important;
}

a:hover {
  color: #A166FF !important;
}

/* 11. 모달 스타일 */
.modal-content {
  border: none !important;
  border-radius: 12px !important;
}

.modal-header {
  background-color: #FAFAFD !important;
  border-bottom: 1px solid #E7E7EE !important;
  padding: 20px 24px !important;
}

/* 12. 알림 메시지 */
.alert-primary {
  background-color: #F8F6FF !important;
  border-color: #F8F6FF !important;
  color: #802FFF !important;
}

/* 13. 페이지네이션 */
.pagination .page-link {
  color: #5C595F !important;
  border-color: #E7E7EE !important;
}

.pagination .page-item.active .page-link {
  background-color: #802FFF !important;
  border-color: #802FFF !important;
}

/* 14. 드롭다운 메뉴 */
.dropdown-menu {
  border: 1px solid #E7E7EE !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item:hover {
  background-color: #F8F6FF !important;
  color: #802FFF !important;
}

/* 15. 스위치(토글) 커스텀 */
.custom-toggle input:checked + .custom-toggle-slider {
  border-color: #802FFF !important;
}

.custom-toggle input:checked + .custom-toggle-slider:before {
  background: #802FFF !important;
}

/* 16. 차트 영역 */
.apexcharts-text {
  font-family: 'Pretendard' !important;
}

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

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

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

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