<?php $labels=['pending'=>'대기','in_progress'=>'확인 중','replied'=>'답변 완료','closed'=>'종료']; ?><a class="back-link" href="/admin/inquiries">← 문의 목록</a><header class="admin-page-heading inquiry-heading"><div><span><?= e($inquiry['ticket']) ?></span><h1><?= e($inquiry['title']) ?></h1><p><?= e(date('Y.m.d H:i', strtotime($inquiry['created_at']))) ?> 접수</p></div></header><div class="inquiry-detail-grid"><article class="inquiry-content"><div class="contact-summary"><span><?= e($labels[$inquiry['status']] ?? $inquiry['status']) ?></span><p><strong><?= e($inquiry['name']) ?></strong><br><?= e($inquiry['phone']) ?><?php if ($inquiry['email']): ?><br><?= e($inquiry['email']) ?><?php endif; ?></p></div><h2>문의 내용</h2><p><?= nl2br(e($inquiry['body'])) ?></p></article><form class="admin-form reply-form" method="post" action="/admin/inquiries/<?= e($inquiry['id']) ?>"><?= csrf_field() ?><h2>처리 및 답변</h2><label>처리 상태<select name="status"><?php foreach($labels as $value=>$label): ?><option value="<?= e($value) ?>"<?= $inquiry['status']===$value?' selected':'' ?>><?= e($label) ?></option><?php endforeach; ?></select></label><label>고객 공개 답변<textarea name="reply" rows="10" maxlength="5000"><?= e($inquiry['reply'] ?? '') ?></textarea><small>저장한 답변은 고객의 문의 조회 화면에 표시됩니다.</small></label><button class="button button-primary" type="submit">처리 내용 저장</button></form></div>
