/* Check page: dashboard-style layout tokens */
.container--check {
  --check-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --check-radius-lg: 8px;
  --check-bg-sidebar: #f1f5f9;
  --check-gap-main: 32px;   /* gap-8: 사이드바·중앙·오른쪽 간격 */
  --check-sidebar-width: 118px;
}

/* Check page: 콘텐츠 높이만큼만 사용, 푸터는 맨 마지막에 */
.container--check {
  width: 100%;
  max-width: min(1920px, 98vw);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.container--check > .header--check,
.container--check > .check-upload,
.container--check > .check-loading-overlay,
.container--check > .check-column-select,
.container--check > .footer {
  flex-shrink: 0;
}

/* 결과 섹션: 인라인 display:none 제거 시 JS가 flex로 전환 */
#resultSection.check-result {
  animation: fadeIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
  overflow: visible;
}
/* 테이블이 안 보이는 현상 방지: 결과 섹션 내 테이블 영역 크기 강제 */
#resultSection.check-result .check-layout {
  flex: 1 1 auto;
  min-height: 380px;
}
#resultSection.check-result .check-left-main {
  min-width: 220px !important;
  width: auto !important;
  flex: 1 1 auto !important;
}
#resultSection.check-result .check-left-main .table-panel,
#resultSection.check-result .check-left-main--single .table-panel {
  min-height: 280px !important;
  min-width: 0;
  width: 100%;
  display: flex !important;
  flex-direction: column;
}
/* 테이블 영역: 가시성·최소 크기 보장 (셀 하이라이트는 .cell--* 가 우선) */
#resultSection.check-result .table-wrapper {
  min-height: 260px !important;
  width: 100%;
  display: block !important;
  flex: 1 1 auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: var(--bg-card) !important;
}
#resultSection.check-result .check-table {
  display: table !important;
  width: 100%;
  visibility: visible !important;
  opacity: 1 !important;
}
#resultSection.check-result .check-table th,
#resultSection.check-result .check-table td {
  color: var(--text) !important;
  background: var(--bg-card) !important;
  visibility: visible !important;
}
#resultSection.check-result .table-panel {
  visibility: visible !important;
  opacity: 1 !important;
}

.header--check {
  margin-bottom: 24px;
}

.header--check .header-title-link {
  color: inherit;
  text-decoration: none;
}

.header--check .header-title-link:hover {
  text-decoration: underline;
  color: var(--primary);
}

.header--check__title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.header--check__title-row h1 {
  margin: 0;
}

.btn-new-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-new-file:hover {
  background: var(--primary-muted);
  color: var(--primary);
}

.btn-new-file__icon {
  font-size: 1rem;
  line-height: 1;
}

.check-upload {
  margin-bottom: 32px;
  position: relative;
  z-index: 0;
}

/* 업로드 퍼스트: 빈 상태일 때 중앙 정렬, 여백 확대 */
.check-upload--empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 42vh;
  padding: 32px 24px;
}

