/* pilgrimage.css — 순례 탐방 앱 전용 스타일 */

/* ── 서브페이지 배너 ── */
.pil-sub-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #8b7355 0%, #a08c6a 40%, #c4a265 100%);
    padding: 18px 30px;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}
.pil-sub-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect fill="rgba(255,255,255,0.03)" width="80" height="80"/><path d="M0 80L80 0" stroke="rgba(255,255,255,0.04)" stroke-width="1"/></svg>') repeat;
    pointer-events: none;
}
.pil-sub-banner-bottom {
    margin-top: 30px;
    margin-bottom: 20px;
}
.pil-sub-banner-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.pil-sub-banner-logo img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}
.pil-sub-banner-logo img[style*="display:none"] + .pil-sub-banner-icon,
.pil-sub-banner-logo .pil-sub-banner-icon {
    display: flex;
}
/* Font Awesome fallback when no logo image */
.pil-sub-banner-logo::after {
    content: '\f00d';
    font-family: 'FontAwesome';
    font-size: 0;
}
.pil-sub-banner-logo img[src] ~ .fa { display: none; }
.pil-sub-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}
.pil-sub-banner-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.2);
    letter-spacing: 0.5px;
}
.pil-sub-banner-sub {
    font-size: 13px;
    color: rgba(255,255,255,.85);
    font-weight: 400;
    letter-spacing: 0.3px;
}
@media (max-width: 768px) {
    .pil-sub-banner {
        padding: 14px 16px;
        gap: 14px;
    }
    .pil-sub-banner-logo {
        width: 44px;
        height: 44px;
    }
    .pil-sub-banner-logo img {
        max-width: 44px;
        max-height: 44px;
    }
    .pil-sub-banner-title {
        font-size: 15px;
    }
    .pil-sub-banner-sub {
        font-size: 11px;
    }
}

/* ── 버튼 네비게이션 ── */
.pil-nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 12px 0;
}
.pil-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.pil-nav-btn:hover {
    background: #e8e4de;
    color: #28201a;
    border-color: #c0b8a8;
    text-decoration: none;
}
.pil-nav-btn.active {
    background: #28201a;
    color: #fff;
    border-color: #28201a;
    box-shadow: 0 2px 6px rgba(40,32,26,.25);
}
.pil-nav-btn.active:hover {
    background: #3d342c;
    color: #fff;
}
.pil-nav-btn i {
    font-size: 13px;
}
.pil-nav-btn-admin {
    border-color: #e67e22;
    color: #e67e22;
}
.pil-nav-btn-admin:hover {
    background: #fdf2e9;
    border-color: #e67e22;
    color: #d35400;
}
.pil-nav-btn-admin.active {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

/* ── 콘텐츠 영역 ── */
.pil-content {
    padding: 0 5px;
}

/* ── 코스 카드 그리드 ── */
.pil-course-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}
.pil-course-card {
    flex: 0 0 calc(33.333% - 24px);
    margin: 12px;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .25s, box-shadow .25s;
    position: relative;
}
.pil-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.pil-course-card > a {
    text-decoration: none;
    color: inherit;
    display: block;
}
/* 이미지 영역 */
.pil-course-card .card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 210px;
}
.pil-course-card .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.pil-course-card:hover .card-img {
    transform: scale(1.06);
}
.pil-course-card .card-img-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,.25));
    pointer-events: none;
}
.pil-course-card .card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4c5a9 0%, #b8a88a 50%, #a09070 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 56px;
}
/* 모집중 배지 */
.pil-course-card .card-badge {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 2;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
/* 카드 본문 */
.pil-course-card .card-body {
    padding: 16px 18px 12px;
}
.pil-course-card .card-body h4 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #28201a;
    line-height: 1.3;
}
.pil-course-card .card-summary {
    margin: 0 0 10px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}
