/* ========================================
   Vasanta 회원 컴포넌트 CSS (최적화 버전)
   Bootstrap 5 기반, 프로젝트 특화 스타일만 포함
   작성일: 2025-10-02
   ======================================== */

/* ==========================================
   1. 공통 유틸리티
   ========================================== */

a {
  text-decoration: none;
  color: var(--bs-a-text-color);
}

[data-bs-theme="light"][data-skin="bordered"] {
  --bs-a-text-color: black;
}

[data-bs-theme="dark"][data-skin="bordered"] {
  --bs-a-text-color: white;
}

/* 스크롤바 항상 표시 (페이지 흔들림 방지) */
html {
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* 게시판 내용 영역 스타일 */
#nttCn {
  line-height: 1.6;
  min-height: 200px;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

#nttCn * {
  font-family: inherit !important;
}

#nttCn p {
  margin-bottom: 1rem;
}

#nttCn img {
  max-width: 100%;
  height: auto;
}

#nttCn pre {
  background-color: var(--bs-gray-100);
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
}

#nttCn code {
  background-color: var(--bs-gray-100);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

#nttCn blockquote {
  border-left: 4px solid var(--bs-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--bs-text-muted);
}

/* ==========================================
   2. 파일 업로드 컴포넌트
   ========================================== */

.drop-zone {
  border: 2px dashed var(--bs-border-color);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: var(--bs-body-bg);
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--bs-primary);
  background-color: var(--bs-primary-bg-subtle);
}

.drop-zone-icon {
  font-size: 48px;
  color: var(--bs-text-muted);
  margin-bottom: 16px;
  display: block;
}

.drop-zone.dragover .drop-zone-icon {
  color: var(--bs-primary);
}

.drop-zone-text {
  color: var(--bs-text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.uploaded-file-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
}

.uploaded-file-info {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.uploaded-file-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.uploaded-file-details {
  flex: 1;
  min-width: 0;
}

.uploaded-file-name {
  font-weight: 500;
  margin-right: 8px;
  word-break: break-all;
  line-height: 1.4;
}

.uploaded-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.uploaded-file-size,
.uploaded-file-date {
  color: var(--bs-text-muted);
  font-size: 15px;
}

.uploaded-file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ==========================================
   3. 정보 뷰어 컴포넌트
   ========================================== */

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background-color: var(--bs-gray-50);
  border-radius: 8px;
  border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .info-item {
  background-color: var(--bs-gray-800);
}

.info-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--bs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--bs-body-color);
  min-height: 24px;
  display: flex;
  align-items: center;
}

.info-value:empty:before {
  content: "-";
  color: var(--bs-text-muted);
}

/* ==========================================
   4. 구독 컴포넌트
   ========================================== */

.subscription-list-item {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  transition: all 0.3s ease;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
}

.subscription-list-item:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.status-badge.active {
  background: linear-gradient(45deg, #28a745, #20c997);
}

.status-badge.paused {
  background: linear-gradient(45deg, #ffc107, #fd7e14);
}

.status-badge.cancelled {
  background: linear-gradient(45deg, #dc3545, #e83e8c);
}

.subscription-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--bs-primary);
}

.subscription-info {
  font-size: 0.9rem;
  color: var(--bs-text-muted);
}

.subscription-actions {
  min-width: 200px;
}

.subscription-actions .btn {
  margin: 0 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}

.payment-history {
  max-height: 200px;
  overflow-y: auto;
}

.subscription-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.subscription-meta > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================
   5. 상품 컴포넌트
   ========================================== */

.product-card,
.galleryBox .galleryItem {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  border-radius: 0.375rem;
}

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

.product-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bs-primary);
}

.product-thumbnail {
  height: 200px;
  object-fit: cover;
  background: var(--bs-secondary-bg);
}

/* 제품 갤러리 */
.galleryBox {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.galleryBox .galleryItem {
  width: calc(25% - 0.75rem);
  box-shadow: 0 2px 6px 0 rgba(67, 89, 113, 0.12);
}

.galleryBox .galleryItem:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px 0 rgba(67, 89, 113, 0.16);
}

.galleryBox .galleryItem a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.375rem;
  overflow: hidden;
}

.galleryBox .galleryItem a img {
  width: 100%;
  height: 12.5rem;
  object-fit: cover;
}

.galleryBox .galleryItem .item-content {
  padding: 1rem;
}

.galleryBox .galleryItem .item-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--sfn-blue-400);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.galleryBox .galleryItem .item-price {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sfn-primary);
}