.check-upload__centered {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.check-upload__lead {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.check-upload__why {
  margin: 0 0 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.check-upload__sample {
  margin: 16px 0 0;
  font-size: 0.875rem;
}

.link-sample-csv {
  color: var(--primary);
  text-decoration: none;
}

.link-sample-csv:hover {
  text-decoration: underline;
}

.check-upload__row-limit {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.upload-box {
  position: relative;
}

/* Loading overlay during check */
.check-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.check-loading-inner {
  text-align: center;
  padding: 32px;
  min-width: 280px;
}

.check-loading-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.check-loading-bar__fill {
  height: 100%;
  width: 0%;
  min-width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.12s ease-out;
}

.check-loading-text {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

/* Column selection step */
.check-column-select {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.check-column-select-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.check-column-select-hint {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.check-column-select-search-wrap {
  margin-bottom: 12px;
}

.check-column-select-search-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.check-column-select-search {
  width: 100%;
  max-width: 320px;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.check-column-select-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-muted);
}

.check-column-select-delimiter-wrap {
  margin-bottom: 12px;
}

.check-column-select-delimiter-wrap .delimiter-select {
  min-width: 160px;
}

.check-column-select-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 16px;
}

.check-column-select-actions .btn-small {
  padding: 10px 16px;
  min-height: 38px;
  font-size: 0.9rem;
}

.check-column-select-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 28px;
  max-height: 280px;
  overflow-y: auto;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg);
  align-content: start;
}

.check-column-select-list::-webkit-scrollbar {
  width: 8px;
}

.check-column-select-list::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 4px;
}

.check-column-select-list::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

.check-column-select-empty {
  display: none;
  padding: 14px 20px;
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.check-column-select-empty.is-visible {
  display: block;
}

.check-column-select-submit {
  margin-top: 8px;
  min-height: 48px;
  padding: 14px 24px;
}

.check-column-select-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
  padding: 4px 0;
  min-height: 28px;
}

.check-column-select-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Column-specific Fix: section title with icon, text-sm */
.check-toolbar-subsection {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.check-toolbar-subsection-title {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-toolbar-subsection-title::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e8c82' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z'/%3E%3C/svg%3E") no-repeat center;
  background-size: 12px;
  flex-shrink: 0;
}

.check-toolbar-subsection .check-toolbar-hint {
  margin-bottom: 8px;
  font-size: 0.8125rem;
}

/* Bulk actions: master control for all column dropdowns */
.column-fix-bulk-wrap {
  margin-bottom: 10px;
}

.column-fix-revert-btn {
  margin-top: 10px;
  font-size: 0.75rem;
  padding: 6px 10px;
}

.column-fix-bulk-title {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.column-fix-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.column-fix-bulk-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.column-fix-bulk-group:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 16px;
  background: var(--border);
  margin-left: 4px;
}

.column-fix-bulk-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.column-fix-bulk-btn:hover {
  color: var(--text);
  border-color: var(--primary);
  background: var(--primary-muted);
}

/* Grid of cards: compact, shadow-sm, rounded-lg */
.column-fix-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px 0;
}

/* 2~3열 그리드: 세로 스크롤 최소화, 드롭다운 너비 통일 */
.column-fix-list--grid {
  grid-template-columns: repeat(2, 1fr);
  max-height: 180px;
  gap: 6px 10px;
}

.column-fix-list--grid .column-fix-item__select {
  min-width: 120px;
  width: 100%;
  max-width: 140px;
}

@media (min-width: 640px) {
  .column-fix-list--grid {
    grid-template-columns: repeat(3, 1fr);
    max-height: 160px;
  }
}

@media (min-width: 520px) {
  .column-fix-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 760px) {
  .column-fix-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.column-fix-list::-webkit-scrollbar {
  width: 6px;
}

.column-fix-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Card item: shadow-sm, rounded-lg */
.column-fix-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.column-fix-item--modified {
  border-color: var(--primary);
  background: var(--primary-muted);
  box-shadow: 0 0 0 1px var(--primary-muted);
}

.column-fix-item__name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: var(--border-light);
  padding: 3px 6px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-fix-item--modified .column-fix-item__name {
  background: var(--primary-muted);
  color: var(--primary);
}

/* Compact select with arrow */
.column-fix-item__select {
  width: 100%;
  max-width: 100%;
  padding: 4px 22px 4px 6px;
  font-size: 0.75rem;
  line-height: 1.3;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E") no-repeat right 6px center;
  background-size: 12px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.column-fix-item__select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-muted);
}

/* Legacy class for any other use */
.check-column-conv-select {
  padding: 5px 24px 5px 8px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

/* 결과 영역: 요약·툴바 고정, 레이아웃(테이블)이 남은 공간 채움 */
.check-result {
  animation: fadeIn 0.3s ease-out;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
  min-height: 420px;
  overflow: visible;   /* 테이블이 잘리지 않도록 */
}

.check-result .check-summary-card,
.check-result .check-toolbar {
  flex-shrink: 0;
}

.check-result .check-layout {
  flex: 1 1 auto;      /* 남은 세로 공간 모두 차지 */
  min-height: 360px;
}

/* 분석 요약 카드: 총행/에러/경고/유효% 한눈에 */
.check-summary-card {
  margin-bottom: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
}

.check-summary-card__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
  margin-bottom: 16px;
}

@media (min-width: 520px) {
  .check-summary-card__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.check-summary-card__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-summary-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.check-summary-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.check-summary-card__item--total .check-summary-card__value { color: var(--text); }
.check-summary-card__item--error .check-summary-card__value { color: var(--danger); }
.check-summary-card__item--warning .check-summary-card__value { color: var(--warning); }
.check-summary-card__item--valid .check-summary-card__value { color: var(--success, #0e8c82); }

.check-summary-card__actions {
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.check-summary-card__status {
  margin: 0 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.check-summary-card__status.is-valid {
  color: var(--success, #0e8c82);
}

.check-summary-card__status.is-fixable {
  color: var(--warning);
}

/* Step indicator: 1 Upload → 2 Review → 3 Fix → 4 Download */
.check-step-indicator {
  margin-bottom: 20px;
}

.check-step-indicator__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-step-indicator__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.check-step-indicator__item--done .check-step-indicator__num {
  background: var(--success, #0e8c82);
  color: #fff;
}

.check-step-indicator__item--done {
  color: var(--text-muted);
}

.check-step-indicator__item--done .check-step-indicator__num {
  background: var(--success, #0e8c82);
  color: #fff;
}

.check-step-indicator__item--current {
  color: var(--text);
  font-weight: 600;
}

.check-step-indicator__item--current .check-step-indicator__num {
  background: var(--primary);
  color: #fff;
}

.check-step-indicator__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.check-step-indicator__label {
  white-space: nowrap;
}

.check-guidance__cta .btn-auto-fix,
.check-guidance__cta--primary .btn-primary-fix-cta {
  font-size: 1.0625rem;
  padding: 16px 32px;
  min-width: 260px;
  font-weight: 700;
  border-radius: 10px;
  background: var(--primary);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.check-guidance__cta--primary .btn-primary-fix-cta:hover:not(:disabled),
.check-guidance__cta .btn-auto-fix:hover:not(:disabled) {
  background: var(--primary-hover);
  color: #fff !important;
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.check-guidance__cta--primary .btn-primary-fix-cta:disabled,
.check-guidance__cta .btn-auto-fix:disabled {
  opacity: 1;
  color: #475569 !important;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.check-guidance__cta--primary .btn-primary-fix-cta:disabled:hover,
.check-guidance__cta .btn-auto-fix:disabled:hover {
  color: #475569 !important;
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: none;
  box-shadow: none;
}

.check-primary-trust-note {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.fix-summary-card {
  margin: 0 0 12px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #166534;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 10px;
}

.check-post-fix-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn-preview-diff {
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg);
}

.check-flash-success {
  animation: checkSuccessFlash 0.65s ease;
}

@keyframes checkSuccessFlash {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); }
}

.diff-preview-section {
  padding: 12px 16px;
  margin: 0 0 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
}

.diff-preview-section__summary {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #92400e;
}

.btn-download-cleaned:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 미준비 다운로드: 플랫·보조 톤 — 준비(ready)만 강한 녹색 */
.check-download-card .btn-action.btn-download-cleaned:not(.btn-download-cleaned--ready) {
  background: #f1f5f9 !important;
  color: var(--text-muted) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
}

.check-download-card
  .btn-action.btn-download-cleaned:not(.btn-download-cleaned--ready):hover:not(:disabled) {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: var(--text) !important;
}

/* 정리 완료 후 다운로드 CTA 강조 (다운로드 카드 기본 스타일보다 우선) */
.check-download-card .btn-action.btn-download-cleaned--ready {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%) !important;
  color: #fff !important;
  border-color: #16a34a !important;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.42) !important;
}

.check-download-card .btn-action.btn-download-cleaned--ready:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #34d399 0%, #16a34a 100%) !important;
  color: #fff !important;
  border-color: #15803d !important;
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.5) !important;
}

.check-cta-pro-badge {
  display: inline-block;
  margin-right: 10px;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border-radius: 4px;
  vertical-align: middle;
}

.check-free-uses {
  margin: -8px 0 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.check-sidebar-action__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.check-sidebar-action__btn--secondary {
  padding: 4px 10px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
}

.check-sidebar-action__btn--secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* 가이드 블록 + 스티키 바: 카드·sticky 한곳 통합 (Fix → Download 플로우) */
.check-guidance.check-primary-action-bar {
  position: sticky;
  top: 12px;
  z-index: 6;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
}

.check-guidance__message {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.check-guidance__explain {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.check-guidance__cta {
  margin-top: 4px;
}

.check-guidance__cta .btn-primary-cta {
  font-weight: 600;
  padding: 12px 24px;
  font-size: 1rem;
}

/* 테이블 아코디언: 기본 접힘, 인지 부하 감소 */
.check-table-accordion {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  overflow: hidden;
  box-shadow: var(--check-shadow-sm);
}

.check-table-accordion__summary {
  padding: 14px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  transition: background 0.15s ease;
}

.check-table-accordion__summary:hover {
  background: var(--primary-muted);
}

.check-table-accordion__summary::-webkit-details-marker,
.check-table-accordion__summary::marker {
  display: none;
}

.check-table-accordion__summary::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  background-size: 18px;
  transition: transform 0.2s ease;
}

.check-table-accordion[open] .check-table-accordion__summary::after {
  transform: rotate(180deg);
}

.check-table-accordion .table-panel {
  border-top: 1px solid var(--border-light);
}

/* 사이드바: 문제별 액션 카드 */
.check-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.check-sidebar-action {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  font-size: 0.875rem;
}

.check-sidebar-action__title {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--text);
}

.check-sidebar-action__title span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8125rem;
}

.check-sidebar-action__btn {
  width: 100%;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--primary);
  background: var(--primary-muted);
  color: var(--primary);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.check-sidebar-action__btn:hover {
  background: var(--primary);
  color: #fff;
}

.check-download-card .btn-action:not(.btn-action--primary) {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.check-download-card .btn-action:not(.btn-action--primary):hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}

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

.btn-outline:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* 레거시 요약 (숨김 처리용) */
.check-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--check-radius-lg);
  font-size: 0.875rem;
}

.summary-item--error { color: var(--danger); }
.summary-item--warning { color: var(--warning); }

.check-toolbar {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 아코디언 공통: 접기/펼치기 패널 */
.check-toolbar-group {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  overflow: hidden;
  box-shadow: var(--check-shadow-sm);
}

.check-toolbar-summary {
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.check-toolbar-summary:hover {
  background: var(--primary-muted);
}

.check-toolbar-summary::-webkit-details-marker,
.check-toolbar-summary::marker {
  display: none;
}

.check-toolbar-summary::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: auto;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  background-size: 20px;
  transition: transform 0.2s ease;
}

.check-toolbar-group[open] .check-toolbar-summary::after {
  transform: rotate(180deg);
}

.check-toolbar-group[open] .check-toolbar-summary {
  border-bottom: 1px solid var(--border-light);
}

/* 아코디언 공통 (検査・変換設定 등): 기본 닫힘, 툴바와 동일 스타일 */
.check-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  overflow: hidden;
  box-shadow: var(--check-shadow-sm);
}

.check-accordion__summary {
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.check-accordion__summary:hover {
  background: var(--primary-muted);
}

.check-accordion__summary::-webkit-details-marker,
.check-accordion__summary::marker {
  display: none;
}

.check-accordion__summary::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: auto;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  background-size: 20px;
  transition: transform 0.2s ease;
}

.check-accordion[open] .check-accordion__summary::after {
  transform: rotate(180deg);
}

.check-accordion[open] .check-accordion__summary {
  border-bottom: 1px solid var(--border-light);
}

.check-accordion__content {
  padding: 16px 24px;
  background: var(--bg-card);
}

/* 요약 상태 뱃지: '3 rules active' 등 작게 표시 */
.check-accordion__status {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.check-accordion__status.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.check-accordion--settings .check-settings-inline {
  padding-bottom: 0;
  border-bottom: none;
}

.check-toolbar-inner {
  padding: 24px;          /* 패딩을 더 넓게 */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;              /* 요소 간 간격 넉넉히 */
  background-color: var(--bg-card);
}

/* Control Panel: left (settings) + right (action card) */
.check-control-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

.check-control-panel__left {
  flex: 1 1 280px;
  min-width: 0;
}

.check-control-panel__settings {
  height: 100%;
  min-height: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  padding: 14px 16px;
  box-shadow: var(--check-shadow-sm);
}

.check-control-panel__settings.check-toolbar-subsection {
  border-top: none;
  margin-top: 0;
  padding-top: 14px;
}

/* 열별 변환 아코디언: 표시할 열과 동일한 패널 스타일 */
.column-fix-accordion {
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--check-shadow-sm);
  margin-bottom: 0;
}

.column-fix-accordion__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: none;
  width: 100%;
  text-align: left;
  user-select: none;
  transition: background 0.15s ease;
}

.column-fix-accordion__summary:hover {
  background: var(--primary-muted);
}

.column-fix-accordion__summary::-webkit-details-marker,
.column-fix-accordion__summary::marker {
  display: none;
}

.column-fix-accordion__title {
  flex: 1 1 auto;
}

.column-fix-accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  background-size: 20px;
  transition: transform 0.2s ease;
}

.column-fix-accordion[open] .column-fix-accordion__icon {
  transform: rotate(180deg);
}

.column-fix-accordion[open] .column-fix-accordion__summary {
  border-bottom: 1px solid var(--border-light);
}

.column-fix-accordion__content {
  padding: 14px 16px 12px;
}

/* Action Card (Download Options): same width as column, shadow-sm, rounded-lg */
.check-action-card {
  flex: 0 0 auto;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.check-action-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-action-card__title::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e8c82' stroke-width='2'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E") no-repeat center;
  background-size: 12px;
  flex-shrink: 0;
}

.check-action-card__bom-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.check-action-card__buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-action-card__apply-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.check-action-card__apply-row .btn-action {
  flex: 1 1 auto;
  min-width: 0;
}

.check-unapplied-indicator {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--danger);
  display: none;
}

.check-unapplied-indicator.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.check-unapplied-indicator.is-visible::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}

.btn-action {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn-action:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}

.btn-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-action--primary {
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-action--primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-action--subtle {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
}

.btn-action--subtle:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-muted);
}

.btn-action--revert {
  font-size: 0.82rem;
  border-color: var(--border-light);
}

.btn-action--revert:not(:disabled) {
  color: var(--text);
}

.btn-action--revert:hover:not(:disabled) {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-action--revert:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-muted);
}

