/* ========================================
   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);
}

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

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

.sfn-badge-sub-status.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);
}

.sfn-badge-product-type {
  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-secondary-3);
  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 var(--sfn-border);
    border-radius: 18px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--sfn-bg-card);
    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 var(--sfn-border) !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
    background: var(--sfn-bg-card) !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: var(--sfn-text) !important;
    background: var(--sfn-bg-card) !important;
    border: none !important;
    text-align: left !important;
  }

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

  .table-responsive #taskListTable .title a {
    color: var(--sfn-text) !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: var(--sfn-bg-card) !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: var(--sfn-bg-subtle) !important;
    margin: 0 !important;
    text-align: center !important;
    border: none !important;
  }

  .table-responsive #taskListTable .status {
    border-bottom: 1px solid var(--sfn-border-light) !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: var(--sfn-text-muted);
    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 var(--sfn-border);
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--sfn-bg-card);
    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 var(--sfn-border-light);
  }

  #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: var(--sfn-text-muted);
    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 var(--sfn-border-light);
    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: var(--sfn-bg-card);
    border-radius: 0.375rem;
    color: var(--bs-dark);
    border: 1px solid var(--sfn-border-light);
  }
}

/* ==========================================
   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: var(--sfn-bg-card);
    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: var(--sfn-bg-card);
    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: var(--sfn-bg-card);
    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;
}

/* 확인 모달 (showCancel: true) - 취소/확인 버튼 전용 */
.modal-type-alert.sfn-confirm-modal .modal-dialog {
  max-width: 440px;
}

.modal-type-alert.sfn-confirm-modal .modal-content {
  height: 240px;
  display: flex;
  flex-direction: column;
}

.modal-type-alert.sfn-confirm-modal .modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 8px !important;
}

.sfn-confirm-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sfn-confirm-icon-wrap i {
  font-size: 30px;
  color: #1a1a1a;
}

.sfn-confirm-content {
  font-size: 16px;
  line-height: 1.6;
}

.modal-type-alert.sfn-confirm-modal .modal-footer {
  padding: 0 24px 20px !important;
  border: none !important;
  margin-top: 0 !important;
}

.sfn-confirm-cancel-btn {
  width: 120px !important;
  height: 40px !important;
  background: #333333;
  color: #ffffff;
  border: none;
  border-radius: 8px;
}

.sfn-confirm-cancel-btn:hover {
  background: #555555 !important;
  color: #ffffff !important;
}

.sfn-confirm-btn {
  width: 120px !important;
  height: 40px !important;
  background: var(--sfn-action);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 8px;
}

.sfn-confirm-btn:hover {
  background: var(--sfn-action-hover) !important;
  color: var(--sfn-text-on-primary) !important;
}

.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;
}

/* 알림 모달 아이콘 */
.modal-type-alert .sfn-alert-modal-icon,
.modal-type-result .sfn-alert-modal-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}

/* 결과 안내 모달 (결재완료 등) - alert와 동일하나 너비 제한 없음 */
.modal-type-result .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

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

/* 결과 메시지 - 아이콘 + 텍스트 인라인 배치 */
.sfn-result-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.15rem;

  .bx {
    font-size: 1.6rem;
    flex-shrink: 0;
  }
}

.modal-type-result .modal-body {
  padding-bottom: 0.5rem;
}

.modal-type-result .modal-footer {
  border-top: none;
  justify-content: center;
  padding-top: 0.5rem;
}

/* 중첩 모달용 추가 백드랍 - 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 var(--sfn-border-light);
    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 var(--sfn-border-light);
  }

  #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: var(--sfn-text);
  }
}

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

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

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

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

.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 .form-control:focus,
.container-xxl .form-select:focus,
.modal .form-control:focus,
.modal .form-select:focus {
  border-color: var(--sfn-action);
  box-shadow: 0 0 0 0.2rem rgba(0, 100, 220, 0.15);
}

.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 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input-group .form-control {
  border-radius: 8px;
  height: 44px !important;
}

.search-input-group .btn {
  border-radius: 8px;
  height: 44px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.search-input-group .form-select,
.search-input-group .sfn-custom-select-btn {
  height: 44px !important;
  width: auto;
}

/* --- Flag-04b: 커스텀 셀렉트 드롭다운 (전역) --- */
.sfn-custom-select {
  position: relative;
  display: inline-block;
}

