/*
 * 설정 카드 (.sset-card)
 * 시스템설정/기본설정 등 '설정 목록'을 캠페인 설정탭과 동일한 클릭형 행 UI로.
 * 카드 전체 클릭 → 해당 설정 모달 오픈. 우측에 값 배지 + chevron.
 */
.sset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.sset-card:hover {
  background: #f0f6ff;
  border-color: #bfdbfe;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}
.sset-card:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.sset-card-main { flex: 1; min-width: 0; padding-right: 12px; }
.sset-card-title { font-size: 13px; font-weight: 600; color: #0f172a; }
.sset-card-desc { margin: 2px 0 0 0; font-size: 11px; color: #6b7280; line-height: 1.5; }

.sset-card-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sset-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 230px; }
.sset-chevron { flex-shrink: 0; color: #cbd5e1; transition: color 0.15s, transform 0.15s; }
.sset-card:hover .sset-chevron { color: #2563eb; transform: translateX(3px); }

.sset-badge { padding: 2px 10px; font-size: 11px; font-weight: 500; border-radius: 12px; white-space: nowrap; }
.sset-badge-on { background: #dcfce7; color: #15803d; }
.sset-badge-off { background: #f1f5f9; color: #64748b; }
.sset-badge-info { background: #dbeafe; color: #1e40af; }
.sset-badge-warn { background: #fef3c7; color: #92400e; }
.sset-badge-neutral { background: #f3f4f6; color: #6b7280; }

/*
 * 모바일(≤768px) — 제목·설명이 가로를 다 쓰도록 우측 항목을 아랫줄로 내린다.
 * 배지가 있는 카드만 세로 배치(:has). 배지 없이 chevron 만 있는 카드까지 내리면
 * chevron 하나짜리 빈 줄이 생겨서 오히려 지저분해진다.
 */
@media (max-width: 768px) {
  .sset-card:has(.sset-badge) {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .sset-card:has(.sset-badge) .sset-card-main { padding-right: 0; }
  .sset-card:has(.sset-badge) .sset-card-right {
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed #e5e7eb;
  }
  .sset-card:has(.sset-badge) .sset-badges {
    flex: 1;
    max-width: none;
    justify-content: flex-end;
  }
  /* 세로 배치에서는 chevron 이 우측 하단으로 가므로 hover 이동 효과 불필요 */
  .sset-card:has(.sset-badge):hover .sset-chevron { transform: none; }
}

html.dark .sset-card { background: #0f172a; border-color: #334155; }
html.dark .sset-card:hover { background: #1e293b; border-color: #3b82f6; }
html.dark .sset-card-title { color: #f1f5f9; }
html.dark .sset-card-desc { color: #94a3b8; }
html.dark .sset-chevron { color: #475569; }

@media (max-width: 768px) {
  html.dark .sset-card:has(.sset-badge) .sset-card-right { border-top-color: #334155; }
}

/* ── 설정 페이지 골격 (2026-08-07)
   ⚠폭 제한이 핵심 — 카드가 화면 전체로 늘어나면 제목(좌)과 상태 배지(우)가 멀어져
   시선이 크게 움직이고 목록이 성기게 보인다. */
.sset-page { max-width: 860px; }
.sset-page-head { margin-bottom: 20px; }
.sset-page-title { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; letter-spacing: -0.3px; }
.sset-page-desc { margin: 6px 0 0; font-size: 12px; color: #64748b; line-height: 1.6; }

/* ── 섹션 그룹 (2026-08-07) — 설정이 늘면 평면 목록은 찾기 어렵다.
   관련 설정끼리 묶어 제목 + 한 줄 설명을 붙인다. 공통사항설정에서 도입, 다른 설정 페이지에도 재사용 가능. */
.sset-section { margin-bottom: 22px; }
.sset-section:last-child { margin-bottom: 0; }
.sset-section-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 0 2px 8px; margin-bottom: 10px; border-bottom: 1px solid #e2e8f0;
}
.sset-section-title { font-size: 12.5px; font-weight: 800; color: #1e293b; letter-spacing: -0.2px; }
.sset-section-desc { font-size: 11px; color: #94a3b8; line-height: 1.5; }
.sset-section-body { display: flex; flex-direction: column; gap: 10px; }
