/* 테이블 뒤틀어짐... */


/* 공통 액션 영역 그대로 사용 */

.action-group a:last-of-type {
  margin-right: 20px;
}

/* QA: 설정모달을 화면 세로 중앙정렬 + 내용높이(stretch 방지)로 표시.
   showSettingModal 이 display:block(상단정렬)로 열어 위아래로 커 보이던 문제 보정.
   align-items:center 라서 컨테이너가 내용만큼만 높이를 갖고 중앙에 뜬다. */
#setting-card[aria-hidden="false"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* ===== 상단 탭 ===== */

.setting-popup-tabs {
  display: flex;
  border-bottom: 1px solid #d5d9e0;
  font-weight: bold;
}

.setting-tab {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  /* QA 팝업통일: 파란 헤더 위라서 비활성 탭은 흰색(저대비 #555 제거) */
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
}

.setting-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.setting-tab:last-child {
  border-right: 0;
}

.setting-tab.active {
  background: #ffffff;
  font-weight: 600;
  color: #1e6fd9;
  box-shadow: inset 0 -2px 0 #2f66ff;
}

/* ===== 내용 영역 ===== */

.setting-popup-panels {
  position: relative;
  width: 100%;
  /* 상단 여백은 modal-body 기본 padding 이 담당 (개별 보정 제거) */
}

/* 탭별 패널 show/hide */
.setting-panel {
  display: none;
}

.setting-panel.active {
  display: block;
}

/* 섹션 제목 */
.setting-section-title {
  margin: 0 0 12px;

  font-family: "JalnanGothic";
  font-size: 24px;
  line-height: 1.25;
  font-weight: normal;
  color: #333;
  white-space: nowrap;
}

/* 박스(필드셋) – 기존 폼 느낌에 맞게 흰 카드 스타일 */
.setting-fieldset {
  border: 1px solid #e3e6ef;
  border-radius: 6px;
  background: #ffffff;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.setting-fieldset.narrow {
  max-width: 460px;
}

.setting-subtitle {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

/* 행 레이아웃 – 기존 폼 그리드 느낌을 살짝만 보조 */
.setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.setting-row:last-child {
  margin-bottom: 0;
}

.setting-row.column {
  flex-direction: column;
  align-items: flex-start;
}

/* 라벨 폭만 살짝 고정해서 정렬 맞추기 */
.setting-label {
  min-width: 110px;
  font-size: 13px;
  color: #444;
}

.setting-label.long {
  min-width: 140px;
}

/* 텍스트만 쓸 때 */
.setting-text {
  font-size: 13px;
  color: #555;
}

/* 기존 input/select 스타일 안 깨지도록:
   색/테두리는 건드리지 않고 레이아웃만 보조 */
.setting-input {
  min-height: 32px;
  padding: 0 8px;
}

.setting-input.small {
  width: 80px;
}

.setting-input.fill {
  flex: 1;
}

/* 좌우 2열 배치 – 반응형 */

.setting-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1024px) {
  .setting-flex-columns {
    flex-direction: column;
  }

  .setting-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* 테이블 – 최소한의 선만 */

.setting-table th,
.setting-table td {
  border: 1px solid #e0e3ec;
  padding: 4px 6px;
  text-align: center;
}