.sfn-custom-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--sfn-border);
  border-radius: 8px;
  background: var(--sfn-bg-card);
  color: var(--sfn-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  height: 38px;
  width: 100%;
}

/* 너비 클래스가 있는 경우 wrapper가 크기 결정, 없으면 기본 min-width */
.sfn-custom-select:not(.mw-120):not(.mw-140):not(.mw-160):not(.mw-200) {
  min-width: 120px;
}
.sfn-custom-select.mw-120 { width: 120px; max-width: 120px; }
.sfn-custom-select.mw-140 { width: 140px; max-width: 140px; }
.sfn-custom-select.w-100 { width: 100%; }

.sfn-custom-select-btn:hover {
  background: var(--sfn-bg-subtle);
}

.sfn-custom-select-btn span {
  flex: 1;
  text-align: left;
}

.sfn-custom-select-btn i {
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.sfn-custom-select.open .sfn-custom-select-btn i {
  transform: rotate(180deg);
}

.sfn-custom-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  min-width: 100%;
  background: var(--sfn-bg-card);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--sfn-border);
  padding: 4px;
  flex-direction: column;
  gap: 2px;
}

.sfn-custom-select.open .sfn-custom-select-menu {
  display: flex;
}

.sfn-custom-select-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--sfn-text-muted);
  transition: all 0.15s;
}

.sfn-custom-select-item:hover {
  background: var(--sfn-bg-subtle);
}

.sfn-custom-select-item.active {
  background: rgba(0, 100, 220, 0.08);
  color: var(--sfn-action);
  font-weight: 600;
}

/* --- Flag-06: 보조 버튼 (등록/생성) --- */
.sfn-btn-outline {
  background: var(--sfn-bg-card);
  border: 1px solid var(--sfn-border) !important;
  color: var(--sfn-text);
  border-radius: 8px;
  height: 48px !important;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.15s ease-in-out;
  font-size: 1rem !important;
}

/* 아이콘 크기 고정: btn-sm/btn 혼재 시 통일 */
.sfn-btn-outline i[class*="bx"] {
  font-size: 1rem !important;
  line-height: 1;
  flex-shrink: 0;
}

.sfn-btn-outline:hover, 
.sfn-btn-outline:focus, 
.sfn-btn-outline:active,
.sfn-btn-outline.active,
.show > .sfn-btn-outline.dropdown-toggle {
  background: var(--sfn-bg-subtle) !important;
  border-color: var(--sfn-neutral-300) !important;
  color: var(--sfn-text) !important;
  box-shadow: none !important;
}

/* --- Flag-06a: 페이지 버튼 – 의미 기반 시맨틱 클래스 ---
 * sfn-btn-outline과 동일한 베이스, 각 용도별 독립 커스터마이징 가능
 * 목록으로: sfn-btn-list / 신규등록: sfn-btn-add / 검색: sfn-btn-search
 * 저장·수정: sfn-btn-save / 페이지 삭제: sfn-btn-page-delete
 */
.sfn-btn-list,
.sfn-btn-add,
.sfn-btn-search,
.sfn-btn-save,
.sfn-btn-page-delete {
  background: var(--sfn-bg-card);
  border: 1px solid var(--sfn-border) !important;
  color: var(--sfn-text);
  border-radius: 8px;
  height: 48px !important;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.15s ease-in-out;
  font-size: 1rem !important;
}

.sfn-btn-list i[class*="bx"],
.sfn-btn-add i[class*="bx"],
.sfn-btn-search i[class*="bx"],
.sfn-btn-save i[class*="bx"],
.sfn-btn-page-delete i[class*="bx"] {
  font-size: 1rem !important;
  line-height: 1;
  flex-shrink: 0;
}

.sfn-btn-list:hover, .sfn-btn-list:focus, .sfn-btn-list:active,
.sfn-btn-add:hover, .sfn-btn-add:focus, .sfn-btn-add:active,
.sfn-btn-search:hover, .sfn-btn-search:focus, .sfn-btn-search:active,
.sfn-btn-page-delete:hover, .sfn-btn-page-delete:focus, .sfn-btn-page-delete:active {
  background: var(--sfn-bg-subtle) !important;
  border-color: var(--sfn-neutral-300) !important;
  color: var(--sfn-text) !important;
  box-shadow: none !important;
}

