/* ============================================
   공통 UI 컴포넌트 (Components)
   필터바, 데이터 테이블, 배지(기본), 페이지네이션,
   상세 카드, 정보 그리드, 미니 테이블, 갤러리,
   소개글, 가격표, 프로그레스바, 액션 버튼 등
   모든 목록+상세 페이지에서 재사용
   ============================================ */

/* ── 필터 바 ── */
.filter-bar {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 16px;
}

/* ── 유치원 필터 배너 (kindergarten_id로 진입 시) ── */
.kg-filter-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EBF5FF;
  border: 1px solid #B3D9FF;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #1A6CB5;
}

.kg-filter-banner__icon {
  font-size: 16px;
  flex-shrink: 0;
}

.kg-filter-banner__text {
  flex: 1;
}

.kg-filter-banner__text strong {
  font-weight: 700;
}

.kg-filter-banner__clear {
  flex-shrink: 0;
  color: #1A6CB5;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.kg-filter-banner__clear:hover {
  background: rgba(26, 108, 181, 0.1);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-weak);
  min-width: 52px;
  flex-shrink: 0;
}

.filter-input,
.filter-select {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--surface-base);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  transition: box-shadow 0.15s ease;
}

.filter-input:focus,
.filter-select:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.filter-input--date {
  width: 150px;
}

.filter-input--search {
  flex: 1;
  min-width: 200px;
}

.filter-select {
  min-width: 120px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238C9AA5' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.filter-separator {
  font-size: 13px;
  color: var(--text-weak);
}

.btn-search {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.btn-search:hover {
  opacity: 0.85;
}

/* ── 결과 헤더 ── */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.result-header__count {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.result-header__count strong {
  font-weight: 700;
  color: var(--primary);
}

.btn-excel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-excel:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.result-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── 새 등록 버튼 (결과 헤더 공통) ── */
.btn-add-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-add-new:hover {
  opacity: 0.85;
}

.btn-excel__icon {
  width: 16px;
  height: 16px;
}

/* ── 데이터 테이블 ── */
.data-table-wrap {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.data-table-wrap--scroll {
  overflow-x: auto;
}

/* ── 테이블 체크박스 칼럼 ── */
.data-table__checkbox {
  width: 40px;
  text-align: center;
}

.data-table__checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-weak);
  text-align: left;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.02);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(51, 157, 238, 0.03);
}

.data-table tbody td {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 13px 14px;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.data-table__link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

/* 마스킹 텍스트 */
.masked {
  letter-spacing: 0.5px;
}

/* 금액 우측 정렬 */
.text-right {
  text-align: right;
}

/* 썸네일 이미지 (목록) */
.thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-base);
  flex-shrink: 0;
}

.thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-base);
}

.thumb--placeholder svg {
  width: 18px;
  height: 18px;
  fill: var(--text-weak);
}

/* ── 배지 (기본) ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 배지 색상 시스템 (7색) ── */
.badge--c-blue   { background: var(--badge-blue-bg);   color: var(--badge-blue-fg); }
.badge--c-green  { background: var(--badge-green-bg);  color: var(--badge-green-fg); }
.badge--c-orange { background: var(--badge-orange-bg); color: var(--badge-orange-fg); }
.badge--c-red    { background: var(--badge-red-bg);    color: var(--badge-red-fg); }
.badge--c-gray   { background: var(--badge-gray-bg);   color: var(--badge-gray-fg); }
.badge--c-brown  { background: var(--badge-brown-bg);  color: var(--badge-brown-fg); }
.badge--c-pink   { background: var(--badge-pink-bg);   color: var(--badge-pink-fg); }

/* 신선도 퍼센트 색상 */
.freshness--good {
  color: var(--success);
  font-weight: 700;
}

.freshness--bad {
  color: var(--danger);
  font-weight: 700;
}

/* 동의/미동의 */
.text-agreed    { color: var(--success); font-weight: 500; }
.text-disagreed { color: var(--text-weak); }

/* ── 페이지네이션 ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
  padding-bottom: 8px;
}

.pagination__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.15s ease;
}

.pagination__btn:hover {
  background: rgba(51, 157, 238, 0.06);
}

.pagination__btn.active {
  background: var(--gradient);
  color: #ffffff;
  font-weight: 700;
}

.pagination__btn--arrow {
  color: var(--text-weak);
}

.pagination__btn--arrow:hover {
  color: var(--primary);
}

.pagination__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── 상세 화면 ── */