.check-action-card__bom {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.check-toolbar-hint {
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.check-download-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  margin-bottom: 4px;
}

.check-download-option input {
  cursor: pointer;
}

.check-toolbar-buttons {
  display: flex;
  gap: 8px;
}

.issue-panel-empty {
  margin: 0;
  padding: 16px;
  font-size: 0.9rem;
  color: var(--success);
  text-align: center;
}

.check-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.check-actions--columns {
  align-items: flex-start;
}

.column-visibility {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-height: 120px;
  overflow-y: auto;
  padding: 8px 0;
}

.column-visibility-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.column-visibility-item input {
  margin: 0 4px 0 0;
  cursor: pointer;
}

.action-label {
  font-weight: 600;
  color: var(--text-muted);
}

/* .btn-small は style.css で共通定義 */

.check-layout {
  display: flex;
  gap: var(--check-gap-main, 32px);
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 360px;   /* 테이블이 보이도록, 너무 길지 않게 */
  margin-bottom: 40px;
  width: 100%;
  min-width: 0;
}

/* Left: settings + (Column Fix + Table) vertically, 중앙 영역 flex-grow로 충분한 너비 확보 */
.check-left-main {
  flex: 1 1 auto;
  flex-grow: 1;
  min-width: 220px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

/* 열별 설정 그리드: 테이블과 여백 없이 하나로 연결, 카드 그림자 통일 */
.fix-grid.column-specific-grid {
  flex-shrink: 0;
  margin-bottom: 0;
  min-height: 0;
}
.check-left-main .fix-grid + .table-panel {
  border-radius: 0 0 var(--check-radius-lg) var(--check-radius-lg);
  border-top: 1px solid var(--border-light);
  box-shadow: var(--check-shadow-sm);
}
.check-left-main .fix-grid .check-control-panel__settings {
  border-radius: var(--check-radius-lg) var(--check-radius-lg) 0 0;
  border-bottom: none;
  margin-bottom: 0;
  box-shadow: var(--check-shadow-sm);
}

/* 테이블이 반드시 보이도록: 루트/단일 테이블 레이아웃 강제 */
.check-left-main--single {
  min-height: 320px;
}
.check-left-main--single .table-panel {
  flex: 1 1 auto;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.check-left-main--single .table-wrapper {
  flex: 1 1 auto;
  min-height: 260px;
  display: block;
  overflow-x: auto;
  overflow-y: auto;
}
.check-left-main--single .check-table {
  width: 100%;
  min-height: 200px;
}

.check-column-fix-standalone {
  flex-shrink: 0;
  margin-bottom: 0;
  border-radius: var(--check-radius-lg) var(--check-radius-lg) 0 0;
  border-bottom: none;
  box-shadow: var(--check-shadow-sm);
}

.check-left-main .table-panel {
  border-radius: 0 0 var(--check-radius-lg) var(--check-radius-lg);
  border-top: 1px solid var(--border-light);
  box-shadow: var(--check-shadow-sm);
}

.check-left-main--single .table-panel {
  border-radius: var(--check-radius-lg);
}

/* 우측 패널 전체: 독립된 조작부 느낌의 카드 래퍼 */
.check-right-column--card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
  padding: 16px;
  align-self: flex-start;
}

/* Right: Download + Results as single "control tower" column */
.check-right-column {
  flex: 0 0 260px;
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;   /* 겹침 방지: 오른쪽 열이 줄어들지 않게 */
}

/* 데스크톱: 오른쪽 패널 스티키 */
@media (min-width: 900px) {
  .check-sticky-sidebar {
    position: sticky;
    top: 24px;
    align-self: flex-start;
  }
}

/* 모바일: 사이드바는 상단 배치 (레이아웃 순서로 처리) */
@media (max-width: 899px) {
  .check-layout {
    flex-direction: column;
  }
  .check-sticky-sidebar {
    order: -1;
  }
}

/* 통합 설정 카드: 연한 회색(slate-50) 배경, 가독성 */
.unified-settings-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unified-settings-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.unified-settings-card__title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.75;
}

/* 검사 설정 인라인: 체크박스 + 배지 한 줄 */
.check-settings-inline {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.check-settings-inline__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.check-settings-inline__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  cursor: pointer;
  line-height: 1.25;
}

.check-settings-inline__item input[type="checkbox"] {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.check-settings-inline__label {
  color: var(--text);
}

/* 건수 배지: 빨간/파란 등 작은 둥근 사각형 */
.check-settings-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.2;
}

.check-settings-badge--muted {
  background: #e2e8f0;
  color: #475569;
}

.check-settings-badge--danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* 설정 바로 아래 적용 버튼: 인과관계 명확 */
.check-apply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  margin-top: 2px;
}