/* 저장 버튼 — 파란색 배경 강조 스타일 */
.sfn-btn-save {
  background: var(--sfn-action, #0064dc) !important;
  border-color: var(--sfn-action, #0064dc) !important;
  color: #ffffff !important;
}
.sfn-btn-save:hover, .sfn-btn-save:focus, .sfn-btn-save:active {
  background: var(--sfn-action-hover, #0055b8) !important;
  border-color: var(--sfn-action-hover, #0055b8) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
.sfn-btn-save i[class*="bx"] {
  color: #ffffff !important;
}

/* --- Flag-06b: 표 오른쪽 상단 표준 액션 버튼 --- */
.sfn-btn-table-action {
  background: var(--sfn-bg-card) !important;
  border: 1px solid var(--sfn-border) !important;
  color: var(--sfn-text) !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important; /* 아이콘과 텍스트 사이 표준 간격 */
  padding: 0 0.875rem !important; /* 좌우 패딩만 유지 */
  height: 38px !important; /* 검색 필터와 높이 통일 */
  min-height: 38px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.15s ease-in-out !important;
  box-sizing: border-box !important;
}

.sfn-btn-table-action:hover {
  background: var(--sfn-bg-subtle) !important;
  border-color: var(--sfn-neutral-300) !important;
  transform: translateY(-1px);
}

.sfn-btn-table-action i {
  color: var(--sfn-action) !important; /* 아이콘 파란색 고정 */
  font-size: 1.125rem !important;
}

/* 엑셀 다운로드 버튼 전용 (초록색 아이콘) */
.sfn-btn-excel i {
  color: #28a745 !important; /* 초록색 (엑셀 표준색) */
}

/* --- Flag-06c: 행별 관리 버튼 (톱니바퀴 드롭다운) --- */
.sfn-btn-row-action {
  height: 32px !important;
  padding: 0 8px !important; /* 화살표 공간 확보를 위한 패딩 */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important; /* 톱니바퀴와 화살표 사이 간격 */
  border-radius: 6px !important;
  background: var(--sfn-bg-card) !important;
  border: 1px solid var(--sfn-border) !important;
  color: var(--sfn-text-muted) !important; /* 기본 회색 */
  transition: all 0.15s ease-in-out !important;
}

/* Bootstrap 기본 화살표 제거 (커스텀 아이콘 사용) */
.sfn-btn-row-action.dropdown-toggle::after {
  display: none !important;
}

.sfn-btn-row-action:hover,
.sfn-btn-row-action:focus,
.show > .sfn-btn-row-action.dropdown-toggle {
  background: var(--sfn-bg-subtle) !important;
  border-color: var(--sfn-neutral-300) !important;
  color: var(--sfn-text) !important;
  box-shadow: none !important;
}

.sfn-btn-row-action i.bx-cog {
  font-size: 1.125rem !important;
  color: var(--sfn-text-muted) !important;
}

.sfn-btn-row-action:hover i.bx-cog {
  color: var(--sfn-text) !important;
}

/* 커스텀 화살표 아이콘 스타일 */
.sfn-btn-row-action i.bx-chevron-down {
  font-size: 0.875rem !important;
  color: var(--sfn-text-muted) !important;
  opacity: 0.7;
}

/* 드롭다운 메뉴 스타일 보정 */
.sfn-row-action-menu {
  padding: 4px !important;
  min-width: 100px !important;
  border: 1px solid var(--sfn-border) !important;
  box-shadow: 0 0.25rem 1rem rgba(161, 172, 184, 0.45) !important;
}

.sfn-row-action-menu .dropdown-item {
  padding: 6px 12px !important;
  border-radius: 4px !important;
  font-size: 0.875rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sfn-row-action-menu .dropdown-item i {
  font-size: 1rem !important;
}

.sfn-row-action-menu .dropdown-item.text-danger:hover {
  background-color: #fff0f0 !important;
}

/* --- Flag-08: 정보성 안내 박스 (기존 하늘색에서 회색으로 변경) --- */
.alert.alert-info,
.sfn-info-alert {
  background-color: var(--sfn-bg-subtle) !important;
  border: 1px solid var(--sfn-border-light) !important;  /* 더 연한 회색 테두리 */
  color: var(--sfn-text-muted) !important;
  border-radius: 8px !important;
}

.alert.alert-info i,
.sfn-info-alert i {
  color: var(--sfn-text-muted) !important;
}

.alert.alert-info strong,
.sfn-info-alert strong {
  color: #212529 !important;            /* 강조 텍스트는 더 짙게 */
}

/* --- Flag-07: 가이드 버튼 --- */
.sfn-btn-guide {
  background-color: var(--sfn-secondary-4);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 6px;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 3px 14px !important;
}

.sfn-btn-guide:hover {
  background-color: var(--sfn-secondary-4);
  opacity: 0.85;
  color: var(--sfn-text-on-primary);
}

/* --- Flag-07b: 가이드 박스 인라인 콜랩스 --- */
.sfn-guide-chevron {
  transition: transform 0.2s ease;
}
.sfn-btn-guide:not(.collapsed) .sfn-guide-chevron {
  transform: rotate(180deg);
}
.sfn-guide-step-box {
  background-color: var(--sfn-bg-card);
  border: 1px solid var(--sfn-border-light);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
}
.sfn-guide-step-icon {
  font-size: 1.875rem;
  color: var(--sfn-secondary-3);
  flex-shrink: 0;
}
.sfn-guide-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background-color: var(--sfn-secondary-3);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  margin-top: 1px;
  flex-shrink: 0;
}

/* --- Flag-07a: 조직도/임직원 선택 패널 공통 스타일 --- */
/* 유틸리티 */
.min-w-80 {
  min-width: 80px;
}

/* TBM 중점위험요인 체크박스 */
.critical-risk-checkbox {
  border-radius: 50% !important;
  box-shadow: none !important;
}
.critical-risk-checkbox:focus {
  box-shadow: none !important;
}

.sfn-org-panel {
  height: 300px;
  overflow-y: auto;
  border: 1px solid var(--sfn-border);
  padding: 8px;
  border-radius: 8px;
  background: var(--sfn-bg-subtle);
}

.sfn-org-node {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--sfn-text);
  border-radius: 6px;
  font-size: 0.875rem;
}

.sfn-org-node:hover {
  background: var(--sfn-bg-subtle);
  color: var(--sfn-text);
}

.sfn-org-node.active {
  background: rgba(0, 100, 220, 0.08);
  color: var(--sfn-action);
  font-weight: 500;
}

.sfn-member-panel {
  height: 300px;
  overflow-y: auto;
  border: 1px solid var(--sfn-border);
  border-radius: 8px;
  background: var(--sfn-bg-card);
}

.sfn-member-panel .list-group {
  border-radius: 8px;
  overflow: hidden;
}

.sfn-member-panel .list-group-item {
  border-left: none;
  border-right: none;
  border-radius: 0 !important;
  padding: 8px 12px;
  cursor: pointer;
}

.sfn-member-panel .list-group-item:first-child { border-top: none; }
.sfn-member-panel .list-group-item:last-child  { border-bottom: none; }

.sfn-member-panel .list-group-item-action:hover {
  background: var(--sfn-bg-subtle);
}

.sfn-badge-dept-count {
  font-size: 0.75rem;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 10px;
  vertical-align: middle;
  background: var(--sfn-action);
  color: var(--sfn-text-on-primary);
  border: none;
  font-weight: 500;
}

/* --- Flag-07b: 모달 요약 통계 (3칸 stat 박스, 모달 내 공통 사용) --- */
.rac-modal-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.rac-modal-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 8px;
  background: var(--sfn-bg-subtle);
}
.rac-modal-stat.stat-done  { background: #e8f5e9; }
.rac-modal-stat.stat-total { background: var(--sfn-bg-subtle); }
.rac-modal-stat.stat-rate  { background: rgba(0, 100, 220, 0.06); }

.rac-modal-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sfn-text);
}
.rac-modal-stat.stat-done  .rac-modal-stat-value { color: #2e7d32; }
.rac-modal-stat.stat-total .rac-modal-stat-value { color: var(--sfn-text); }
.rac-modal-stat.stat-rate  .rac-modal-stat-value { color: var(--sfn-action); }

.rac-modal-stat-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
}

.rac-modal-stat-label {
  font-size: 0.75rem;
  color: var(--sfn-text-muted);
  margin-bottom: 3px;
}

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

.sfn-modal-content .modal-header {
  border-bottom: none !important;
}

.sfn-modal-content .modal-footer {
  border-top: none !important;
  justify-content: center;
  gap: 8px;
}

.sfn-modal-content .modal-footer .btn {
  min-width: 130px;
  width: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.modal-footer .btn {
  height: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sfn-modal-close,
.btn-secondary[data-bs-dismiss="modal"],
.btn-label-secondary[data-bs-dismiss="modal"],
.sfn-btn-outline[data-bs-dismiss="modal"] {
  background: var(--sfn-modal-close-bg) !important;
  color: var(--sfn-modal-close-color) !important;
  border-color: var(--sfn-modal-close-bg) !important;
  border-radius: 8px;
  margin: 0;
  height: 48px;
}

/* 모달 버튼 최소 너비 120px — 명시도 0,2,0으로 button[type] 규칙(0,1,1) 제압 */
.modal-footer .sfn-modal-close,
.modal-footer .sfn-modal-cancel,
.modal-footer .sfn-modal-action,
.modal-footer .sfn-modal-danger,
.modal-footer .sfn-confirm-cancel-btn,
.modal-footer .sfn-confirm-btn,
.modal-body .sfn-confirm-cancel-btn,
.modal-body .sfn-confirm-btn {
  min-width: 120px !important;
}

/* 모달 footer: 닫기/취소 버튼 포함 전체 버튼 중앙 정렬 */
/* justify-content: center와 함께 동작 — margin 조작 없음 */

.sfn-modal-close:hover,
.btn-secondary[data-bs-dismiss="modal"]:hover,
.btn-label-secondary[data-bs-dismiss="modal"]:hover,
.sfn-btn-outline[data-bs-dismiss="modal"]:hover {
  background: var(--sfn-modal-close-bg-hover) !important;
  color: var(--sfn-modal-close-color) !important;
  border-color: var(--sfn-modal-close-bg-hover) !important;
}

/* 모달 취소 버튼 (sfn-modal-close와 동일 스타일, 독립 커스터마이징 가능) */
.sfn-modal-cancel {
  background: var(--sfn-modal-close-bg) !important;
  color: var(--sfn-modal-close-color) !important;
  border-color: var(--sfn-modal-close-bg) !important;
  border-radius: 8px;
  margin: 0;
  height: 48px;
}

.sfn-modal-cancel:hover {
  background: var(--sfn-modal-close-bg-hover) !important;
  color: var(--sfn-modal-close-color) !important;
  border-color: var(--sfn-modal-close-bg-hover) !important;
}

.sfn-modal-action {
  background: var(--sfn-action);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 8px;
  margin: 0;
  height: 48px !important;
  padding: 0 1.25rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 1rem !important;
}

.sfn-modal-action i[class*="bx"] {
  font-size: 1rem !important;
  line-height: 1;
  flex-shrink: 0;
}

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

.sfn-modal-action:disabled,
.sfn-modal-action.disabled {
  background: transparent;
  border: 1px solid #d0d0d0;
  color: #aaa;
  opacity: 1;
}

.btn-sm.sfn-modal-action {
  height: auto;
}

.btn-sm.sfn-btn-danger-outline {
  height: auto;
}

/* 모달 위험 액션 버튼 (삭제 확인 등) */
.sfn-modal-danger {
  background: var(--sfn-danger);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 8px;
  margin: 0;
  height: 48px;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 500;
  font-size: 1rem !important;
}

.sfn-modal-danger:hover {
  background: color-mix(in srgb, var(--sfn-danger) 85%, black);
  color: var(--sfn-text-on-primary);
}

/* 모달 섹션 박스 */
.sfn-modal-section {
  background: var(--sfn-bg-section);
  border: 1px solid var(--sfn-border-section);
  border-radius: 12px;
  padding: 20px;
}

/* --- 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);
  border-color: var(--sfn-text);
  color: var(--sfn-text-on-primary);
}

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

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

.sfn-icon-muted {
  color: var(--sfn-text-muted) !important;
}

/* --- Flag-10b: 진한 회색 버튼 (삭제 등 보조 액션) --- */
.sfn-btn-gray {
  background: var(--sfn-neutral-500);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 8px;
  height: 44px !important;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.sfn-btn-gray:hover {
  background: var(--sfn-neutral-600);
  color: var(--sfn-text-on-primary);
}

.sfn-btn-gray:disabled,
.sfn-btn-gray.disabled {
  background: var(--sfn-neutral-300);
  color: var(--sfn-neutral-500);
  opacity: 1;
}

/* --- Flag-11: 삭제 버튼 --- */
.sfn-btn-danger {
  background: var(--sfn-danger);
  color: var(--sfn-text-on-primary);
  border: none;
  border-radius: 8px;
  height: 44px !important;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.sfn-btn-danger:hover {
  background: color-mix(in srgb, var(--sfn-danger) 85%, black);
  color: var(--sfn-text-on-primary);
}

.sfn-btn-danger-outline {
  background: var(--sfn-bg-card);
  border: 1px solid var(--sfn-danger) !important;
  color: var(--sfn-danger);
  border-radius: 8px;
  height: 44px !important;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.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);
}

/* --- Flag-12b: 표 헤더 연한 회색 배경 (전역 기본값) --- */
.table > thead th,
.table > thead > tr > th {
  background-color: var(--sfn-bg-subtle);
}

[data-bs-theme="dark"] .table > thead th,
[data-bs-theme="dark"] .table > thead > tr > th {
  background-color: var(--sfn-neutral-100, #2a2c3e);
}

/* --- sfn-badge base: 모든 커스텀 뱃지 공통 속성 --- */
.sfn-badge {
  color: var(--sfn-neutral-800) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px !important;
  font-size: 15px;
  height: 28px;
  padding: 0 0.85em;
  font-weight: 500;
}

/* --- sfn-badge 시멘틱 컬러 변형 (bg-label-* 대체) --- */
/* Sneat bg-label-* 동일 패턴: tinted background + 컬러 텍스트, dot 인디케이터 없음 */
.sfn-badge-primary {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-primary)) !important;
  color: var(--bs-primary) !important;
}

.sfn-badge-secondary {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-secondary)) !important;
  color: var(--bs-secondary) !important;
}

.sfn-badge-success {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-success)) !important;
  color: var(--bs-success) !important;
}