/* ==========================================
   6. 결제 컴포넌트
   ========================================== */

.payment-container {
  max-width: 800px;
  margin: 0 auto;
}

.order-info-table {
  background: var(--bs-body-bg);
}

.order-info-table th {
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-weight: 600;
}

.order-info-table td {
  color: var(--bs-body-color);
}

.payment-method-card {
  border: 2px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.payment-method-card.selected {
  border-color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}

.final-amount {
  font-size: 2rem;
  font-weight: bold;
  color: var(--bs-primary);
}

.agreement-box {
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
  padding: 15px;
  border-radius: 8px;
}

/* ==========================================
   7. Empty State
   ========================================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  font-size: 4rem;
  color: var(--bs-text-muted);
  margin-bottom: 1rem;
}

/* ==========================================
   8. 테스트/유틸리티 페이지
   ========================================== */

.pop_wrap {
  padding: 20px;
  background: var(--sfn-bg-card);
  border-radius: 8px;
}

.tbl_th {
  background-color: var(--sfn-bg-subtle);
  padding: 12px;
  border: 1px solid var(--sfn-border);
  font-weight: bold;
}

.tbl_td {
  padding: 12px;
  border: 1px solid var(--sfn-border);
}

/* ==========================================
   9. 모바일 반응형 - 공통 테이블 카드 스타일
   ========================================== */

@media (max-width: 768px) {
  /* 공통 테이블 → 카드 변환 */
  #taskListTable,
  #occasionalTaskTable,
  #signListTable,
  #lineTable table {
    font-size: 1rem;
  }

  #taskListTable thead,
  #occasionalTaskTable thead,
  #signListTable thead,
  #lineTable table thead {
    display: none !important;
  }

  #taskListTable,
  #taskListTable tbody,
  #taskListTable tr,
  #taskListTable td,
  #occasionalTaskTable,
  #occasionalTaskTable tbody,
  #occasionalTaskTable tr,
  #occasionalTaskTable td,
  #signListTable,
  #signListTable tbody,
  #signListTable tr,
  #signListTable td,
  #lineTable table,
  #lineTable table tbody,
  #lineTable table tr,
  #lineTable table td {
    display: block;
    width: 100%;
  }

  /* 개선된 카드 스타일 */
  #taskListTable tr,
  #occasionalTaskTable tr,
  #signListTable tr,
  #lineTable table tr {
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
  }

  /* taskListTable 특별 카드 레이아웃 - 강제 적용 */
  .table-responsive #taskListTable tr {
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }

  /* 번호는 숨기고 제목에 번호를 포함 */
  .table-responsive #taskListTable .postNum {
    display: none !important;
  }

  /* 제목 영역 - 카드 헤더 */
  .table-responsive #taskListTable .title {
    padding: 16px 16px 8px 16px !important;
    margin-bottom: 16px !important;
    position: relative !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #252525 !important;
    background: white !important;
    border: none !important;
    text-align: left !important;
  }

  .table-responsive #taskListTable .title:before {
    content: "" !important;
    display: none !important;
  }

  .table-responsive #taskListTable .title a {
    color: #252525 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
  }

  /* 회색 점선 구분선 */
  .table-responsive #taskListTable .title:after {
    content: "" !important;
    display: block !important;
    width: calc(100% - 32px) !important;
    height: 1px !important;
    background: repeating-linear-gradient(
      to right,
      #d0d0d0 0px,
      #d0d0d0 4px,
      transparent 4px,
      transparent 8px
    ) !important;
    position: absolute !important;
    bottom: 0px !important;
    left: 16px !important;
  }

  /* 정보 영역 스타일링 */
  .table-responsive #taskListTable .category,
  .table-responsive #taskListTable .subcategory,
  .table-responsive #taskListTable .frequency,
  .table-responsive #taskListTable .period {
    padding: 8px 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border: none !important;
    margin: 0 !important;
    min-height: 40px !important;
    background: white !important;
    text-align: left !important;
  }

  .table-responsive #taskListTable .category:before,
  .table-responsive #taskListTable .subcategory:before,
  .table-responsive #taskListTable .frequency:before,
  .table-responsive #taskListTable .period:before {
    position: static !important;
    width: auto !important;
    padding: 0 !important;
    font-size: 15px !important;
    color: #545454 !important;
    font-weight: 500 !important;
    flex-shrink: 0 !important;
  }

  .table-responsive #taskListTable .category:before {
    content: "대분류" !important;
  }
  .table-responsive #taskListTable .subcategory:before {
    content: "중분류" !important;
  }
  .table-responsive #taskListTable .frequency:before {
    content: "주기유형" !important;
  }
  .table-responsive #taskListTable .period:before {
    content: "주기" !important;
  }

  /* 상태와 관리 버튼 영역 */
  .table-responsive #taskListTable .status,
  .table-responsive #taskListTable .action {
    padding: 12px 16px !important;
    background: #f8f9fa !important;
    margin: 0 !important;
    text-align: center !important;
    border: none !important;
  }

  .table-responsive #taskListTable .status {
    border-bottom: 1px solid #e9ecef !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .table-responsive #taskListTable .status:before,
  .table-responsive #taskListTable .action:before {
    content: "" !important;
    display: none !important;
  }

  /* 상태 배지 스타일 - 문서 ##5 업무 상태 태그 색상표 적용 */
  .table-responsive #taskListTable .status .badge {
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 15px !important;
    border: none !important;
  }

  /* 관리 버튼 스타일링 - PC와 동일한 색상 적용 (색상 오버라이드 제거) */
  .table-responsive #taskListTable .action .btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    font-size: 15px !important;
  }

  /* 기존 다른 테이블들 스타일 유지 */
  #occasionalTaskTable td,
  #signListTable td,
  #lineTable table td {
    border: none;
    padding: 0.25rem 0;
    text-align: left !important;
    position: relative;
  }

  #occasionalTaskTable td {
    padding-left: 40% !important;
  }

  #signListTable td {
    padding-left: 45% !important;
  }

  #lineTable table td {
    padding-left: 50% !important;
  }

  #occasionalTaskTable td:before,
  #signListTable td:before,
  #lineTable table td:before {
    position: absolute;
    left: 6px;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
    content: attr(data-label) ": ";
  }

  #lineTable table td:before {
    width: 45%;
  }

  #occasionalTaskTable td:before {
    width: 35%;
  }

  #signListTable td:before {
    width: 40%;
  }

  /* ==========================================
     TBM/교육 목록 테이블 모바일 반응형 스타일
     ========================================== */
  #tbmListTable,
  #tbmScheduleTable,
  #eduExecTable,
  #eduPlanTable {
    font-size: 1rem;
  }

  #tbmListTable thead,
  #tbmScheduleTable thead,
  #eduExecTable thead,
  #eduPlanTable thead {
    display: none !important;
  }

  #tbmListTable tbody,
  #tbmScheduleTable tbody,
  #eduExecTable tbody,
  #eduPlanTable tbody {
    display: block;
  }

  #tbmListTable tr,
  #tbmScheduleTable tr,
  #eduExecTable tr,
  #eduPlanTable tr {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  #tbmListTable td,
  #tbmScheduleTable td,
  #eduExecTable td,
  #eduPlanTable td {
    display: block;
    border: none;
    padding: 0.5rem 0.75rem;
    text-align: right !important;
    position: relative;
    padding-left: 40% !important;
    border-bottom: 1px solid #f0f0f0;
  }

  #tbmListTable td:last-child,
  #tbmScheduleTable td:last-child,
  #eduExecTable td:last-child,
  #eduPlanTable td:last-child {
    border-bottom: none;
  }

  #tbmListTable td:before,
  #tbmScheduleTable td:before,
  #eduExecTable td:before,
  #eduPlanTable td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0.75rem;
    width: 35%;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  /* 관리 버튼 셀 스타일 */
  #tbmListTable td:last-child .btn,
  #tbmScheduleTable td:last-child .btn,
  #eduExecTable td:last-child .btn,
  #eduPlanTable td:last-child .btn {
    font-size: 0.875rem;
    padding: 6px 12px;
  }

  /* signListTable 추가 스타일 */
  #signListTable td:last-child {
    padding-bottom: 0.5rem;
  }
  /* signListTable 추가 스타일 */
  #signListTable td:last-child {
    padding-bottom: 0.5rem;
  }

  #signListTable td:last-child .btn {
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.25rem;
  }

  /* 공통 모달 테이블 스타일 */
  #detailInfoTable,
  #signInfoTable {
    font-size: 1rem;
    border: none;
  }

  #detailInfoTable tr,
  #signInfoTable tr {
    display: flex;
    flex-direction: column;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.75rem 0;
    margin: 0;
  }

  #detailInfoTable tr:last-child,
  #signInfoTable tr:last-child {
    border-bottom: none;
  }

  #detailInfoTable th,
  #signInfoTable th {
    display: block;
    width: 100%;
    font-weight: 600;
    color: var(--bs-primary);
    background-color: transparent;
    border: none;
    padding: 0 0 0.25rem 0;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #detailInfoTable td,
  #signInfoTable td {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background-color: white;
    border-radius: 0.375rem;
    color: var(--bs-dark);
    border: 1px solid #f0f0f0;
  }
}