.check-apply-bar .btn-action {
  flex: 1 1 auto;
  min-width: 120px;
}

.check-apply-bar .check-unapplied-indicator {
  flex-shrink: 0;
}

/* (Removed) Sticky/pulse apply-bar styling
   Reason: avoid duplicate/competing primary "Fix" actions.
   Top CTA is the only primary fix action now. */

/* Left sidebar: slim, compact, gray-50 separation from main (legacy when used) */
.check-settings-panel {
  width: var(--check-sidebar-width, 100px);
  min-width: var(--check-sidebar-width, 100px);
  flex-shrink: 0;
  padding: 10px 8px;
  background: var(--check-bg-sidebar);
  border-radius: var(--check-radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--check-shadow-sm);
}

.check-settings-panel__title {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.check-settings-panel__title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.7;
}

.check-settings-panel__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.check-settings-panel__item {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1.2;
}

.check-settings-panel__item input[type="checkbox"] {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.check-settings-panel__label {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  line-height: 1.25;
}

.check-settings-panel__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.issue-panel {
  width: 260px;
  min-width: 220px;
  flex-shrink: 0;
  max-width: 320px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

/* Compact card: same width as Download card, space-y-4, shadow-sm, rounded-lg */
.issue-panel--card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--check-radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--check-shadow-sm);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.issue-panel--card .issue-panel__title,
.issue-panel--card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.issue-panel--card .issue-panel__title::before,
.issue-panel--card h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e8c82' stroke-width='2'%3E%3Cpath d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4'/%3E%3C/svg%3E") no-repeat center;
  background-size: 12px;
  flex-shrink: 0;
}