.sfn-badge-info {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-info)) !important;
  color: var(--bs-info) !important;
}

.sfn-badge-warning {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-warning)) !important;
  color: var(--bs-warning) !important;
}

.sfn-badge-danger {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-danger)) !important;
  color: var(--bs-danger) !important;
}

.sfn-badge-dark {
  background-color: color-mix(in sRGB, var(--bs-paper-bg) var(--bs-bg-label-tint-amount), var(--bs-dark)) !important;
  color: var(--bs-dark) !important;
}

/* --- sfn-badge dot 인디케이터 모디파이어 --- */
/* sfn-badge-{color}와 조합하여 dot 표시, currentColor로 색상 자동 매칭 */
.sfn-badge-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: currentColor;
}

/* --- 결재 상태 배지 (전역 공통) --- */
/* sign.jsp, approval/log.jsp 등에서 공통 사용 */
.sfn-badge-sign-rejected,
.sfn-badge-sign-approved,
.sfn-badge-sign-progress,
.sfn-badge-sign-pending,
.sfn-badge-sign-success,
.sfn-badge-sign-primary,
.sfn-badge-sign-cancel {
  color: var(--sfn-neutral-800) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px !important;
  font-size: 15px;
  height: 28px;
  padding: 0 0.85em;
  font-weight: 500;
}