/* ==========================================
   10. 모바일 반응형 - 공통 모달
   ========================================== */

@media (max-width: 768px) {
  .modal-dialog.modal-lg {
    max-width: 95%;
    margin: 0.5rem;
  }

  /* 공통 모달 스크롤 제한 */
  #occasionalTaskModal .modal-dialog,
  #taskDetailModal .modal-dialog,
  #detailModal .modal-dialog {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: 0.5rem auto;
  }

  #occasionalTaskModal .modal-content,
  #taskDetailModal .modal-content,
  #detailModal .modal-content {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    display: flex;
    flex-direction: column;
  }

  #occasionalTaskModal .modal-body,
  #taskDetailModal .modal-body,
  #detailModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
  }

  /* 상시업무 모달 특수 처리 */
  #occasionalTaskModal .table-responsive {
    overflow-y: visible;
  }

  /* 상세보기 모달 개선 */
  #detailModal .modal-dialog {
    margin: 1rem auto;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
  }

  #detailModal .modal-content {
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }

  #detailModal .modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    background-color: white;
    border-radius: 0.5rem 0.5rem 0 0;
  }

  #detailModal .modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
  }

  #detailModal .modal-footer {
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    background-color: white;
    border-radius: 0 0 0.5rem 0.5rem;
  }

  #detailModal .mb-3 h6 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bs-primary);
    display: inline-block;
  }

  #detailSignatureDiv .border {
    background-color: white;
    border: 1px solid var(--bs-border-color) !important;
  }

  #detailSignatureImage {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }
}