.pil-course-card .card-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #888;
}
.pil-course-card .card-info .card-duration {
    color: #666;
}
.pil-course-card .card-info .card-seats {
    font-weight: 600;
}
/* 카드 하단 */
.pil-course-card .card-footer {
    padding: 12px 18px;
    border-top: 1px solid #f0ede8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pil-course-card .card-price {
    font-size: 16px;
    font-weight: 700;
    color: #c0872e;
}
.pil-course-card .card-price .fa-won { font-size: 13px; }
.pil-course-card .card-more {
    font-size: 12px;
    color: #aaa;
    transition: color .2s;
}
.pil-course-card:hover .card-more {
    color: #c0872e;
}
/* 관리자 수정 버튼 */
.pil-course-card .card-edit-btn {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 3;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    transition: background .2s, color .2s;
}
.pil-course-card .card-edit-btn:hover {
    background: #28201a;
    color: #fff;
}

@media (max-width: 768px) {
    .pil-course-card {
        flex: 0 0 calc(50% - 24px);
    }
}
@media (max-width: 480px) {
    .pil-course-grid { margin: 0; }
    .pil-course-card {
        flex: 0 0 100%;
        margin: 10px 0;
    }
}

/* ── 코스 상세 ── */
.pil-course-detail .course-header {
    margin-bottom: 25px;
}
.pil-course-detail .course-header h3 {
    margin: 0 0 10px;
    color: #28201a;
    font-size: 24px;
}
.pil-course-detail .course-header .course-summary {
    color: #666;
    font-size: 15px;
}
.pil-course-detail .course-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
}
.pil-course-detail .course-info-table th {
    width: 120px;
    background: #f8f9fa;
    font-weight: 600;
    vertical-align: middle;
}
/* ── 일정 섹션 구분선 ── */
.pil-section-divider {
    position: relative;
    margin: 50px 0 40px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #888 15%, #888 85%, transparent);
    border-radius: 2px;
}
.pil-section-divider::before {
    content: '\f0ec';
    font-family: FontAwesome;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #666;
    padding: 0 18px;
    font-size: 16px;
    letter-spacing: 4px;
}

/* ── 일차별 이미지 ── */
.pil-day-img-row td {
    padding: 12px 0 !important;
    border: none !important;
    background: #f8f9fa;
}
.pil-day-photo {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 4px;
}
.pil-day-photo img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.pil-day-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,.55));
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .pil-day-photo img { height: auto; max-height: 160px; }
}

.pil-course-detail .course-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
}
.pil-course-detail .course-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.pil-course-detail .course-gallery .gallery-item {
    margin: 0;
}
.pil-course-detail .course-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.pil-course-detail .course-gallery figcaption {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    text-align: center;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .pil-course-detail .course-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ── 보기 모드: 좌우 그리드 행 ── */
.pil-view-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}
.pil-view-row:last-child {
    border-bottom: none;
}
.pil-view-row-top {
    align-items: flex-start;
}
.pil-view-label {
    flex: 0 0 130px;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}