.sfn-badge-sign-rejected { background-color: #FFE5E1 !important; }
.sfn-badge-sign-rejected::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #FF5D56;
}

.sfn-badge-sign-approved { background-color: #E0EDFA !important; }
.sfn-badge-sign-approved::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #2577D1;
}

.sfn-badge-sign-primary { background-color: #E0EDFA !important; }
.sfn-badge-sign-primary::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #2577D1;
}

.sfn-badge-sign-progress { background-color: #FFF0D9 !important; }
.sfn-badge-sign-progress::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #FF8C00;
}

.sfn-badge-sign-pending { background-color: #FFF0D9 !important; }
.sfn-badge-sign-pending::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #FF8C00;
}

.sfn-badge-sign-success { background-color: #E2F5E9 !important; }
.sfn-badge-sign-success::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #28A745;
}

.sfn-badge-sign-cancel { background-color: #f1f2f4 !important; }
.sfn-badge-sign-cancel::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0; background-color: #999;
}

/* --- Flag-13: 표 데이터 없음 (Empty State) 표준화 --- */
.sfn-table-empty {
  padding: 3rem 1rem !important;
  color: var(--sfn-text-muted) !important;
  font-size: 0.9375rem !important;
  text-align: center !important;
}

/* --- Flag-14: 페이지 메인 타이틀 (대제목) 표준화 --- */
.sfn-main-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.sfn-main-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background-color: var(--sfn-action);
  border-radius: 2px;
}