/* ==========================================
   11. 모바일 반응형 - 파일 업로드
   ========================================== */

@media (max-width: 768px) {
  .uploaded-file-item {
    flex-direction: column;
    align-items: stretch;
  }

  .uploaded-file-info {
    margin-bottom: 12px;
  }

  .uploaded-file-actions {
    margin-left: 0;
    justify-content: flex-end;
  }

  .uploaded-file-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 576px) {
  .uploaded-file-actions {
    flex-direction: column;
    gap: 4px;
  }

  .uploaded-file-actions .btn {
    font-size: 15px;
    padding: 4px 8px;
  }
}

/* ==========================================
   12. 모바일 반응형 - 페이징 (1줄 유지)
   @modified 2025-12-05 - 모바일에서 2줄 표시 문제 해결
   ========================================== */

@media (max-width: 768px) {
  .pagination {
    flex-wrap: nowrap !important;
    gap: 2px;
    justify-content: center;
  }

  .pagination .page-item {
    margin: 0;
  }

  .pagination .page-link {
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 첫/마지막/이전/다음 버튼 아이콘 크기 조정 */
  .pagination .page-item.first .page-link,
  .pagination .page-item.last .page-link,
  .pagination .page-item.prev .page-link,
  .pagination .page-item.next .page-link {
    padding: 0.5rem;
  }

  /* 아이콘 크기 */
  .pagination .page-link i {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .pagination .page-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    min-width: 32px;
    min-height: 32px;
  }
}

/* ==========================================
   13. 모바일 반응형 - 검색 폼
   ========================================== */

@media (max-width: 768px) {
  .card-body form .col-md-3,
  .card-body form .col-md-6 {
    margin-bottom: 5px;
    margin-top: 5px;
  }

  .card-body form button {
    /* width: 48%; */
    display: inline-block;
  }
}

/* ==========================================
   14. 모바일 반응형 - 구독 페이지
   ========================================== */

@media (max-width: 768px) {
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .page-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start !important;
  }

  .page-actions .btn {
    flex: 1;
    max-width: 150px;
  }

  .subscription-list-item .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .subscription-meta {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .subscription-actions {
    margin-top: 1rem;
    width: 100%;
    min-width: auto;
  }

  .subscription-actions .btn {
    margin: 0.25rem 0;
    width: 100%;
  }

  .subscription-meta > div {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==========================================
   15. 모바일 반응형 - 제품 갤러리
   ========================================== */

@media (max-width: 1200px) {
  .galleryBox .galleryItem {
    width: calc(33.333% - 0.75rem);
  }
}

@media (max-width: 768px) {
  .galleryBox .galleryItem {
    width: calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .galleryBox .galleryItem {
    width: 100%;
  }

  .modal-dialog.modal-lg {
    max-width: 100%;
    margin: 0;
  }

  #detailModal .modal-dialog {
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
  }

  #detailModal .modal-content {
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* ==========================================
   16. 환불 요청 페이지 전용 스타일
   ========================================== */

.refund-card {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.refund-policy {
  background-color: var(--bs-warning-bg-subtle);
  border: 1px solid var(--bs-warning-border-subtle);
  color: var(--bs-warning-text-emphasis);
}

.refund-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bs-success);
}

.calculation-detail {
  background-color: var(--bs-light);
  border: 1px solid var(--bs-border-color);
}

/* ==========================================
   17. 모달 Cascade (중첩 모달) 스타일
   - 정보입력용 모달 크기 통일
   - 중첩 시 백드랍 처리 (ModalCascadeManager에서 관리)
   ========================================== */

/* 정보입력 모달 (openActionModal) - 크기 통일 */
.modal-type-action .modal-dialog {
  max-width: 800px;
}

.modal-type-action .modal-body {
  max-height: calc(100vh - 200px);
  max-height: calc(100dvh - 200px);
  overflow-y: auto;
}

/* 액션 모달 헤더 — 타이틀 좌측, X 버튼 우측 */
.modal-type-action .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 액션 모달 X 닫기 버튼 — 전역 기본 스타일 */
.modal-type-action .modal-header .modal-close-btn-mobile {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--sfn-neutral-500);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-type-action .modal-header .modal-close-btn-mobile:hover {
  color: var(--sfn-text);
}

/* 알림 모달 (customAlert) - 작고 중앙 정렬 */
.modal-type-alert .modal-dialog {
  max-width: 400px;
}

.modal-type-alert .modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-type-alert .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

.modal-type-alert .modal-body {
  text-align: center;
  padding: 1.5rem;
}

.modal-type-alert .modal-footer {
  border-top: none;
  justify-content: center;
  padding-top: 0;
}

/* 중첩 모달용 추가 백드랍 - ModalCascadeManager에서 생성 */
.cascade-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

/* 반응형 - 모바일에서 모달 크기 조정 */
@media (max-width: 768px) {
  .modal-type-action .modal-dialog {
    max-width: 95%;
    width: 95%;
    margin: 0.5rem auto;
  }

  .modal-type-alert .modal-dialog {
    max-width: 90%;
    margin: auto;
  }
}

/* ==========================================
   공지사항 상세 페이지 - 모바일 헤더 스타일
   ========================================== */
@media (max-width: 768px) {
  /* 제목과 버튼 높이 맞춤 */
  #step1 .card-header .d-flex.justify-content-between {
    align-items: flex-start;
    gap: 0.5rem;
  }

  #step1 .card-header .card-title {
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
    word-break: keep-all;
  }

  #step1 .card-header .d-flex.gap-2 {
    flex-shrink: 0;
  }

  #step1 .card-header .btn-sm {
    padding-block: 0;
    font-size: 0.75rem;
  }
}