.pil-view-value {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}
.pil-view-title {
    font-size: 18px;
    font-weight: 700;
    color: #28201a;
}
.pil-view-price {
    font-size: 16px;
    font-weight: 700;
    color: #c0872e;
}
.pil-rich-content {
    line-height: 1.8;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* ── 일정 목록 ── */
.pil-schedule-table {
    width: 100%;
}
.pil-schedule-table th {
    background: #28201a;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    text-align: center;
}
.pil-schedule-table td {
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}
.pil-schedule-table tr:hover {
    background: #fafafa;
}

/* ── 상태 뱃지 ── */
.pil-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.pil-badge-open { background: #27ae60; }
.pil-badge-closed { background: #e67e22; }
.pil-badge-confirmed { background: #2980b9; }
.pil-badge-departed { background: #8e44ad; }
.pil-badge-completed { background: #7f8c8d; }
.pil-badge-cancelled { background: #e74c3c; }
.pil-badge-submitted { background: #3498db; }
.pil-badge-contracting { background: #e67e22; }
.pil-badge-contracted { background: #27ae60; }
.pil-badge-touring { background: #8e44ad; }
.pil-badge-reviewed { background: #7f8c8d; }

/* 잔여석 컬러 */
.seats-few { color: #e74c3c; font-weight: bold; }
.seats-ok { color: #27ae60; }
.seats-full { color: #95a5a6; font-weight: bold; }

/* ── 신청 버튼 ── */
.pil-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
}
.pil-btn-primary {
    background: #28201a;
    color: #fff;
}
.pil-btn-primary:hover {
    background: #3d342c;
    color: #fff;
    text-decoration: none;
}
.pil-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}
.pil-btn-secondary:hover {
    background: #e9ecef;
    text-decoration: none;
}
.pil-btn-danger {
    background: #e74c3c;
    color: #fff;
}
.pil-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ── 신청서 폼 (기존 board_pilgrimage.css 확장) ── */
.pil-form .pil-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px 20px 5px;
    margin-bottom: 20px;
    background: #fff;
}
.pil-form .pil-section legend {
    font-size: 16px;
    font-weight: bold;
    padding: 0 10px;
    width: auto;
    border: none;
    margin-bottom: 10px;
    color: #333;
}
.pil-form label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: block;
}
.pil-form label.required::after {
    content: ' *';
    color: #e74c3c;
}
.pil-form .btn_confirm {
    text-align: center;
    margin: 30px 0 20px;
}
.pil-form .errorlist {
    list-style: none;
    padding: 0;
    margin: 2px 0 0;
    color: #e74c3c;
    font-size: 12px;
}

/* 개인/단체 토글 */
.pil-type-toggle {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}
.pil-type-toggle label {
    display: inline-block;
    margin: 0 15px;
    font-weight: normal;
    cursor: pointer;
    font-size: 15px;
}
.pil-type-toggle input[type="radio"] {
    margin-right: 5px;
}

/* 단체 참가자 formset */
.pil-group-section {
    display: none;
}
.pil-group-section.show {
    display: block;
}
.pil-group-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}
.pil-group-row .form-control {
    flex: 1;
}
.pil-group-row .pil-group-num {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: #666;
}

/* 개인정보 동의 */
.pil-agree {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 10px;
}
.pil-agree label {
    font-weight: normal !important;
    cursor: pointer;
}

/* ── 5단계 진행바 ── */
.pil-progress {
    display: flex;
    margin: 25px 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.pil-progress li {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 12px;
    color: #999;
}
.pil-progress li::before {
    content: counter(step);
    counter-increment: step;
    display: block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    margin: 0 auto 6px;
    font-weight: bold;
    position: relative;
    z-index: 1;
}
.pil-progress li::after {
    content: '';
    position: absolute;
    top: 16px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}
.pil-progress li:first-child::after {
    display: none;
}
.pil-progress li.active::before {
    background: #28201a;
    color: #fff;
}
.pil-progress li.active::after {
    background: #28201a;
}
.pil-progress li.active {
    color: #28201a;
    font-weight: 600;
}
.pil-progress li.cancelled::before {
    background: #e74c3c;
    color: #fff;
}
.pil-progress li.cancelled {
    color: #e74c3c;
    font-weight: 600;
}

/* ── 신청 상세 카드 ── */
.pil-detail-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    background: #fff;
}
.pil-detail-card h3 {
    background: #28201a;
    color: #fff;
    margin: 0;
    padding: 10px 15px;
    font-size: 15px;
    border-radius: 6px 6px 0 0;
}
.pil-detail-card h3 i {
    margin-right: 8px;
}
.pil-detail-card .card-body {
    padding: 15px;
}
.pil-info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.pil-info-row:last-child {
    border-bottom: none;
}
.pil-info-label {
    min-width: 120px;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}
.pil-info-value {
    flex: 1;
    font-size: 13px;
}

/* ── 내 신청 목록 ── */
.pil-app-list {
    list-style: none;
    padding: 0;
}
.pil-app-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background .15s;
}
.pil-app-item:hover {
    background: #fafafa;
}
.pil-app-item .app-info h4 {
    margin: 0 0 5px;
    font-size: 15px;
}
.pil-app-item .app-info h4 a {
    color: #28201a;
}
.pil-app-item .app-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}
.pil-app-item .app-status {
    text-align: right;
}

/* ── 상담 문의 ── */
.pil-inquiry-table {
    width: 100%;
}
.pil-inquiry-table th {
    background: #f8f9fa;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #28201a;
}
.pil-inquiry-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}
.pil-inquiry-table tr:hover {
    background: #fafafa;
}
.pil-inquiry-answer {
    background: #f0f7ff;
    border-left: 3px solid #2980b9;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 4px 4px 0;
}
.pil-inquiry-answer h4 {
    color: #2980b9;
    margin: 0 0 10px;
    font-size: 14px;
}

/* ── 신청 완료 ── */
.pil-complete {
    text-align: center;
    padding: 40px 20px;
}
.pil-complete .check-icon {
    font-size: 60px;
    color: #27ae60;
    margin-bottom: 20px;
}
.pil-complete h3 {
    color: #28201a;
    margin-bottom: 15px;
}
.pil-complete p {
    color: #666;
    font-size: 15px;
    margin-bottom: 5px;
}
.pil-complete .btn-group {
    margin-top: 30px;
}

/* ── 빈 상태 ── */
.pil-empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}
.pil-empty i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

/* ── 탐방 신청 입구 (apply_select) ── */
.apply-select-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}
.apply-select-header h3 {
    color: #28201a;
    font-size: 22px;
    margin: 0 0 8px;
}
.apply-select-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}
.apply-schedule-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s;
}
.apply-schedule-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.schedule-card-header {
    background: #28201a;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.schedule-card-header .course-name {
    font-size: 17px;
    font-weight: 600;
}
.schedule-card-body {
    padding: 20px;
}
.schedule-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.schedule-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 160px;
}
.schedule-info-item > i {
    color: #28201a;
    font-size: 16px;
    margin-top: 2px;
}
.schedule-info-item .info-label {
    display: block;
    font-size: 11px;
    color: #999;
}
.schedule-info-item .info-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.schedule-info-item .info-value.price {
    color: #c0392b;
}
.schedule-course-summary {
    margin: 15px 0 0;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}
.schedule-card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@media (max-width: 480px) {
    .schedule-info-grid {
        flex-direction: column;
        gap: 10px;
    }
    .schedule-card-footer {
        flex-direction: column;
        gap: 10px;
    }
    .schedule-card-footer .pil-btn {
        width: 100%;
        text-align: center;
    }
}

/* ══════════════════════════════════════════════════════════════
   3단계 위자드 (PRD: 신청서 단계별 입력)
   ══════════════════════════════════════════════════════════════ */

/* ── 위자드 단계 인디케이터 ── */
.pil-wizard-steps {
    display: flex;
    margin: 25px 0;
    padding: 0;
    list-style: none;
}
.pil-wizard-steps li {
    flex: 1;
    text-align: center;
    position: relative;
    color: #999;
    cursor: default;
}
.pil-wizard-steps li .step-num {
    display: block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    margin: 0 auto 6px;
    font-weight: bold;
    font-size: 15px;
    position: relative;
    z-index: 1;
}
.pil-wizard-steps li .step-label {
    display: block;
    font-size: 12px;
}
.pil-wizard-steps li::after {
    content: '';
    position: absolute;
    top: 18px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}
.pil-wizard-steps li:first-child::after {
    display: none;
}
.pil-wizard-steps li.active .step-num {
    background: #28201a;
    color: #fff;
}
.pil-wizard-steps li.active .step-label {
    color: #28201a;
    font-weight: 600;
}
.pil-wizard-steps li.active::after {
    background: #28201a;
}
.pil-wizard-steps li.completed .step-num {
    background: #27ae60;
    color: #fff;
}
.pil-wizard-steps li.completed::after {
    background: #27ae60;
}
.pil-wizard-steps li.completed .step-label {
    color: #27ae60;
}

/* ── 위자드 네비게이션 버튼 ── */
.pil-wizard-nav {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* ── 전자서명 영역 ── */
.pil-signature-area {
    position: relative;
    display: inline-block;
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    padding: 5px;
}
.pil-signature-area canvas {
    display: block;
    width: 400px;
    height: 200px;
    border-radius: 4px;
    cursor: crosshair;
}
.pil-signature-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #bbb;
    font-size: 16px;
    pointer-events: none;
}

/* ── 증명사진 ── */
.pil-photo-guidelines {
    margin-top: 5px;
    color: #888;
}
.pil-photo-preview img {
    max-width: 140px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ── 알레르기 체크박스 그리드 ── */
.pil-allergy-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pil-allergy-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 13px;
    transition: background .15s, border-color .15s;
}
.pil-allergy-item:hover {
    background: #f0f0f0;
}
.pil-allergy-item input[type="checkbox"] {
    margin-right: 3px;
}

/* ── 숙박 옵션 ── */
.pil-room-options {
    display: flex;
    gap: 15px;
}
.pil-room-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: normal !important;
    transition: border-color .15s;
}
.pil-room-option input[type="radio"] {
    margin-right: 5px;
}

/* ── 여권만료 경고 ── */
.pil-passport-warning {
    margin-top: 5px;
    padding: 8px 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 12px;
}

/* ── 취소/환불 규정 ── */
.pil-cancellation-policy {
    padding: 15px 20px;
    background: #fdf2f0;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin: 15px 0;
}
.pil-cancellation-policy h5 {
    color: #c0392b;
    margin: 0 0 10px;
    font-size: 15px;
}
.pil-cancellation-policy ul {
    margin: 0;
    padding-left: 20px;
}
.pil-cancellation-policy li {
    font-size: 13px;
    line-height: 1.8;
}

/* ── legend 아이콘 ── */
.pil-legend-icon {
    color: #28201a;
    margin-right: 6px;
    font-size: 15px;
}

/* ── 동의 영역 확장 ── */
.pil-agree-detail {
    font-size: 12px;
    color: #888;
    margin: 8px 0 0;
}

/* ── 위자드 모바일 대응 ── */
@media (max-width: 480px) {
    .pil-wizard-steps li .step-label {
        font-size: 10px;
    }
    .pil-wizard-steps li .step-num {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 13px;
    }
    .pil-signature-area canvas {
        width: 100%;
        height: 150px;
    }
    .pil-allergy-grid {
        gap: 6px;
    }
    .pil-room-options {
        flex-direction: column;
    }
}

/* ══════════════════════════════════════════════════════════════
   관리자: 신청 관리 페이지
   ══════════════════════════════════════════════════════════════ */

/* ── 상태 요약 칩 ── */
.pil-admin-summary {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    background: #fff;
}
.summary-chip:hover {
    background: #f0f0f0;
    text-decoration: none;
    color: #333;
    border-color: #ccc;
}
.summary-chip.active {
    background: #28201a;
    color: #fff;
    border-color: #28201a;
}
.summary-chip.active .pil-badge {
    background: rgba(255,255,255,.25) !important;
    color: #fff;
}
.chip-count {
    font-weight: 700;
    font-size: 14px;
}

/* ── 필터 & 검색 바 ── */
.pil-admin-filter {
    margin-bottom: 18px;
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}
.pil-admin-filter .filter-form {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}
.pil-admin-filter .filter-form > select.form-control {
    width: auto !important;
    min-width: 130px;
    max-width: 220px;
    flex: 0 0 auto;
    height: 34px;
    font-size: 13px;
    padding: 4px 8px;
}
.pil-admin-filter .filter-search {
    display: flex;
    gap: 0;
    flex: 1;
    min-width: 160px;
    max-width: 400px;
}
.pil-admin-filter .filter-search input.form-control {
    width: auto !important;
    flex: 1;
    height: 34px;
    font-size: 13px;
    border-radius: 4px 0 0 4px;
    border-right: none;
}
.pil-admin-filter .filter-search button {
    height: 34px;
    border-radius: 0 4px 4px 0;
    padding: 0 12px;
    font-size: 13px;
}

/* ── 신청 목록 테이블 ── */
.pil-admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
}
.pil-admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.pil-admin-table th {
    background: #28201a;
    color: #fff;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.pil-admin-table th:first-child { border-radius: 5px 0 0 0; }
.pil-admin-table th:last-child { border-radius: 0 5px 0 0; }
.pil-admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: middle;
}
.pil-admin-table tbody tr {
    cursor: pointer;
    transition: background .1s;
}
.pil-admin-table tbody tr:hover {
    background: #fdf8f0;
}
.pil-admin-table tbody tr:nth-child(even) {
    background: #fafafa;
}
.pil-admin-table tbody tr:nth-child(even):hover {
    background: #fdf8f0;
}
.pil-admin-table tbody tr:last-child td {
    border-bottom: none;
}
.pil-admin-table .td-center { text-align: center; }
.pil-admin-table .td-nowrap { white-space: nowrap; }
.pil-admin-table .td-name strong { font-size: 13px; }
.pil-admin-table .td-name small { font-size: 11px; }
.pil-admin-table .td-name .pil-file-icons {
    display: inline-block; margin-left: 4px; font-size: 11px; vertical-align: middle;
}
.pil-admin-table .td-name .pil-file-icons i { margin-right: 2px; }
.pil-admin-table .td-name .pil-file-icons .fa-camera { color: #5b9bd5; }
.pil-admin-table .td-name .pil-file-icons .fa-paperclip { color: #e8a838; }
.pil-admin-table .td-schedule {
    font-size: 12px;
    line-height: 1.5;
}
.pil-admin-table .td-parish {
    font-size: 12px;
    line-height: 1.4;
}
.pil-admin-table .text-muted {
    color: #999;
}
.pil-admin-count {
    text-align: right;
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

/* ── 관리자 액션 카드 ── */
.pil-admin-action-card {
    border-color: #e67e22;
}
.pil-admin-action-card h3 {
    background: #e67e22;
}
.pil-action-grid {
    display: flex;
    gap: 24px;
}
.pil-action-col {
    flex: 1;
    min-width: 0;
}
.pil-action-col:first-child {
    flex: 0 0 55%;
    border-right: 1px solid #f0ede8;
    padding-right: 24px;
}
.pil-action-item {
    margin-bottom: 14px;
}
.pil-action-item:last-child {
    margin-bottom: 0;
}
.pil-action-label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pil-action-label i {
    margin-right: 4px;
    color: #aaa;
}
.pil-action-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pil-action-inline .form-control {
    max-width: 180px;
    height: 34px;
    font-size: 13px;
}
.pil-action-inline .pil-badge {
    flex-shrink: 0;
}
.pil-action-memo {
    display: flex;
    flex-direction: column;
}
.pil-action-memo textarea {
    font-size: 13px;
    resize: vertical;
}
@media (max-width: 768px) {
    .pil-action-grid {
        flex-direction: column;
        gap: 16px;
    }
    .pil-action-col:first-child {
        flex: 1;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #f0ede8;
        padding-bottom: 16px;
    }
    .pil-action-inline .form-control {
        max-width: 100%;
    }
}
.admin-form-row {
    margin-bottom: 10px;
}
.admin-form-row label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
    color: #555;
}
.pil-admin-status-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.pil-admin-status-form .admin-form-row {
    margin-bottom: 0;
}

/* ── 관리자 수정 모드 ── */
.pil-edit-card {
    border-color: #3498db;
}
.pil-edit-card h3 {
    background: #3498db;
}
.pil-edit-badge {
    font-size: 11px;
    font-weight: 400;
    background: rgba(255,255,255,.3);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}
.pil-edit-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}
.pil-edit-row:last-child {
    border-bottom: none;
}
.pil-edit-row > label {
    flex: 0 0 120px !important;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    margin: 0 !important;
    white-space: nowrap;
}
.pil-edit-row > label .required {
    color: #e74c3c;
}
.pil-edit-row .form-control {
    width: auto !important;
    flex: 1;
    max-width: 400px;
    display: inline-block !important;
}
.pil-edit-row select.form-control {
    max-width: 200px;
}
.pil-edit-row textarea.form-control {
    max-width: 500px;
}
.pil-edit-row > .pil-checkbox-group {
    flex: 1;
}
.pil-edit-row > .pil-checkbox-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}
.pil-edit-row > .pil-checkbox-group li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}
.pil-edit-row > .pil-checkbox-group li label {
    flex: none !important;
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
}
.pil-edit-row .field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-left: 8px;
    flex: 0 0 auto;
}
.pil-edit-static {
    font-size: 13px;
    color: #333;
    line-height: 34px;
}
.pil-edit-form .btn_confirm {
    margin-top: 20px;
}
.pil-member-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}
.pil-member-table th {
    background: #f5f5f5;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #ddd;
}
.pil-member-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.pil-member-table td .form-control {
    width: 100% !important;
    max-width: none !important;
}
.pil-member-table .td-center {
    text-align: center;
}
.pil-delete-check {
    cursor: pointer;
    color: #999;
    font-size: 14px;
    margin: 0;
}
.pil-delete-check input[type="checkbox"]:checked ~ .fa {
    color: #e74c3c;
}
.pil-btn-add-member {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.pil-btn-add-member:hover {
    background: #2980b9;
}
.pil-btn-remove-member {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
}
.pil-btn-remove-member:hover {
    color: #c0392b;
}

/* 에디터(CKEditor) 행: 세로 배치, 전체 너비 */
.pil-edit-row.pil-editor-row {
    flex-direction: column !important;
    align-items: flex-start !important;
}
.pil-edit-row.pil-editor-row > label {
    flex: none !important;
    margin-bottom: 8px !important;
    font-size: 14px;
}
.pil-edit-row.pil-editor-row .editor-wrap {
    width: 100%;
}
.pil-edit-row.pil-editor-row .editor-wrap textarea {
    display: none !important;
}
.pil-edit-row.pil-editor-row .ck-editor {
    width: 100%;
}
.pil-edit-row.pil-editor-row .ck-editor__editable {
    min-height: 250px;
}

@media (max-width: 768px) {
    .pil-edit-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .pil-edit-row > label {
        flex: none !important;
        margin-bottom: 4px !important;
    }
    .pil-edit-row .form-control {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .pil-admin-summary {
        gap: 6px;
    }
    .summary-chip {
        padding: 5px 10px;
        font-size: 11px;
    }
    .pil-admin-filter .filter-form {
        flex-direction: column;
        flex-wrap: wrap;
    }
    .pil-admin-filter .filter-form > select.form-control {
        width: 100%;
        max-width: 100%;
    }
    .pil-admin-filter .filter-search {
        max-width: 100%;
        width: 100%;
    }
    .pil-admin-table {
        table-layout: auto;
    }
    .pil-admin-table th,
    .pil-admin-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
}

/* ══════════════════════════════════════════════════════════════
   첨부파일 영역 (신청 폼)
   ══════════════════════════════════════════════════════════════ */
.pil-attachments-area .pil-file-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}
.pil-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.pil-file-icon {
    color: #888;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.pil-file-input {
    flex: 1;
    min-width: 0;
    padding: 6px !important;
}
.pil-btn-file-remove {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}
.pil-btn-file-remove:hover {
    background: #c82333;
}
.pil-btn-file-add {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px dashed #aaa;
    border-radius: 4px;
    color: #333;
    font-size: 13px;
    cursor: pointer;
}
.pil-btn-file-add:hover {
    background: #e9ecef;
    border-color: #888;
}
.pil-btn-file-add i {
    margin-right: 4px;
}

@media (max-width: 767px) {
    .pil-file-row {
        flex-wrap: wrap;
    }
    .pil-file-input {
        flex: 1 1 calc(100% - 50px);
    }
}

/* ── 결제 관련 스타일 ── */
.pil-payment-method {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}
.pil-payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: border-color .2s, background .2s;
}
.pil-payment-option:hover {
    border-color: #28201a;
    background: #faf8f5;
}
.pil-payment-option.active {
    border-color: #28201a;
    background: #faf8f5;
}
.pil-payment-option input[type="radio"] {
    margin-right: 4px;
}
.pil-payment-option i {
    font-size: 18px;
    color: #28201a;
}
.pil-payment-bank-info {
    background: #f9f8f5;
    border: 1px solid #e8e4de;
    border-radius: 8px;
    padding: 18px;
    margin-top: 10px;
}
.pil-payment-notice {
    color: #666;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e4de;
}
.pil-bank-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pil-bank-info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0ede8;
}
.pil-bank-info-row:last-child {
    border-bottom: none;
}
.pil-bank-label {
    flex: 0 0 100px;
    font-weight: 600;
    font-size: 13px;
    color: #555;
}
.pil-bank-value {
    flex: 1;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}
