/* 관리자 페이지 스타일 */

/* CSS 변수 정의 */
:root {
  --admin-primary: #667eea;
  --admin-secondary: #764ba2;
  --admin-primary-hover: #5a67d8;
  --admin-primary-light: #f7fafc;
  --admin-sidebar-bg: #2d3748;
  --admin-sidebar-text: #e2e8f0;
  --admin-sidebar-active: #4a5568;
  --admin-header-height: 60px;
  --admin-sidebar-width: 250px;
}

/* 관리자 전체 레이아웃 */
.admin-body {
  padding-top: var(--admin-header-height);
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 관리자 헤더 */
.admin-header {
  height: var(--admin-header-height);
  z-index: 1030;
  border-bottom: 1px solid #e2e8f0;
}

.admin-header .navbar {
  padding: 0.5rem 1rem;
}

.admin-header .navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--admin-primary) !important;
}

/* 관리자 아바타 */
.admin-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(
    135deg,
    var(--admin-primary),
    var(--admin-secondary)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
}

/* 관리자 사이드바 */
.admin-sidebar {
  position: fixed;
  left: 0;
  top: var(--admin-header-height);
  width: var(--admin-sidebar-width);
  height: calc(100vh - var(--admin-header-height));
  background-color: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  z-index: 1020;
  overflow-y: auto;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sidebar-content {
  padding: 1rem 0;
}

.sidebar-header {
  border-bottom: 1px solid #4a5568;
  margin-bottom: 1rem;
}

.sidebar-title {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0aec0;
}

/* 메뉴 섹션 */
.menu-section {
  margin-bottom: 1.5rem;
}

.menu-section-title {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0aec0;
  border-bottom: 1px solid #4a5568;
  margin-bottom: 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  position: relative;
}

.menu-item:hover,
.menu-item.active {
  background-color: var(--admin-sidebar-active);
  color: white;
  border-left-color: var(--admin-primary);
  text-decoration: none;
}

.menu-item i {
  width: 20px;
  text-align: center;
}

/* 메인 콘텐츠 영역 */
.admin-main-content {
  margin-left: var(--admin-sidebar-width);
  min-height: calc(100vh - var(--admin-header-height));
}

.content-wrapper {
  padding: 2rem;
}

/* 카드 스타일 */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.admin-card {
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.admin-card-header {
  background: linear-gradient(
    135deg,
    var(--admin-primary),
    var(--admin-secondary)
  );
  color: white;
  border-radius: 8px 8px 0 0 !important;
  border: none;
}

/* 테이블 스타일 */
.table th {
  background-color: #f8f9fa;
  vertical-align: middle;
  border-top: none;
  font-weight: 600;
  color: #495057;
}

.table td {
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

/* 버튼 스타일 */
.btn-admin-primary {
  background: linear-gradient(
    135deg,
    var(--admin-primary),
    var(--admin-secondary)
  );
  border: none;
  color: white;
  font-weight: 500;
}

.btn-admin-primary:hover {
  background: linear-gradient(135deg, var(--admin-primary-hover), #6b46c1);
  color: white;
}

/* Q&A 내용 스타일 */
.qna-content {
  line-height: 1.8;
  color: #333;
}

/* 관리자 버튼 그룹 */
.admin-btn-group .btn {
  margin-right: 0.25rem;
}

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

/* 상태 배지 스타일 */
.badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  font-weight: 500;
}

.badge-pending {
  background-color: #fbbf24;
  color: #92400e;
}

.badge-completed {
  background-color: #10b981;
  color: white;
}

.badge-cancelled {
  background-color: #ef4444;
  color: white;
}

/* 통계 카드 */
.stats-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.stats-card:hover {
  transform: translateY(-2px);
}

.stats-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--admin-primary);
}

.stats-label {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 모바일 반응형 */
@media (max-width: 991.98px) {
  .admin-main-content {
    margin-left: 0;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 1rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .btn-group-sm .btn {
    padding: 0.1rem 0.25rem;
    font-size: 0.75rem;
  }

  .stats-card {
    margin-bottom: 1rem;
  }

  .stats-number {
    font-size: 1.5rem;
  }
}

/* 모바일 사이드바 오버레이 */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

body.sidebar-open {
  overflow: hidden;
}

/* 사이드바 토글 버튼 */
#sidebarToggle {
  border: none;
  background: none;
  color: var(--admin-primary);
  font-size: 1.25rem;
  padding: 0.5rem;
}

#sidebarToggle:hover {
  color: var(--admin-primary-hover);
}

/* 드롭다운 메뉴 스타일 */
.admin-header .dropdown-menu {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.admin-header .dropdown-item {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
}

.admin-header .dropdown-item:hover {
  background-color: var(--admin-primary-light);
  color: var(--admin-primary);
}

/* 로그아웃 버튼 스타일 */
.admin-header .dropdown-item[type='submit'] {
  width: 100%;
  text-align: left;
  color: #dc3545;
}

.admin-header .dropdown-item[type='submit']:hover {
  background-color: #f8d7da;
  color: #721c24;
}

/* 스크롤바 스타일 */
.admin-sidebar::-webkit-scrollbar {
  width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
  background: #2d3748;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
  background: #718096;
}