/* ==========================================
   의견청취 상세 - 상태 변경 이력 테이블 모바일 반응형
   ========================================== */
@media (max-width: 768px) {
  #opinionStatusLogTable thead {
    display: none;
  }

  #opinionStatusLogTable tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
  }

  #opinionStatusLogTable tbody td {
    display: block;
    text-align: right !important;
    position: relative;
    padding-left: 40% !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border: none;
    border-bottom: 1px solid #f0f0f0;
  }

  #opinionStatusLogTable tbody td:last-child {
    border-bottom: none;
  }

  #opinionStatusLogTable tbody td:before {
    content: attr(data-label);
    position: absolute;
    left: 0.75rem;
    width: 35%;
    text-align: left;
    font-weight: 600;
    color: #566a7f;
  }
}

/* ==========================================
   18. 퍼블리셔 공통 컴포넌트 (Flag 01~12)
   @added 2026-03-09
   ========================================== */

/* --- Flag-01: 페이지 정보 배너 카드 --- */
.sfn-info-banner {
  background-color: var(--sfn-blue-100);
  border: 1px solid var(--sfn-blue-300);
  box-shadow: none;
}

/* --- Flag-02: 배너 내 제목 아이콘/텍스트 --- */
.sfn-info-title {
  font-size: 18px;
  color: var(--sfn-blue-900);
}