.issue-panel--card #issueList {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.issue-panel h3 {
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.issue-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.issue-panel li {
  font-size: 0.8125rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.issue-panel li:hover {
  color: var(--primary);
}

.issue-panel li.issue--error {
  color: #b91c1c;
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  padding-left: 8px;
  margin-left: -2px;
}
.issue-panel li.issue--warning { color: var(--warning); }
.issue-panel li.issue--info { color: var(--text-muted, #6b7280); }

.issue-group {
  margin-bottom: 12px;
}

.issue-group-header {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.issue-group-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.issue-group-items--hidden {
  display: none;
}

/* 3. 테이블 패널: 남은 공간 채우고 넘치면 스크롤 */
.table-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 200px;   /* 테이블이 보이도록 최소 높이 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-panel .table-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 200px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--check-radius-lg);
  box-shadow: var(--check-shadow-sm);
  background: var(--bg-card);
}

.check-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.check-table th,
.check-table td {
  padding: 4px 8px;
  border: 1px solid var(--border);
  max-width: 140px;
  min-width: 45px;
  word-break: break-word;
  white-space: normal;
}

.check-table th {
  background: var(--bg);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 8px;
}

.check-table-th__wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.check-table-th__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-table-th__fix-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.check-table-th__fix-icon:hover {
  color: var(--primary);
  background: var(--primary-muted);
}

.check-table th.col--focus .check-table-th__fix-icon,
.check-table-th__fix-icon:focus {
  color: var(--primary);
  background: var(--primary-muted);
}

/* 규칙이 적용된 열: 헤더 색상·체크로 활성화 상태 표시 */
.check-table th.col--modified {
  background: #e0f2fe !important;
  color: #0369a1;
}

.check-table th.col--modified .check-table-th__fix-icon {
  color: #0369a1;
}

.check-table td.col--modified {
  background: #f0f9ff !important;
}

/* Column highlight when user changes option in Column-specific Fix */
.check-table th.col--focus,
.check-table td.col--focus {
  background: var(--primary-muted) !important;
}

/* 푸터: 화면 고정 없이 콘텐츠 맨 마지막에 자연스럽게 배치 */
.container--check > .footer {
  margin-top: 48px;
  padding: 40px 0;
  flex-shrink: 0;
}

/* 오류/경고 셀: 옅은 배경 + 진한 테두리로 명시적 피드백 */
.cell--leading-zero {
  background: #fef2f2 !important;
  color: #b91c1c;
  font-weight: 600;
  box-shadow: inset 0 0 0 2px #dc2626 !important;
}

.cell--duplicate-id {
  background: #fef2f2 !important;
  color: #b91c1c;
  box-shadow: inset 0 0 0 2px #dc2626 !important;
}

.cell--empty {
  background: #fef9c3 !important;
}

.cell--invisible-char,
.cell--trim {
  background: #fef3c7 !important;
  color: var(--warning);
  box-shadow: inset 0 0 0 1px #d97706;
}

/* Auto-fix diff: 값이 바뀐 셀 (title에 이전/이후 표시) */
.cell--changed {
  background-color: #fff3cd !important;
  box-shadow: inset 0 0 0 2px #c9a227 !important;
}

.check-issues-truncated-msg {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  border: 1px solid #d97706;
}

.row--empty {
  background: #fef9c3 !important;
}

/* 결과 항목 클릭 시 해당 행 강조: 아주 강한 시각적 피드백 */
.check-table tr.row--highlight td {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 2px var(--primary) !important;
  position: relative;
  z-index: 1;
}

.col--empty th {
  background: #fef9c3 !important;
}

.check-table th.table-empty-message,
.check-table td.table-empty-message {
  text-align: center;
  color: var(--text-muted);
  font-weight: normal;
  padding: 32px 16px;
  border: none;
  background: var(--bg) !important;
}

@media (max-width: 768px) {
  .check-layout {
    flex-direction: column;
    gap: 16px;
  }

  .check-settings-panel {
    width: 100%;
    min-width: 0;
  }

  .check-left-main .check-column-fix-standalone {
    border-radius: var(--check-radius-lg);
    border-bottom: 1px solid var(--border-light);
  }

  .check-left-main .table-panel {
    border-radius: var(--check-radius-lg);
    border-top: 1px solid var(--border-light);
  }

  .check-right-column {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .issue-panel,
  .issue-panel--card {
    width: 100%;
    max-width: 100%;
  }

  .check-summary-card {
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .check-summary-card__grid {
    gap: 12px 16px;
    margin-bottom: 12px;
  }

  .check-summary-card__value {
    font-size: 1.25rem;
  }

  .check-guidance.check-primary-action-bar {
    padding: 16px 18px;
    top: 8px;
  }

  .check-guidance__message {
    font-size: 0.9375rem;
  }

  .check-guidance__explain {
    font-size: 0.8125rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Download card staged reveal */
.check-download-card--hidden {
  display: none !important;
}

.check-download-card--fade-in {
  animation: checkDownloadFadeIn 0.28s ease-out;
}

@keyframes checkDownloadFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Primary CTA priority downgrade after apply */
.check-guidance__cta--primary .btn-primary-fix-cta.btn-primary-fix-cta--secondary {
  background: #e2e8f0;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

/* Non-fixable reason in issue list */
.issue-item-msg {
  display: block;
}

.issue-item-manual-note {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.35;
}

/* Row feedback animation after issue click */
.check-table tbody tr.row--flash td {
  animation: checkRowFlash 2.2s ease;
}

@keyframes checkRowFlash {
  0% { background-color: rgba(245, 158, 11, 0); }
  9% { background-color: rgba(245, 158, 11, 0.28); }
  77% { background-color: rgba(245, 158, 11, 0.28); }
  100% { background-color: rgba(245, 158, 11, 0); }
}

/* Advanced column transform summary badge */
.check-transform-badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.check-transform-badge.is-active {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

/* Revert confirm modal */
.check-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.check-confirm-modal__panel {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
  padding: 20px;
}

.check-confirm-modal__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.check-confirm-modal__body {
  margin: 0;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.5;
}

.check-confirm-modal__actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 2nd UX pass: summary hierarchy */
.check-summary-card__item--error { order: 1; }
.check-summary-card__item--warning { order: 2; }
.check-summary-card__item--total { order: 3; }
.check-summary-card__item--valid { order: 4; }

.check-summary-card__item--error .check-summary-card__value,
.check-summary-card__item--warning .check-summary-card__value {
  font-size: 1.75rem;
  font-weight: 800;
}

.check-summary-card__item--total .check-summary-card__value,
.check-summary-card__item--valid .check-summary-card__value {
  font-size: 1.18rem;
  font-weight: 700;
  color: #64748b;
}

.check-summary-card__item--error.check-summary-card__item--error-zero .check-summary-card__value {
  color: #16a34a;
}

.check-summary-card__item--warning.check-summary-card__item--warning-active .check-summary-card__value {
  color: #d97706;
}

/* Warning review action button under status line */
.check-status-action-btn {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #b45309;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.check-status-action-btn:hover {
  background: #fef3c7;
}

.check-status-action-btn.is-below-error {
  margin-top: 10px;
}

/* Replace disabled auto-fix button with info panel */
.check-no-auto-fix-notice {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Quick fix prompt banner (consent-based shortcut CTA) */
.check-quick-fix-banner {
  margin: -8px 0 14px;
  padding: 10px 12px;
  border: 1px solid #99f6e4;
  background: #ecfeff;
  color: #0f766e;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.check-quick-fix-banner__icon {
  font-size: 0.95rem;
  line-height: 1;
}

.check-quick-fix-banner__text {
  font-size: 0.86rem;
  font-weight: 700;
}

.check-quick-fix-banner__btn {
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid #14b8a6;
  background: #fff;
  color: #0f766e;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.check-quick-fix-banner__btn:hover {
  background: #f0fdfa;
}

/* Issue report button near download card */
.btn-action--issue-report {
  margin-top: 8px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-action--issue-report:hover:not(:disabled) {
  background: #f1f5f9;
  color: #334155;
  border-color: #94a3b8;
}

/* Strong unapplied banner */
.check-unapplied-indicator.is-visible {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.check-unapplied-indicator.is-visible::before {
  content: none;
}

/* Apply button emphasis */
.btn-action--subtle.btn-apply-rules-emphasis {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
  font-weight: 700;
}

.btn-action--subtle.btn-apply-rules-emphasis:hover:not(:disabled) {
  background: #fde68a;
  color: #78350f;
  border-color: #d97706;
}