.sfn-main-title h4,
.sfn-main-title h5 {
  margin-bottom: 0 !important;
  font-weight: 700 !important;
  color: var(--sfn-text) !important;
}

/* --- Flag-15: 페이지 하단 버튼 영역 표준화 --- */
.sfn-btn-group-bottom {
  display: flex;
  justify-content: flex-end; /* 오른쪽 하단 정렬 고정 */
  gap: 8px;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sfn-border-light);
}

/* 목록으로 버튼 표준 스타일 */
.sfn-btn-back {
  background: var(--sfn-bg-card) !important;
  border: 1px solid var(--sfn-border) !important;
  color: var(--sfn-text) !important;
  height: 44px !important;
  padding: 0 1.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 8px !important;
}

.sfn-btn-back i {
  font-size: 1.125rem;
}

/* ==========================================
   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: var(--sfn-text-muted);
  color: oklch(55% 0.01 250);
}

/* --- 강조바 (제목 앞 컬러 바) --- */
.sfn-accent-bar {
  width: 4px;
  height: 24px;
  background-color: var(--sfn-action);
  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; }

/* --- 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);
}

/* --- 업무 상태 뱃지 (tasks, racexec, tbm, edusafe 공통) --- */
/* dot 인디케이터 + pill 형태 + 회색 텍스트 통일 스타일 */
.sfn-badge-created,
.sfn-badge-working,
.sfn-badge-signing,
.sfn-badge-done {
  color: var(--sfn-neutral-800) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px !important;
  font-size: var(--sfn-text-md);
  padding: 0.35em 0.65em;
  font-weight: 500;
}