.sfn-info-title i {
  margin-top: 2px;
  color: var(--sfn-blue-900);
}

.sfn-info-desc {
  color: var(--sfn-text);
  line-height: 1.3;
}

/* --- Flag-05: 전역 border-radius 8px --- */
.container-xxl .btn {
  border-radius: 8px;
}

.container-xxl .form-control,
.container-xxl .form-select {
  border-radius: 8px;
}

.container-xxl .input-group .form-control {
  border-radius: 8px 0 0 8px;
}

.container-xxl .input-group .btn {
  border-radius: 0 8px 8px 0;
}

/* --- Flag-04: 검색 입력 그룹 --- */
.search-input-group .form-control {
  border-radius: 8px;
}

.search-input-group .btn {
  border-radius: 8px;
}

/* --- Flag-06: 보조 버튼 (등록/생성) --- */
.sfn-btn-outline {
  background: var(--sfn-bg-card);
  border: 1px solid var(--sfn-border);
  color: var(--sfn-text);
  border-radius: 8px;
}

.sfn-btn-outline:hover {
  background: var(--sfn-bg-subtle);
  border-color: var(--sfn-neutral-300);
  color: var(--sfn-text);
}

/* --- Flag-07: 가이드 버튼 --- */
.sfn-btn-guide {
  background-color: var(--sfn-blue-600);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 6px;
}

.sfn-btn-guide:hover {
  background-color: var(--sfn-blue-700);
  color: var(--sfn-text-on-primary);
}

/* --- Flag-08: 모달 스타일링 --- */
.sfn-modal-content {
  border-radius: 16px;
  overflow: hidden;
}

.sfn-modal-content .modal-header {
  border-bottom: 1px solid var(--sfn-border);
}

.sfn-modal-content .modal-footer {
  justify-content: center;
  gap: 8px;
}

.sfn-modal-close {
  background: var(--sfn-text);
  color: var(--sfn-text-on-primary);
  border: none;
  min-width: 120px;
  border-radius: 8px;
  margin: 0;
}

.sfn-modal-close:hover {
  background: var(--sfn-text-dark);
  color: var(--sfn-text-on-primary);
}

.sfn-modal-action {
  background: var(--sfn-primary);
  color: var(--sfn-text-on-primary);
  border: none;
  min-width: 120px;
  border-radius: 8px;
  margin: 0;
}

.sfn-modal-action:hover {
  background: var(--sfn-primary-hover);
  color: var(--sfn-text-on-primary);
}

/* --- Flag-09: 페이지네이션 색상 표준화 --- */
.container-xxl nav .page-link {
  color: var(--sfn-text);
}

.container-xxl nav .page-item.active .page-link {
  background-color: var(--sfn-text);
  border-color: var(--sfn-text);
  color: var(--sfn-text-on-primary);
}

.container-xxl nav .page-item.active .page-link:hover {
  background-color: var(--sfn-text-dark);
  border-color: var(--sfn-text-dark);
  color: var(--sfn-text-on-primary);
}

/* --- Flag-10: 아이콘 색상 --- */
.sfn-icon-primary {
  color: var(--sfn-primary);
}

.sfn-icon-danger {
  color: var(--sfn-danger);
}

/* --- Flag-11: 삭제 버튼 --- */
.sfn-btn-danger-outline {
  background: var(--sfn-bg-card);
  border: 1px solid var(--sfn-border);
  color: var(--sfn-danger);
  border-radius: 8px;
}

.sfn-btn-danger-outline:hover {
  background: var(--sfn-danger-subtle);
  border-color: var(--sfn-danger);
  color: var(--sfn-danger);
}

/* --- Flag-12: 알림/안내 박스 --- */
.sfn-info-box {
  background: var(--sfn-bg-card);
  border: 1px solid var(--sfn-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--sfn-text);
}

/* ==========================================
   19. 인라인 스타일 제거용 유틸리티 클래스
   @added 2026-03-10
   ========================================== */

/* --- cursor --- */
.cursor-pointer { cursor: pointer; }
.cursor-help { cursor: help; }
.cursor-default { cursor: default; }

/* --- flex --- */
.flex-shrink-0 { flex-shrink: 0; }

/* --- 검색 입력필드 내 X 클리어 버튼 --- */
.sfn-search-clear {
  display: none;
  border: none;
  background: transparent;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  z-index: 10;
}

.sfn-search-clear i {
  font-size: 20px;
  color: #6c757d;
  color: oklch(55% 0.01 250);
}

