/* precheck.css - studytime 사용 인증샷 전용 모던 스타일시트 (v20261007_redesign) */

/* 1. 기본 레이아웃 & 패널 헤더 */
#tab-pc-precheck {
  display: grid;
  gap: 20px;
}

.precheck-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 4px;
}

.precheck-panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.precheck-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.precheck-date-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
}

.precheck-guide-banner {
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.precheck-effective-date {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.precheck-bulk-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: #f8faff;
}
.precheck-bulk-panel h3 { margin: 0 0 8px; font-size: 1.05rem; }
.precheck-child-result { margin: 8px 0 14px; overflow-wrap: anywhere; }
.precheck-settings-card > summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; }
.precheck-settings-card[open] > summary { margin-bottom: 12px; }
.precheck-settings-card > .precheck-meta { margin: 8px 0 12px; }
#tab-pc-precheck > *, .precheck-child-card, .precheck-card { min-width: 0; }

/* 2. 설정 카드 (precheck-settings) */
.precheck-settings-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.precheck-settings-card h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.precheck-auto-approve-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  margin-bottom: 14px;
}

.precheck-auto-approve-bar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #166534;
  cursor: pointer;
  margin: 0;
}

.precheck-auto-approve-bar input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
  cursor: pointer;
  margin: 0;
}

.precheck-auto-approve-desc {
  font-size: 0.82rem;
  color: #15803d;
  font-weight: 500;
}

/* 규칙 설정 테이블 */
.precheck-rules-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  margin-bottom: 12px;
}

.precheck-rules-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  text-align: center;
}

.precheck-rules-table th,
.precheck-rules-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  white-space: nowrap;
}

.precheck-rules-table th:last-child,
.precheck-rules-table td:last-child {
  border-right: 0;
}

.precheck-rules-table tr:last-child th,
.precheck-rules-table tr:last-child td {
  border-bottom: 0;
}

.precheck-rules-table thead .col-child {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  width: 90px;
  border-right: 1px solid #e2e8f0;
}

.precheck-rules-table thead .pc-group {
  background: #eff6ff;
  color: #1e40af;
  font-weight: 800;
}

.precheck-rules-table thead .phone-group {
  background: #faf5ff;
  color: #6b21a8;
  font-weight: 800;
}

.precheck-rules-table thead .header-group-row th.pc-group {
  border-right: 2px solid #cbd5e1;
  border-bottom: 1px solid #dbeafe;
}

.precheck-rules-table thead .header-group-row th.phone-group {
  border-bottom: 1px solid #f3e8ff;
}

.precheck-rules-table thead .header-item-row th {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 10px;
}

.precheck-rules-table thead .header-item-row th.group-end {
  border-right: 2px solid #cbd5e1;
}

.precheck-rules-table tbody .cell-child-name {
  background: #f8fafc;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  border-right: 1px solid #e2e8f0;
}

.precheck-rules-table tbody td.group-end {
  border-right: 2px solid #cbd5e1;
}

.precheck-rules-table .table-check-label {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px;
  cursor: pointer;
}

.precheck-rules-table .table-check-label input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

.precheck-rules-table tbody tr:hover td {
  background-color: #f8fafc;
}

.precheck-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* 3. 아이별 검토 카드 */
.precheck-child-card {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}

.precheck-child-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.precheck-child-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.precheck-date-select-wrap {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 10px;
  width: auto;
}

.precheck-date-select-wrap label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  font-size: 0.85rem;
  color: #475467;
  font-weight: 700;
  margin: 0;
  width: auto;
}

.precheck-date-select-wrap select,
.precheck-date-select-wrap input[type="date"] {
  display: inline-block;
  width: auto;
  min-width: 125px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}

/* 4. 이번 주 인증 스탬프 보드 */
.precheck-week {
  overflow-x: auto;
  margin: 14px 0 20px;
  padding: 2px 0;
}

.precheck-stamps {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  font-size: 0.88rem;
  background: #ffffff;
}

.precheck-stamps caption {
  text-align: left;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 4px 6px 10px;
}

.precheck-stamps th,
.precheck-stamps td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  white-space: nowrap;
}

.precheck-stamps th:last-child,
.precheck-stamps td:last-child {
  border-right: 0;
}

.precheck-stamps tr:last-child td,
.precheck-stamps tr:last-child th {
  border-bottom: 0;
}

.precheck-stamps thead th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 4px;
}