.sfn-badge-created { background-color: #E0F2F6 !important; }
.sfn-badge-working { background-color: #E2F7E0 !important; }
.sfn-badge-signing { background-color: #FFF0D9 !important; }
.sfn-badge-done { background-color: #E0EDFA !important; }

.sfn-badge-created::before,
.sfn-badge-working::before,
.sfn-badge-signing::before,
.sfn-badge-done::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sfn-badge-created::before { background-color: #3A9BB5; }
.sfn-badge-working::before { background-color: #2DB84B; }
.sfn-badge-signing::before { background-color: #FF8C00; }
.sfn-badge-done::before { background-color: #2577D1; }

/* --- 제한 폭 컨테이너 --- */
.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: var(--sfn-bg-subtle);
  background-color: oklch(97% 0.005 250);
  color: var(--sfn-text-muted);
  color: oklch(57% 0.02 250);
  -webkit-text-fill-color: var(--sfn-text-muted);
  -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: var(--sfn-text-muted);
  color: oklch(55% 0.01 250);
}

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

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

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

/* --- 조직도/목록 스크롤 컨테이너 --- */
.sfn-tree-container {
  border: 1px solid var(--sfn-border);
  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: var(--sfn-bg-subtle);
  background-color: oklch(97% 0.005 250);
  border-radius: 4px;
}

/* --- 좁은 컨테이너 유틸 --- */
.sfn-container-narrow {
  max-width: 868px;
  margin-inline: auto;
}

/* --- 서비스 준비 중 안내 카드 --- */
.sfn-coming-soon {
  min-height: 50vh;
}

.sfn-coming-soon .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sfn-coming-soon-icon {
  font-size: 3rem;
  color: var(--sfn-text-muted);
}

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

/* --- 프로젝트 표준 컬럼 너비 --- */
.col-w-date { width: 110px !important; text-align: center !important; }
.col-w-management { width: 70px !important; text-align: center !important; }
.col-w-status { width: 100px !important; text-align: center !important; }

/* ==========================================
   19. 유틸리티 - 정사각형 버튼
   ========================================== */
.btn-square {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  min-width: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ══════════════════════════════════════════════════════════
   Page Pattern: 안내 배너 (P-04)
   docs/hl/FRD-목록페이지-검색UI-표준화.md
   ══════════════════════════════════════════════════════════ */

.sfn-page-banner {
    background: transparent !important;
    border: none !important;
}

.sfn-page-banner .card-body {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sfn-page-banner-title {
    font-size: 24px;
    color: var(--sfn-blue-900, #1D5996);
}

.sfn-page-banner-icon {
    font-size: 24px;
    color: var(--sfn-blue-900, #1D5996);
}

/* 가이드 토글 버튼 — 살짝 둥근 사각형 */
.sfn-guide-btn {
    background: var(--sfn-neutral-200, #e9ecef) !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--sfn-neutral-700, #444) !important;
    width: 95px !important;
    padding: 2px 0 !important;
    font-size: 14px;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    line-height: 1 !important;
}

.sfn-guide-btn:hover,
.sfn-guide-btn:focus {
    background: var(--sfn-neutral-300, #dee2e6) !important;
    color: var(--sfn-neutral-800, #222) !important;
}

.sfn-guide-btn .sfn-guide-chevron {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.sfn-guide-btn[aria-expanded="true"] .sfn-guide-chevron {
    transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════════════
   Page Pattern: 검색 박스 (P-01)
   ══════════════════════════════════════════════════════════ */

.sfn-search-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

/* 검색 인풋 흰색 배경 */
.sfn-search-box .form-control,
.sfn-search-box .sfn-filter-select {
    background-color: var(--sfn-bg-card);
}

/* 검색 버튼 공통 */
.page-search-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 8px;
    background-color: #333333;
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.page-search-btn:hover {
    background-color: #555555;
    color: #fff;
}

/* ══════════════════════════════════════════════════════════
   Page Pattern: 검색 아이콘 인풋 (P-03)
   ══════════════════════════════════════════════════════════ */

.sfn-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--sfn-neutral-700, #333);
    pointer-events: none;
    z-index: 1;
}

.sfn-search-input {
    padding-right: 2.5rem !important;
}

/* ══════════════════════════════════════════════════════════
   Page Pattern: 커스텀 필터 드롭다운 (P-02)
   ══════════════════════════════════════════════════════════ */

.sfn-filter-select {
    height: 48px;
    background-color: var(--sfn-bg-card);
    border: 1px solid var(--sfn-border);
    border-radius: 8px;
    color: var(--sfn-text);
    font-size: 1rem;
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0.75rem;
}

.sfn-filter-select:hover,
.sfn-filter-select:focus,
.sfn-filter-select.show {
    background-color: var(--sfn-neutral-300) !important;
    border-color: var(--sfn-neutral-500) !important;
    color: var(--sfn-text) !important;
    box-shadow: none !important;
}

.sfn-filter-select.dropdown-toggle::after {
    display: none;
}

.sfn-filter-select span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sfn-filter-caret {
    font-size: 0.85rem;
    color: var(--sfn-neutral-600);
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.sfn-filter-select.show .sfn-filter-caret {
    transform: rotate(180deg);
}

.sfn-filter-menu {
    border-radius: 10px;
    border: 1px solid var(--sfn-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    padding: 6px;
    min-width: 160px;
    background: var(--sfn-bg-card);
}

.sfn-filter-menu .dropdown-item {
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--sfn-text);
    padding: 0.45rem 0.75rem;
}

.sfn-filter-menu .dropdown-item:hover {
    background: var(--sfn-bg-subtle);
    color: var(--sfn-text);
}

.sfn-filter-menu .dropdown-item.active {
    background: var(--sfn-primary-hover);
    color: var(--sfn-action);
    font-weight: 500;
}

/* 700px 이하: 캐럿 아이콘 우측 고정 */
@media (max-width: 700px) {
    .sfn-filter-select {
        display: inline-flex !important;
        justify-content: space-between !important;
    }
    .sfn-filter-select .sfn-filter-caret {
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }
}

/* 768px 이하: 검색창 행 아래 줄로 */
@media (max-width: 768px) {
    .sfn-search-row {
        flex-basis: 100%;
    }
}

/* 430px 이하 */
@media (max-width: 430px) {
    .sfn-filter-dropdown {
        flex: 1 !important;
        min-width: 0;
    }
    .sfn-filter-select {
        width: 100%;
        font-size: 0.875rem;
    }
    .sfn-search-box {
        padding: 10px 12px;
    }
}
