/* ===== 신청 페이지 공통 ===== */
.order-form-wrap,
.order-complete,
.order-check-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px;
}

.order-form-wrap h1,
.order-complete h1,
.order-check-wrap h1 {
    margin: 0 0 8px;
}

.page-sub {
    color: #6b7280;
    margin: 0 0 24px;
}

/* ===== 섹션 ===== */
.order-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.order-section h2 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1f2937;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.order-section h3 {
    margin: 16px 0 8px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
}

/* ===== 라디오 그룹 ===== */
.radio-group {
    display: flex;
    gap: 16px;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    flex: 1;
    justify-content: center;
}
.radio-group input[type=radio]:checked + span {
    color: #2563eb;
    font-weight: 600;
}

/* ===== 요금제 ===== */
.plan-group { margin-bottom: 16px; }
.plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.plan-item {
    display: block;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.plan-item:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
.plan-item input { display: none; }
.plan-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.plan-item-price {
    font-size: 15px;
    color: #2563eb;
    font-weight: 600;
}
.plan-item-price .muted {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
}
.plan-item-desc {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== 결제 탭 ===== */
.payment-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.payment-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}
.payment-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.payment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
}
.payment-item:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

/* ===== 회원 요약 ===== */
.member-summary {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}
.member-summary p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #6b7280;
}

/* ===== 크레딧 입력 ===== */
.credit-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.credit-input-row input[type=number] {
    width: 120px;
}

/* ===== 결제 요약 ===== */
.order-summary {
    background: #1f2937;
    color: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}
.summary-total {
    border-top: 1px solid #374151;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 600;
}

/* ===== 신청 완료 ===== */
.complete-header {
    text-align: center;
    padding: 32px 0;
}
.complete-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}
.complete-sub {
    color: #6b7280;
    margin: 8px 0 0;
}

.complete-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 16px;
}
.complete-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
}
.complete-payment {
    border-color: #2563eb;
    border-width: 2px;
}

.info-list {
    margin: 0;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px 20px;
    font-size: 14px;
}
.info-list dt {
    color: #6b7280;
    font-weight: 500;
}

.info-list dd {
    margin: 0;
    color: #1f2937;
}

.order-number {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 6px;
}

.amount-large {
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
}
.amount-large + small {
    display: block;
    color: #9ca3af;
    font-weight: 400;
    font-size: 12px;
    margin-top: 2px;
}

.qr-box {
    text-align: center;
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}
.qr-box img {
    max-width: 240px;
    border-radius: 4px;
}
.qr-box p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.account-info {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
}
.account-info pre {
    margin: 4px 0 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 14px;
}

.payment-desc {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.complete-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.complete-notice h4 {
    margin: 0 0 8px;
    color: #92400e;
    font-size: 14px;
}
.complete-notice ul {
    margin: 0;
    padding-left: 20px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.7;
}

.complete-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

/* ===== 배지 ===== */
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ===== 공통 muted ===== */
.muted { color: #9ca3af; }


/* ===== QR 이미지 크기 제한 ===== */
.preview-qr-box {
    text-align: center;
    margin: 16px 0;
}
.preview-qr-box img {
    max-width: 240px;
    width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
.payment-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}
.preview-info {
    white-space: pre-wrap;
    font-size: 14px;
    color: #1f2937;
}
.preview-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

.summary-row.reward {
    color: #16a34a;
    font-weight: 600;
}
/* 신청 페이지 - 카테고리 탭 */
.order-plan-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
}
.order-plan-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    bottom: -2px;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
}
.order-plan-tab:hover { color: #1e3a8a; }
.order-plan-tab.active {
    color: #1e3a8a;
    border-bottom-color: #f59e0b;
}

/* 패널 */
.order-plan-panel { display: none; }
.order-plan-panel.active { display: block; }

@media (max-width: 600px) {
    .order-plan-tabs { gap: 0; }
    .order-plan-tab { flex: 1; padding: 10px 8px; font-size: 14px; }
}
/* 주문 폼 에러 요약 박스 */
.error-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #991b1b;
}
.error-summary strong {
    display: block;
    font-size: 15px;
    color: #dc2626;
    margin-bottom: 8px;
}
.error-summary ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
}
.error-summary li strong {
    display: inline;
    color: #991b1b;
    font-size: 14px;
    margin: 0;
}



/* ===== 관리자 안내 메시지 viewer (Toast UI) ===== */
#customer-message-viewer {
    font-size: 15px;
    line-height: 1.75;
    color: #1f2937;
}
#customer-message-viewer .toastui-editor-contents { padding: 0 !important; }
#customer-message-viewer .toastui-editor-contents p {
    margin: 0.6em 0 !important;
}
#customer-message-viewer .toastui-editor-contents > *:first-child { margin-top: 0 !important; }
#customer-message-viewer .toastui-editor-contents > *:last-child { margin-bottom: 0 !important; }

/* 리스트 — Toast UI 기본 마커 제거 후 disc(●) 하나만 표시 */
#customer-message-viewer .toastui-editor-contents ul,
#customer-message-viewer .toastui-editor-contents ol {
    margin: 0.6em 0 !important;
    padding-left: 1.6em !important;
    list-style: disc;
}
#customer-message-viewer .toastui-editor-contents ul li,
#customer-message-viewer .toastui-editor-contents ol li {
    margin: 0.25em 0 !important;
    padding-left: 4px;
}
#customer-message-viewer .toastui-editor-contents ul li::before,
#customer-message-viewer .toastui-editor-contents ol li::before {
    content: none !important;
    display: none !important;
}
#customer-message-viewer .toastui-editor-contents li::marker {
    color: #6b7280;
}
#customer-message-viewer .toastui-editor-contents li > p { margin: 0 !important; }

/* 링크 / 강조 */
#customer-message-viewer .toastui-editor-contents a {
    color: #2563eb;
    text-decoration: underline;
}
#customer-message-viewer .toastui-editor-contents strong {
    color: #111827;
    font-weight: 700;
}

/* 인라인 코드 (계정·암호 표시 추천) */
#customer-message-viewer .toastui-editor-contents code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #fde68a;
    font-size: 0.92em;
    color: #b91c1c;
}

/* ===== "관리자 안내" 카드 강조 ===== */
.complete-card.complete-customer-message {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
}
.complete-card.complete-customer-message h3 {
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
}
.complete-card.complete-customer-message h3::before {
    content: "📢";
    font-size: 18px;
}