/* --- 강조바 (제목 앞 컬러 바) --- */
.sfn-accent-bar {
  width: 4px;
  height: 24px;
  background-color: #696cff;
  background-color: oklch(56% 0.23 285);
  border-radius: 2px;
  margin-right: 10px;
  flex-shrink: 0;
}

.sfn-accent-bar.sm {
  height: 20px;
}

/* --- 테이블 컬럼 너비 유틸리티 --- */
.col-w-4  { width: 4%; }
.col-w-5  { width: 5%; }
.col-w-6  { width: 6%; }
.col-w-7  { width: 7%; }
.col-w-8  { width: 8%; }
.col-w-9  { width: 9%; }
.col-w-10 { width: 10%; }
.col-w-11 { width: 11%; }
.col-w-12 { width: 12%; }
.col-w-13 { width: 13%; }
.col-w-15 { width: 15%; }
.col-w-18 { width: 18%; }
.col-w-20 { width: 20%; }
.col-w-22 { width: 22%; }
.col-w-25 { width: 25%; }
.col-w-30 { width: 30%; }
.col-w-33 { width: 33%; }
.col-w-35 { width: 35%; }
.col-w-40 { width: 40%; }
.col-w-45 { width: 45%; }
.col-w-50 { width: 50%; }
.col-w-75 { width: 75%; }
.col-w-80 { width: 80%; }

/* --- th/td 고정 너비 (px) --- */
.th-w-30  { width: 30px; }
.th-w-40  { width: 40px; }
.th-w-50  { width: 50px; }
.th-w-60  { width: 60px; }
.th-w-80  { width: 80px; }
.th-w-90  { width: 90px; }
.th-w-100 { width: 100px; }
.th-w-120 { width: 120px; }
.th-w-150 { width: 150px; }
.th-w-160 { width: 160px; }
.th-w-200 { width: 200px; }
.th-w-400 { width: 400px; }

/* --- min-width 유틸리티 --- */
.min-w-20  { min-width: 20px; }
.min-w-38  { min-width: 38px; }
.min-w-44  { min-width: 44px; }
.min-w-50  { min-width: 50px; }
.min-w-52  { min-width: 52px; }
.min-w-60  { min-width: 60px; }
.min-w-70  { min-width: 70px; }
.min-w-80  { min-width: 80px; }
.min-w-100 { min-width: 100px; }
.min-w-110 { min-width: 110px; }
.min-w-120 { min-width: 120px; }
.min-w-130 { min-width: 130px; }
.min-w-140 { min-width: 140px; }
.min-w-150 { min-width: 150px; }
.min-w-160 { min-width: 160px; }
.min-w-180 { min-width: 180px; }
.min-w-200 { min-width: 200px; }
.min-w-280 { min-width: 280px; }
.min-w-576 { min-width: 576px; }

/* --- resize --- */
.resize-none { resize: none; }

/* --- max-width 유틸리티 --- */
.mw-120 { max-width: 120px; }
.mw-140 { max-width: 140px; }

/* --- 비활성 상태 --- */
.sfn-disabled-state {
  background-color: rgb(235 235 235) !important;
  color: #979797;
  color: oklch(66% 0 0);
}

/* --- 제한 폭 컨테이너 --- */
.sfn-container-sm { max-width: 500px; }
.sfn-mw-480 { max-width: 480px; }

/* --- height 유틸리티 --- */
.sfn-h-35 { height: 35px; }
.sfn-h-40 { height: 40px; }

/* --- table-layout --- */
.table-layout-fixed { table-layout: fixed; }

/* --- white-space --- */
.white-space-pre-wrap { white-space: pre-wrap; }

/* --- 추가 height 유틸리티 --- */
.sfn-h-60 { height: 60px; }

/* --- scrollable 유틸리티 --- */
.scrollable-sm { max-height: 150px; overflow-y: auto; }
.scrollable-md { max-height: 350px; overflow-y: auto; }
.scrollable-lg { max-height: 500px; overflow-y: auto; }

/* --- min-width 0 (flex overflow 방지) --- */
.min-w-0 { min-width: 0; }

/* --- 검색 입력 우측 패딩 (클리어 버튼 공간 확보) --- */
.sfn-search-input { padding-right: 35px; }

/* --- 검색 필터 flex 아이템 (반응형 폼 필터 영역) --- */
.sfn-filter-item { flex: 1 1 auto; min-width: 130px; }
.sfn-filter-item-wide { flex: 2 1 auto; min-width: 150px; }