.pil-bank-account {
    font-family: 'Courier New', monospace;
    font-size: 17px;
    font-weight: 700;
    color: #28201a;
    letter-spacing: 0.5px;
}
.pil-btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
    transition: all .15s;
}
.pil-btn-copy:hover {
    background: #28201a;
    color: #fff;
    border-color: #28201a;
}
.pil-badge-payment-pending { background: #e67e22; }
.pil-badge-payment-deposit_paid { background: #2980b9; }
.pil-badge-payment-confirmed { background: #27ae60; }
.pil-badge-payment-refunded { background: #7f8c8d; }
.pil-contact-info {
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-radius: 8px;
    padding: 15px 18px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pil-contact-info i {
    font-size: 20px;
    color: #2980b9;
}
.pil-contact-info a {
    font-weight: 700;
    color: #2980b9;
    font-size: 16px;
}
@media (max-width: 768px) {
    .pil-payment-method {
        flex-direction: column;
    }
    .pil-bank-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .pil-bank-label {
        flex: none;
    }
}

/* ── HWP 변환 콘텐츠 스타일 ── */
.hwp-content {
    font-family: 'Malgun Gothic', '맑은 고딕', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.hwp-content h1, .hwp-content h2, .hwp-content h3,
.hwp-content h4, .hwp-content h5, .hwp-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    line-height: 1.4;
    color: #222;
}
.hwp-content h1 { font-size: 1.75rem; }
.hwp-content h2 { font-size: 1.5rem; }
.hwp-content h3 { font-size: 1.25rem; }
.hwp-content p { margin-bottom: 0.8em; }
.hwp-content ul, .hwp-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.hwp-content li { margin-bottom: 0.3em; }

.hwp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
}
.hwp-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 320px;
    font-size: 0.938rem;
}
.hwp-table th, .hwp-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.hwp-table th {
    background: #f5f5f5;
    font-weight: bold;
    color: #333;
}
.hwp-table tr:nth-child(even) td { background: #fafafa; }

@media (max-width: 768px) {
    .hwp-content {
        font-size: 0.938rem;
        line-height: 1.7;
    }
    .hwp-content h1 { font-size: 1.5rem; }
    .hwp-content h2 { font-size: 1.3rem; }
    .hwp-content h3 { font-size: 1.15rem; }
    .hwp-table { font-size: 0.813rem; }
    .hwp-table th, .hwp-table td { padding: 6px 8px; }
}

/* ── 보기 모드 + 네비게이션 모바일 대응 ── */
@media (max-width: 768px) {
    .pil-nav-bar {
        gap: 6px;
    }
    .pil-nav-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    .pil-view-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .pil-view-label {
        flex: none;
    }
    .pil-view-title {
        font-size: 16px;
    }
}

/* ── SMS 문자 발송 카드 ── */
.pil-sms-card { margin-bottom: 24px; }
.pil-sms-card h3 { background: #2c3e50; }
.pil-sms-grid {
    display: flex;
    gap: 20px;
}
.pil-sms-left { flex: 0 0 180px; }
.pil-sms-right { flex: 1; display: flex; flex-direction: column; }
.pil-sms-targets {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.pil-sms-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}
.pil-sms-radio input[type="radio"] { margin: 0; }
.pil-sms-radio small { color: #888; font-size: 11px; }
.pil-sms-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.pil-sms-tpl-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pil-btn-outline {
    background: #fff;
    border: 1px solid #bbb;
    color: #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s;
}
.pil-btn-outline:hover { border-color: #28201a; color: #28201a; }
.pil-btn-xs { padding: 3px 8px; font-size: 12px; }

@media (max-width: 600px) {
    .pil-sms-grid { flex-direction: column; gap: 12px; }
    .pil-sms-left { flex: none; }
    .pil-sms-targets { flex-direction: row; flex-wrap: wrap; }
    .pil-sms-footer { flex-direction: column; gap: 8px; align-items: stretch; }
    .pil-sms-tpl-btns { justify-content: center; }
}

/* ── 인쇄 스타일 ── */
@media print {
    .pil-nav-bar, .btn_confirm, .pil-btn, .pil-wizard-nav, .pil-wizard-steps,
    header, footer, .sidebar, nav, .pil-sms-card,
    #container_title { display: none !important; }
    .pil-detail-card { border: 1px solid #333; page-break-inside: avoid; }
    .pil-wizard-step { display: block !important; }
}