/* 상단 네비게이션 */
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: opacity 0.15s ease;
  background: none;
  border: none;
  font-family: var(--font-family);
}

.btn-back:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-action:hover {
  opacity: 0.8;
}

.btn-action--danger {
  background: rgba(224, 90, 58, 0.10);
  color: var(--danger);
}

.btn-action--success {
  background: rgba(46, 204, 113, 0.10);
  color: var(--success);
}

.btn-action--primary {
  background: var(--gradient);
  color: #ffffff;
}

.btn-action--ghost {
  background: transparent;
  color: var(--primary);
}

.btn-action--outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-action--outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-action--outline-warning {
  background: transparent;
  color: var(--warning);
  border: 1px solid var(--warning);
}

.btn-action--filled-danger {
  background: var(--danger);
  color: #ffffff;
}

/* 상세 카드 */
.detail-card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 16px;
}

.detail-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.detail-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 라벨-값 그리드 (세로 테이블) */
.info-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 0;
}

.info-grid--wide {
  grid-template-columns: 220px 1fr;
}

.info-grid__label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-weak);
  padding: 10px 0;
}

.info-grid__value {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  padding: 10px 0;
}

.info-grid__value--link {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.info-grid__value--link:hover {
  text-decoration: underline;
  opacity: 0.75;
}

.info-grid__value--danger {
  color: var(--danger);
}

/* 프로필 이미지 */
.profile-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-sidebar);
  object-fit: cover;
}

/* 미니 통계 카드 그리드 */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.stat-cards--3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-cards--4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--surface-base);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-card__label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-weak);
  margin-bottom: 8px;
}

.stat-card__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card__unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-weak);
  margin-top: 2px;
}

.stat-card--highlight {
  background: rgba(51, 157, 238, 0.06);
}

.stat-card--highlight .stat-card__value {
  color: var(--primary);
}

.stat-card--fee .stat-card__value {
  color: var(--primary);
}

.stat-card--settlement .stat-card__value {
  color: var(--text-secondary);
}

.stat-card--link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card--link .stat-card__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
}

.stat-card--link .stat-card__value:hover {
  text-decoration: underline;
}

/* 미니 테이블 (상세 내부용) */
.mini-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-weak);
  text-align: left;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.02);
}

.mini-table thead th:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.mini-table thead th:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.mini-table tbody tr {
  transition: background 0.15s ease;
}

.mini-table tbody tr:hover {
  background: rgba(51, 157, 238, 0.03);
}

.mini-table tbody td {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 10px 12px;
  vertical-align: middle;
}

.mini-table__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
}

.mini-table__link:hover {
  text-decoration: underline;
  opacity: 0.75;
}

/* 조건부 영역 */
.conditional-section {
  position: relative;
}

.conditional-section__badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(51, 157, 238, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* ── 사진 갤러리 ── */
.photo-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.photo-gallery::-webkit-scrollbar {
  height: 4px;
}

.photo-gallery::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
}

.photo-gallery__item {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-base);
}

.photo-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-gallery__badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── 소개글 더보기 ── */
.intro-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 2.6em;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.intro-text.expanded {
  max-height: 200px;
}

.intro-toggle {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-family: var(--font-family);
}

.intro-toggle:hover {
  text-decoration: underline;
}

/* ── 돌봄비 가격표 ── */
.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-weak);
  text-align: center;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.02);
}

.price-table thead th:first-child {
  text-align: left;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.price-table thead th:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.price-table tbody td {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: right;
  padding: 10px 12px;
}

.price-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  background: rgba(0, 0, 0, 0.02);
}

.price-table tbody td.na {
  color: var(--text-weak);
  text-align: center;
}

/* ── 교육 프로그레스바 ── */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar__track {
  flex: 1;
  max-width: 200px;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar__text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ── 탭 바 ── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.tab-bar__item {
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-weak);
  background: none;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.tab-bar__item:hover {
  color: var(--text-secondary);
}

.tab-bar__item.active {
  color: var(--primary);
  font-weight: 700;
}

.tab-bar__item.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* ── 탭 콘텐츠 ── */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── 모달 (공통) ── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.15);
  padding: 32px;
  width: 480px;
  max-width: 90vw;
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 16px;
}