/* --- 인라인 경고 하단 간격 축소 --- */
.sfn-alert-compact { margin-bottom: 0.5rem; }

/* --- 지도 컨테이너 --- */
.sfn-map-container {
  width: 100%;
  height: 500px;
  border-radius: 0.5rem;
}

/* --- 콘텐츠 표시 영역 --- */
.sfn-content-display {
  min-height: 100px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.sfn-content-display-lg {
  white-space: pre-wrap;
  min-height: 150px;
}

/* --- 가격 강조 텍스트 --- */
.sfn-price-highlight {
  font-size: 1.3em;
  font-weight: bold;
}

/* --- 날짜구분 세퍼레이터 높이 맞춤 --- */
.sfn-separator-height {
  height: calc(1.5em + 0.75rem + 2px);
}

/* --- 테이블 헤더 구분선 + 세로정렬 --- */
.sfn-th-bordered {
  border-right: 1px solid var(--bs-gray-200);
  vertical-align: middle;
}

/* --- 페이지 제목 (공개 페이지용) --- */
.sfn-page-title {
  font-size: 24px;
  font-weight: bold;
}

/* --- 트리 스크롤 영역 --- */
.sfn-tree-scroll { max-height: 50%; }

/* --- 입력 그룹 가운데 정렬 (max-width 300px) --- */
.sfn-input-centered {
  max-width: 300px;
  margin: 0 auto;
}

/* --- TOC 사이드바 (고정 위치) --- */
.sfn-toc-sidebar {
  top: 80px;
  right: 20px;
  max-width: 250px;
}

/* --- word-break 유틸리티 --- */
.word-break-all { word-break: break-all; }

/* --- readonly 입력 필드 (비활성 배경 + 채움 색상) --- */
.sfn-input-readonly {
  background-color: #f8f9fa;
  background-color: oklch(97% 0.005 250);
  color: #697a8d;
  color: oklch(57% 0.02 250);
  -webkit-text-fill-color: #697a8d;
  -webkit-text-fill-color: oklch(57% 0.02 250);
  opacity: 1;
}

/* --- 이미지 썸네일 (60x60 정사각, object-fit cover) --- */
.sfn-img-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 8px;
}

/* --- 더보기 버튼 (border-less, 투명 배경) --- */
.sfn-btn-more {
  border: none;
  background: none;
  padding: 0;
  color: #6c757d;
  color: oklch(55% 0.01 250);
}

/* --- 아이콘 특대 (64px, 빈 상태 안내 등) --- */
.sfn-icon-xxl {
  font-size: 64px;
  color: #6c757d;
  color: oklch(55% 0.01 250);
}

/* --- 서명 이미지 (반응형 + 최대 높이 제한) --- */
.sfn-signature-img {
  max-width: 100%;
  max-height: 150px;
  border: 1px solid #ddd;
  border: 1px solid oklch(87% 0.005 250);
}

/* --- 모달 이미지 (반응형, 높이 자동) --- */
.sfn-modal-img {
  width: 100%;
  height: auto;
}

/* --- 조직도/목록 스크롤 컨테이너 --- */
.sfn-tree-container {
  border: 1px solid #ddd;
  border: 1px solid oklch(87% 0.005 250);
  padding: 10px;
  height: 400px;
  overflow-y: auto;
}

/* --- 모달 타이틀 강조 (Primary 색상) --- */
.sfn-modal-title-primary {
  color: #696cff;
  color: oklch(56% 0.23 285);
  font-weight: 700;
}

/* --- 지도 컨테이너 (높이 600px) --- */
.sfn-map-container-lg {
  width: 100%;
  height: 600px;
}

/* --- 마커 목록 스크롤 --- */
.sfn-marker-list-scroll {
  max-height: 550px;
  overflow-y: auto;
}

/* --- 네비게이션 로고 (모바일) --- */
.sfn-nav-logo-mobile {
  max-height: 30px;
}

/* --- 인라인 액션 버튼 컨테이너 --- */
.sfn-inline-actions {
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

/* --- 소형 액션 버튼 (테이블 내 순서변경/삭제 등) --- */
.sfn-btn-action-xs {
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.2;
}

/* --- 강사 정보 패널 --- */
.sfn-instructor-info {
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  background-color: oklch(97% 0.005 250);
  border-radius: 4px;
}

/* --- 조직도 노드 링크 --- */
.sfn-org-node {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: #333;
  color: oklch(30% 0.01 250);
  border-radius: 4px;
}