.precheck-stamps tbody th {
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
  text-align: left;
  padding-left: 14px;
  width: 110px;
}

/* 스탬프 날짜 선택 버튼 */
.stamp-date-btn {
  width: 100%;
  min-width: 52px;
  padding: 6px 4px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.stamp-date-btn:hover {
  background: #f0f4ff;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.stamp-date-btn.is-active {
  background: #172554;
  color: #ffffff;
  border-color: #172554;
  box-shadow: 0 2px 6px rgba(23, 37, 84, 0.25);
}

.stamp-date-btn.is-today {
  position: relative;
}

.stamp-date-btn.is-today::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}

.stamp-date-btn.is-active.is-today::after {
  background: #60a5fa;
}

/* 스탬프 상태 배지/칩 */
.stamp-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.stamp-approved,
.stamp-chip.chip-approved {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.stamp-chip.chip-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.stamp-chip.chip-rejected {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.stamp-chip.chip-empty {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.stamp-chip.chip-na {
  color: #94a3b8;
  font-weight: 500;
}

.stamp-chip .chip-sym { margin-right: 3px; }

/* 모바일: 주간 스트립 (표 대신 같은 데이터 렌더, CSS가 전환) */
.precheck-strip { display: none; }
@media (max-width: 719px) {
  .precheck-stamps { display: none; }
  .precheck-strip {
    display: flex;
    gap: 4px;
  }
}
.strip-day { display: grid; gap: 4px; justify-items: center; flex: 1 1 0; min-width: 0; }
.strip-day-btn {
  display: grid;
  gap: 1px;
  justify-items: center;
  width: 100%;
  padding: 5px 2px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
.strip-day-btn .strip-date { color: #334155; }
.strip-day-btn .strip-dow { color: var(--muted); font-size: 0.68rem; }
.strip-day.is-active .strip-day-btn {
  background: #172554;
  border-color: #172554;
  box-shadow: 0 2px 6px rgba(23, 37, 84, 0.25);
}
.strip-day.is-active .strip-date { color: #ffffff; }
.strip-day.is-active .strip-dow { color: #c7d2fe; }
.strip-day.is-today .strip-day-btn { box-shadow: inset 0 2px 0 #3b82f6; }
.strip-day.is-active.is-today .strip-day-btn {
  box-shadow: inset 0 2px 0 #60a5fa, 0 2px 6px rgba(23, 37, 84, 0.25);
}
.strip-dots { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; gap: 2px; }
.strip-dot {
  display: inline-grid;
  place-items: center;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.strip-dot.chip-approved { background: #047857; color: #ffffff; }
.strip-dot.chip-pending { background: #f59e0b; color: #78350f; }
.strip-dot.chip-rejected { background: #dc2626; color: #ffffff; }
.strip-dot.chip-empty { background: #ffffff; border: 1.5px solid #94a3b8; color: #64748b; }
.strip-dot.chip-na { background: #f1f5f9; color: #94a3b8; }

/* 모바일 스트립 상태 범례 */
.strip-legend {
  display: none;
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
@media (max-width: 719px) {
  .strip-legend { display: block; }
}

/* 5. 항목별 검토 카드 그리드 */
.precheck-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.precheck-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.precheck-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.precheck-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.precheck-card-head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.precheck-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.precheck-status-badge.badge-approved {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.precheck-status-badge.badge-auto-approved {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.precheck-status-badge.badge-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.precheck-status-badge.badge-rejected {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.precheck-status-badge.badge-empty {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.precheck-status-badge.badge-not-required {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* 규칙 미설정 / 제출 대상 아님 카드 음영 스타일 */
.precheck-card.is-not-required {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  box-shadow: none;
}

.precheck-card.is-not-required .precheck-card-head h4 {
  color: #64748b;
}

.precheck-empty-gallery.not-required {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

/* 음영 카드(제출 의무 없음) 안내 — 카드별 문구 대신 패널에 1회 표기 */
.precheck-dim-legend {
  display: block;
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* 갤러리 영역 */
.precheck-gallery-wrap {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.precheck-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.precheck-gallery,
.precheck-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.precheck-photo {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.precheck-photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.precheck-photo::after {
  content: "🔍";
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 6px;
  padding: 2px 5px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.precheck-photo:hover::after {
  opacity: 1;
}

.precheck-gallery img,
.precheck-preview img {
  width: 105px;
  height: 105px;
  object-fit: cover;
  display: block;
}
.precheck-preview > div { display: grid; gap: 6px; width: 105px; }

.precheck-photo-form [data-photo-row] { display: grid; gap: 8px; min-width: 0; }
.precheck-photo-form input[type="file"] { display: block; width: 100%; min-width: 0; }
.precheck-photo-form [data-photo-row] img { width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; }

.precheck-empty-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
}

.precheck-empty-gallery .empty-icon {
  font-size: 1.6rem;
}

/* 승인 / 반려 조작 영역 */
.precheck-review-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.precheck-reject-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
}

.precheck-reject-box label {
  font-size: 0.82rem;
  color: #9a3412;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.precheck-reject-box input {
  padding: 8px 10px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  font-size: 0.85rem;
}

.precheck-btn-reject {
  align-self: flex-end;
  padding: 6px 12px;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 8px;
  border: 0;
  background: #fee2e2;
  color: #b91c1c;
  cursor: pointer;
  transition: all 0.15s ease;
}

.precheck-btn-reject:hover:not(:disabled) {
  background: #ef4444;
  color: #ffffff;
}

.precheck-btn-reject:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 6. 자정 마감 유보 섹션 */
.precheck-deferred {
  border: 1px solid #f59e0b;
  background: #fffdf5;
  border-radius: 16px;
  padding: 18px;
  margin-top: 18px;
}

.precheck-deferred h4 {
  margin: 0 0 12px;
  color: #b45309;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.precheck-deferred-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 12px;
  margin-top: 10px;
}

.precheck-deferred-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* 7. 과거 확인 기록 */
.precheck-history-details {
  margin-top: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.precheck-history-details summary {
  padding: 12px 16px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  background: #f1f5f9;
  user-select: none;
}

.precheck-history-content {
  padding: 16px;
  background: #ffffff;
}

/* 8. 사진 정보와 화면 맞춤 확대 */
.precheck-gallery { align-items: start; }
.precheck-photo-item { margin: 0; width: min(100%, 180px); min-width: 0; }
.precheck-photo-item .precheck-photo { display: block; width: 100%; }
.precheck-photo-item .precheck-photo img { width: 100%; height: 132px; object-fit: contain; background: #f1f5f9; }
.precheck-photo-open { display: block; padding: 5px 8px; font-size: .8rem; background: #f1f5f9; }
.precheck-photo-info { margin: 8px 0 0; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.precheck-photo-info > div { margin: 5px 0; }
.precheck-photo-info dt { color: #475569; font-weight: 700; }
.precheck-photo-info dd { margin: 0; color: #0f172a; }
.precheck-lightbox { box-sizing: border-box; width: calc(100vw - 20px); height: calc(100dvh - 20px); max-width: 1440px; max-height: calc(100dvh - 20px); padding: 12px; border: 0; border-radius: 12px; background: white; }
.precheck-lightbox::backdrop { background: rgba(15, 23, 42, .78); }
.precheck-lightbox-content { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.precheck-lightbox-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.precheck-lightbox-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.precheck-lightbox-tools button { min-height: 44px; padding: 6px 10px; }
.precheck-lightbox-viewport { flex: 1 1 0; min-height: 100px; overflow: auto; overscroll-behavior: contain; background: #e2e8f0; border-radius: 6px; }
.precheck-lightbox-stage { display: grid; place-items: center; }
.precheck-lightbox .precheck-lightbox-stage img { display: block; max-width: none; max-height: none; object-fit: contain; }
.precheck-lightbox-info { flex: 0 0 auto; max-height: 25dvh; overflow: auto; }
.precheck-lightbox-info .precheck-photo-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 6px 16px; margin: 0; }
.precheck-exemption-requests { margin: 10px 0; padding: 8px; border-radius: 8px; background: #faf5ff; }
.precheck-exemption-requests p { margin: 4px 0; overflow-wrap: anywhere; }
.precheck-exemption-requests button { min-height: 44px; }
.precheck-request-queue { margin: 16px 0; }
.precheck-request-item { padding: 14px; margin: 10px 0; border: 1px solid #d8b4fe; border-radius: 10px; overflow-wrap: anywhere; }
.precheck-request-item textarea { width: 100%; box-sizing: border-box; }
.precheck-request-history { margin-top: 10px; }
.precheck-request-history summary { cursor: pointer; color: #64748b; font-size: 0.92rem; padding: 6px 0; }

/* 9. 학생 화면 전용 (#pc-precheck) */
#pc-precheck {
  margin: 0;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

/* 요약 바 (접기/펼치기) */
.precheck-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.precheck-summary-date { font-weight: 800; color: var(--ink); }
.precheck-summary [data-toggle] { margin-left: auto; }
.precheck-body { margin-top: 12px; }

.precheck-pickers {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.precheck-pickers button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: #eef2ff;
  color: var(--primary);
  border: 1px solid #c7d2fe;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.precheck-pickers button:hover {
  background: #e0e7ff;
}

/* 파일 입력: 시각적으로 숨기되 포커스·보조기술 접근 유지 (sr-only) */
.precheck-pickers input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.precheck-pickers button:focus-visible {
  outline: 3px solid rgba(79, 70, 229, .18);
  outline-offset: 2px;
}

.precheck-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.precheck-student-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.precheck-upload-drafts {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  font-size: 0.88rem;
}

.chip-exempt, .badge-exempt {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}
.precheck-exemption-reason {
  background: #faf5ff;
  color: #6b21a8;
  border-left: 3px solid #c084fc;
  border-radius: 6px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}
.precheck-exemption-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.precheck-exemption-actions button, .precheck-review-actions > button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.precheck-exemption-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid #d8b4fe;
  border-radius: 16px;
  padding: 20px;
}
.precheck-exemption-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.precheck-exemption-dialog fieldset { margin: 12px 0; border: 1px solid #e2e8f0; border-radius: 8px; }
.precheck-exemption-dialog fieldset { min-width: 0; }
.precheck-exemption-dialog fieldset label { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.precheck-exemption-dialog input[type="checkbox"] { width: auto; flex-shrink: 0; }
.precheck-exemption-dialog textarea { width: 100%; box-sizing: border-box; }
.precheck-exemption-dialog select { width: 100%; min-width: 0; }
.precheck-refund-preview { white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 719px) {
  #tab-pc-precheck .precheck-cards { grid-template-columns: minmax(0, 1fr); }
  #tab-pc-precheck .precheck-child-card { padding: 14px; }
  #tab-pc-precheck .precheck-card { padding: 14px; }
  .precheck-head-actions { min-width: 0; max-width: 100%; }
  .precheck-date-select-wrap { flex-wrap: wrap; max-width: 100%; }
  .precheck-bulk-panel { padding: 14px; }
  .precheck-exemption-actions > button { flex: 1 1 180px; }
}

.precheck-photo-policy { margin: 12px 0; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; }
.precheck-photo-policy label { display: flex; align-items: center; gap: 8px; }
.precheck-photo-policy input[type="checkbox"] { width: auto; }

.precheck-revoke-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 22px;
  background: #ffffff;
}
.precheck-revoke-dialog::backdrop { background: rgba(15, 23, 42, .5); }
.precheck-revoke-dialog form { display: flex; flex-direction: column; gap: 14px; }
.precheck-revoke-head h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 900; color: #991b1b; }
.precheck-revoke-subtitle { margin: 0; font-size: 0.92rem; font-weight: 700; color: #334155; }
.precheck-revoke-section h4 { margin: 0 0 8px; font-size: 0.88rem; font-weight: 800; color: #475569; }
.precheck-revoke-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}
.precheck-revoke-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.precheck-revoke-item:last-child { border-bottom: 0; }
.precheck-revoke-item strong { display: block; font-size: 0.9rem; color: #0f172a; }
.precheck-revoke-item small { display: block; font-size: 0.8rem; color: #64748b; margin-top: 2px; }
.precheck-revoke-amount { font-weight: 900; color: #b91c1c; white-space: nowrap; font-size: 0.95rem; }
.precheck-revoke-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
  font-weight: 800;
}
.precheck-revoke-total strong { font-size: 1.35rem; font-weight: 900; }
.precheck-revoke-reason-wrap { display: flex; flex-direction: column; gap: 8px; }
.precheck-revoke-reason-label { font-size: 0.88rem; font-weight: 800; color: #334155; }
.precheck-reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.precheck-reason-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.precheck-reason-chip.is-selected {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}
.precheck-revoke-dialog input[name="reason"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
}
.precheck-revoke-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.precheck-revoke-actions button { min-height: 44px; }
@media (max-width: 719px) {
  .precheck-revoke-actions > button { flex: 1 1 130px; }
}
