/* 커스텀 신청폼(폼 빌더) 공용 스타일 — 고객 입력 / 관리자 미리보기·상세·인쇄 (2026-09-29) */

.cf-inner { max-width: 820px; }
.cf-head-card { border-top: 6px solid #1a4fa0; }
.cf-title { margin: 6px 0 8px; font-size: 1.6rem; letter-spacing: -.02em; }
.cf-desc { color: #55646c; line-height: 1.7; margin: 0 0 6px; }
.cf-period { font-size: .85rem; color: #64748b; margin: 4px 0 0; }
.cf-head-content, .cf-foot-content { margin-top: 14px; }
.cf-foot-card { margin-top: 16px; }
.cf-required-note { font-size: .82rem; color: #64748b; margin: 18px 4px 10px; }
.cf-req { color: #dc2626; font-weight: 700; }

/* 리치 컨텐츠(에디터 HTML) */
.cf-rich { line-height: 1.8; font-size: .95rem; word-break: break-word; }
.cf-rich img { max-width: 100%; height: auto; }
.cf-rich p { margin: 0 0 .6em; }
.cf-rich ul, .cf-rich ol { padding-left: 22px; margin: 0 0 .6em; }
.cf-rich blockquote { border-left: 4px solid #cbd5e1; margin: 0 0 .6em; padding: 4px 12px; color: #475569; }
.cf-rich h1, .cf-rich h2, .cf-rich h3 { margin: .4em 0 .4em; line-height: 1.35; }
.cf-rich .ql-align-center { text-align: center; }
.cf-rich .ql-align-right { text-align: right; }
.cf-rich .ql-align-justify { text-align: justify; }
.cf-rich .ql-indent-1 { padding-left: 3em; }
.cf-rich .ql-indent-2 { padding-left: 6em; }

/* 구분 제목 · 안내문 */
.cf-sec { margin: 26px 4px 12px; padding: 0 0 8px; border-bottom: 2px solid #1a4fa0; }
.cf-sec-title { margin: 0; font-size: 1.08rem; font-weight: 700; color: #1a4fa0; letter-spacing: -.01em; }
.cf-sec-desc { margin: 6px 0 0; font-size: .86rem; color: #64748b; line-height: 1.6; }
.cf-answer-table .cf-sec-row th { background: #dfe7f2; color: #1a4fa0; text-align: left; font-weight: 700; }
.cf-answer-table .cf-sec-row-desc { font-weight: 400; color: #64748b; font-size: .82rem; margin-left: 8px; }

/* 질문 카드 */
.cf-q { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; transition: box-shadow .15s, border-color .15s; }
.cf-q:focus-within { border-color: #1a4fa0; box-shadow: 0 0 0 3px rgba(26, 79, 160, .12); }
.cf-q--error { border-color: #dc2626; background: #fff8f8; }
.cf-q-head { margin-bottom: 12px; }
.cf-q-label { display: block; font-weight: 700; font-size: 1rem; color: #1f2937; line-height: 1.5; }
.cf-q-no { color: #1a4fa0; margin-right: 2px; }
.cf-q-desc { margin: 6px 0 0; font-size: .86rem; color: #64748b; line-height: 1.6; }
.cf-q-auto { margin: 6px 0 0; font-size: .82rem; color: #1872b7; }
.cf-q-auto::before { content: "✓ "; }
.cf-q-error { margin: 8px 0 0; font-size: .84rem; color: #dc2626; font-weight: 600; }

.cf-input { width: 100%; max-width: 100%; box-sizing: border-box; border: 1.5px solid #cbd5e1; border-radius: 9px; padding: 11px 14px; font: inherit; font-size: .95rem; background: #fff; color: #1f2937; outline: none; transition: border-color .15s, box-shadow .15s; }
.cf-input:focus { border-color: #1a4fa0; box-shadow: 0 0 0 3px rgba(26, 79, 160, .12); }
.cf-input::placeholder { color: #9ca3af; }
.cf-textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.cf-select { cursor: pointer; }
.cf-q input[type="date"].cf-input { max-width: 260px; }
.cf-q input[type="number"].cf-input { max-width: 260px; }

.cf-opts { display: flex; flex-direction: column; gap: 8px; }
.cf-opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: .95rem; line-height: 1.5; color: #1f2937; transition: border-color .15s, background .15s; }
.cf-opt:hover { border-color: #93a8d0; background: #f8fafc; }
.cf-opt input { margin: 4px 0 0; flex: 0 0 auto; width: 17px; height: 17px; accent-color: #1a4fa0; }
.cf-opt input:checked + span { font-weight: 600; color: #1a4fa0; }

.cf-file { display: block; width: 100%; font-size: .9rem; padding: 10px; border: 1.5px dashed #cbd5e1; border-radius: 9px; background: #f8fafc; }
.cf-file-hint { margin: 6px 0 0; font-size: .8rem; color: #64748b; }

.cf-editor-host { min-height: 180px; }
.cf-editor .ql-toolbar { border-radius: 9px 9px 0 0; border-color: #cbd5e1 !important; background: #f8fafc; }
.cf-editor .ql-container { border-radius: 0 0 9px 9px; border-color: #cbd5e1 !important; font-family: inherit; font-size: .95rem; }
.cf-editor .ql-editor { min-height: 180px; line-height: 1.7; }
.cf-editor .ql-editor.ql-blank::before { color: #9ca3af; font-style: normal; }

.cf-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.cf-errors ul { margin: 6px 0 0; padding-left: 18px; }
.cf-errors p { margin: 4px 0 0; font-size: .9rem; }
.cf-actions { margin-top: 24px; }
.cf-complete-no { font-size: .95rem; color: #55646c; margin: 6px 0 12px; }

/* 상세(관리자) — 답변 표 */
.cf-answer-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cf-answer-table th, .cf-answer-table td { border: 1px solid #d5dde8; padding: 10px 12px; vertical-align: top; text-align: left; }
.cf-answer-table th { background: #f1f5f9; width: 32%; font-weight: 600; color: #1f2937; }
.cf-answer-table td { background: #fff; color: #1f2937; line-height: 1.6; word-break: break-word; }
.cf-answer-table .cf-no { color: #64748b; font-weight: 400; margin-right: 6px; font-size: .82rem; }
.cf-empty { color: #94a3b8; }
.cf-multi, .cf-files { margin: 0; padding-left: 18px; }
.cf-file-size { color: #94a3b8; font-size: .82rem; }
.cf-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cf-detail-grid { display: block; } .cf-side { margin-top: 16px; } }
.cf-print-head h2 { font-size: 1.15rem; margin: 0 0 4px; }
.cf-print-meta { font-size: .82rem; color: #64748b; margin-bottom: 14px; }

/* 미리보기(관리자) — 입력 비활성 표시 */
.cf-preview .cf-q { opacity: .96; }
.cf-preview .cf-input, .cf-preview .cf-opt { cursor: not-allowed; }

@media (max-width: 720px) {
    .cf-q { padding: 16px; border-radius: 12px; }
    .cf-title { font-size: 1.3rem; }
}

/* 인쇄 */
@media print {
    .admin-sidebar, .admin-topbar, .cf-side, .cf-actions-bar, .site-header, .site-footer, .subnav, .flash-wrap, .breadcrumb { display: none !important; }
    .admin-content { margin: 0 !important; padding: 0 !important; }
    .admin-page { padding: 0 !important; }
    .cf-detail-grid { display: block !important; }
    .cf-print-area { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
    .cf-answer-table th, .cf-answer-table td { border-color: #000; }
    body { background: #fff; }
}

/* ── 신청자 본인 확인 · 내 신청 목록 · 수정 (2026-10-12) ─────────────────── */
.cf-mine-link { margin: 14px 0 0; font-size: .9rem; }
.cf-mine-link a { color: #1872b7; text-decoration: none; }
.cf-mine-link a:hover { text-decoration: underline; }
.cf-edit-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #eef6fc; color: #1a4fa0; font-size: .9rem; }
.cf-verify-card, .cf-mine-card { margin-top: 18px; }
.cf-verify-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.15rem; }
.cf-step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1a4fa0; color: #fff; font-size: .85rem; font-weight: 700; }
.cf-verify-help { margin: 0 0 16px; color: #55646c; font-size: .92rem; }
.cf-verify-row { display: flex; gap: 10px; align-items: stretch; max-width: 460px; }
.cf-verify-row .cf-input { flex: 1 1 auto; min-width: 0; }
.cf-verify-row .button { flex: 0 0 auto; white-space: nowrap; }
.cf-code { font-size: 1.3rem; letter-spacing: .25em; text-align: center; }
.cf-verify-resend { display: flex; gap: 18px; margin-top: 12px; }
.cf-verify-resend .link-arrow { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: #1872b7; }
.cf-mine-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cf-mine-head h3 { margin: 0; font-size: 1.1rem; }
.cf-mine-table td, .cf-mine-table th { white-space: nowrap; }
.cf-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #fff4d6; color: #8a5a00; }
.cf-status--confirmed { background: #dcfce7; color: #166534; }
.cf-status--cancelled { background: #e5e7eb; color: #4b5563; }
.cf-muted { color: #94a3b8; font-size: .85rem; }
.cf-file-kept { margin: 0 0 8px; padding: 0; list-style: none; }
.cf-file-kept li { padding: 6px 10px; border: 1px dashed #cbd5e1; border-radius: 8px; margin-bottom: 4px; font-size: .88rem; }
.cf-file-kept small { color: #64748b; }
@media (max-width: 560px) {
  .cf-verify-row { flex-direction: column; }
  .cf-verify-row .button { width: 100%; }
}
.cf-ta-r { text-align: right; }

/* ── 항목 2열 배치 (2026-10-12): 절반 폭 항목은 한 칸, 전체 폭·구분 제목은 두 칸 ─── */
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; align-items: start; }
.cf-grid > .cf-q, .cf-grid > .cf-sec { grid-column: 1 / -1; }
.cf-grid > .cf-q--half { grid-column: auto; }
.cf-q--half input[type="date"].cf-input, .cf-q--half input[type="number"].cf-input { max-width: none; }
@media (max-width: 700px) {
  .cf-grid > .cf-q--half { grid-column: 1 / -1; }
}
@media print {
  .cf-grid { display: block; }
}

/* ── 개인정보 동의 고정 블록 (2026-10-12) ───────────────────────────────── */
.cf-consent-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 10px; }
.cf-consent-table th, .cf-consent-table td { padding: 9px 12px; border: 1px solid #dbe3ee; vertical-align: top; text-align: left; }
.cf-consent-table th { width: 140px; background: #f1f5fb; color: #1a4fa0; font-weight: 700; white-space: nowrap; }
.cf-consent-note { margin: 0 0 12px; font-size: .82rem; color: #64748b; line-height: 1.6; }
.cf-consent-agree { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border: 1px solid #c7d6ea; border-radius: 10px; background: #f7faff; font-weight: 600; cursor: pointer; }
.cf-consent-agree input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
@media (max-width: 560px) {
  .cf-consent-table th { width: 100px; white-space: normal; }
}
