:root {
  --bs-body-font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --primary-color: #2563eb;
  --border-color: #e5e7eb;
}

body {
  background-color: #f1f5f9;
  color: #1e293b;
  letter-spacing: -0.01em;
}

/* 메인 컨테이너 카드 */

.board-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 10px 15px -3px rgba(0, 0, 0, 0.04);
}

/* 헤더 스타일 */

.page-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

/* 테이블 전문 디자인 */

.custom-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.custom-table th {
  background-color: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.925rem;
}

.custom-table tbody tr {
  transition: background-color 0.15s ease-in-out;
}

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

/* 뱃지 */

.badge-category {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.775rem;
  border: 1px solid #dbeafe;
  position: absolute;
  top: 8px;
  right: 10px;
}

/* 버튼 커스텀 */

.btn-modern {
  border-radius: 8px;
  font-weight: 500;
  padding: 8px 16px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.btn-modern-primary {
  background: #2563eb;
  border: 1px solid #2563eb;
  color: #fff;
}

.btn-modern-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

/* 폼 라벨 및 인풋 */

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  font-size: 0.925rem;
}

.form-control:focus, .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 파일 드래그존 느낌 */

.file-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background-color: #f8fafc;
  padding: 24px;
  text-align: center;
}

.category-filter-wrap {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 1rem;
}

.category-pill-btn {
  border-radius: 9999px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #4a5568 !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.2s ease-in-out !important;
  display: inline-flex;
  align-items: center;
  margin-bottom: 5px;
}

.category-pill-btn:hover {
  background-color: #edf2f7 !important;
  color: #1a202c !important;
  border-color: #cbd5e1 !important;
}

.category-pill-btn.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.category-badge {
  font-size: 0.75rem;
  padding: 0.25em 0.55em;
  background-color: #e2e8f0;
  color: #475569;
  transition: background-color 0.2s;
}

.category-pill-btn.active .category-badge {
  background-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* =========================
   갤러리 게시판 (viewList > board_table)
   ========================= */

#viewList #board_table.gallery-board {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 툴바 */

#viewList #board_table .gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

#viewList #board_table .gallery-toolbar label {
  cursor: pointer;
  font-weight: 500;
}

/* 카드 그리드 */

#viewList #board_table .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* 카드 */

#viewList #board_table .gallery-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

#viewList #board_table .gallery-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.15), 0 4px 8px -4px rgba(15, 23, 42, 0.08);
}

#viewList #board_table .gallery-card:has(.gallery-check:checked) {
  /*border-color: var(--primary-color);*/
  /*box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);*/
}

/* 썸네일 */

#viewList #board_table .gallery-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  color: #94a3b8;
  font-size: 2.25rem;
  height: 40px;
}

#viewList #board_table .gallery-thumbnail .gallery-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}

/* 본문 */

#viewList #board_table .gallery-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
}

#viewList #board_table .gallery-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px 8px;
}

#viewList #board_table .gallery-title {
  margin: 0;
  font-size: 0.975rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(0.975rem * 1.4 * 2);
  transition: color 0.15s ease;
}

#viewList #board_table .gallery-card:hover .gallery-title {
  color: var(--primary-color);
}

#viewList #board_table .gallery-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.8rem;
  color: #94a3b8;
}

#viewList #board_table .gallery-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#viewList #board_table .gallery-meta span:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 10px;
  margin-left: 0.6rem;
  background-color: #e2e8f0;
}

/* 빈 상태 */

#viewList #board_table .gallery-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  background-color: #f8fafc;
}

/* =========================
   페이지네이션 (viewList > board_table 하단)
   ========================= */

#viewList .board-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

#viewList .board-pagination-wrap:empty {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

#viewList .board-pagination-wrap .pagination-summary {
  font-size: 0.825rem;
  color: #64748b;
}

#viewList .board-pagination-wrap .pagination-summary strong {
  color: #1e293b;
  font-weight: 700;
}

#viewList .board-pagination-wrap .pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

#viewList .board-pagination-wrap .page-numbers {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

#viewList .board-pagination-wrap .page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

#viewList .board-pagination-wrap .page-btn:hover:not(.disabled):not(.active) {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

#viewList .board-pagination-wrap .page-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  cursor: default;
}

#viewList .board-pagination-wrap .page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #f8fafc;
}

#viewList .board-pagination-wrap .page-arrow {
  color: #94a3b8;
}

@media (max-width: 576px) {
  #viewList .board-pagination-wrap {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  #viewList .board-pagination-wrap .pagination-controls {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  #viewList .board-pagination-wrap .pagination-summary {
    width: 100%;
    text-align: center;
  }
}