.modal__message {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal__label span {
  color: var(--danger);
}

.modal__textarea {
  width: 100%;
  min-height: 100px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface-base);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  outline: none;
  resize: vertical;
  transition: box-shadow 0.15s ease;
}

.modal__textarea:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.modal__btn {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.modal__btn:hover {
  opacity: 0.8;
}

.modal__btn--cancel {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.modal__btn--delete {
  background: var(--danger);
  color: #ffffff;
  border: none;
}

/* ── 모달 헤더 / 바디 / 푸터 / 닫기 ── */
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal__header .modal__title {
  margin-bottom: 0;
  color: var(--text-primary);
}

.modal__close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-weak);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal__close:hover {
  color: var(--text-primary);
}

.modal__body {
  max-height: 60vh;
  overflow-y: auto;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.modal__btn--delete:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── 모달 제목 색상 변형 ── */
.modal__title--primary { color: var(--primary); }
.modal__title--warning { color: var(--warning); }

/* ── 모달 확인 버튼 변형 ── */
.modal__btn--confirm-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
}

.modal__btn--confirm-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal__btn--confirm-warning {
  background: var(--warning);
  color: #ffffff;
  border: none;
}

.modal__btn--confirm-warning:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal__btn--confirm-danger {
  background: var(--danger);
  color: #ffffff;
  border: none;
}

.modal__btn--confirm-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── 모달 셀렉트 ── */
.modal__select {
  width: 100%;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface-base);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238C9AA5' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  margin-bottom: 16px;
  transition: box-shadow 0.15s ease;
}

.modal__select:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

/* ── 모달 경고 메시지 ── */
.modal__warning {
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
  background: var(--badge-red-bg);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── 폼 컴포넌트 (공통) ── */
.form-input {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--surface-base);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  width: 100%;
  outline: none;
  transition: box-shadow 0.15s ease;
}

.form-input:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.form-input--short {
  width: 200px;
}

.form-input--xs {
  width: 80px;
  text-align: center;
}

.form-input--date {
  width: 160px;
}

.form-input--time {
  width: 130px;
}

.form-input[readonly] {
  color: var(--text-weak);
  cursor: default;
}

/* ── 폼 셀렉트 ── */
.form-select {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--surface-base);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238C9AA5' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  min-width: 140px;
  transition: box-shadow 0.15s ease;
}

.form-select:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

/* ── 폼 라디오 / 체크박스 ── */
.form-radio,
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  margin-right: 16px;
  cursor: pointer;
}

.form-radio input,
.form-checkbox input {
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── 폼 텍스트에리어 ── */
.form-textarea {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--surface-base);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
  outline: none;
  line-height: 1.7;
  transition: box-shadow 0.15s ease;
}

.form-textarea:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.form-textarea--short {
  min-height: 80px;
}

.form-textarea--mid {
  min-height: 160px;
}

.form-textarea--tall {
  min-height: 360px;
}

/* ============================================
   순서 변경 화살표 (FAQ·배너·교육 등 공통)
   ============================================ */
.order-arrows {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.order-arrows__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: none;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-weak);
  font-size: 10px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.order-arrows__btn:hover {
  background: rgba(51,157,238,0.08);
  color: var(--primary);
}

/* ── 후기 선택 태그 (pill) ── */
.review-tag-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(51, 157, 238, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
}

/* ── 텍스트 말줄임 (테이블 셀용) ── */
.review-content,
.message-preview {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

/* ── 전체보기 링크 ── */
.view-all-link {
  display: block;
  text-align: center;
  padding: 12px 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
}

.view-all-link:hover {
  text-decoration: underline;
  opacity: 0.75;
}

/* ── JS 유효성 검사 메시지 ── */
.validation-message {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--danger);
}

.form-input.is-valid,
.form-textarea.is-valid {
  border-color: var(--success);
}

/* ── 글자 수 카운터 ── */
.char-counter {
  display: block;
  font-size: 12px;
  color: var(--text-light, #8C9AA5);
  text-align: right;
  margin-top: 4px;
}

.char-counter.is-over {
  color: var(--danger);
  font-weight: 600;
}

/* ── 기간 퀵버튼 (filter-period-btn) ── */
.filter-period-btn {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 4px;
}

.filter-period-btn:first-of-type {
  margin-left: 12px;
}

.filter-period-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-period-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
