<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">

<head>
    <title>상세 코드 정보</title>
    <link rel="stylesheet" th:href="@{/css/common.css}">
    <script th:src="@{/js/web/jquery.min.js}"></script>
    <style>
        .pop_wrap {
            max-width: 500px;
            margin: 0 auto;
        }

        .pop_wrap h3 {
            font-size: 16px;
            margin-bottom: 5px;
            padding-bottom: 10px;
            border-bottom: 2px solid #3985EA;
            color: #333;
        }

        .group_info {
            font-size: 13px;
            color: #1a73e8;
            margin-bottom: 15px;
            font-weight: 600;
            text-align: right;
        }

        .board_write {
            width: 100%;
            border-collapse: collapse;
        }

        .board_write th {
            background: #f8f9fb;
            padding: 10px 12px;
            text-align: left;
            font-size: 13px;
            font-weight: 600;
            color: #555;
            border: 1px solid #e9ecf0;
            white-space: nowrap;
        }

        .board_write td {
            padding: 8px 12px;
            border: 1px solid #e9ecf0;
        }

        .board_write input[type="text"],
        .board_write input[type="number"] {
            width: 100%;
            height: 30px;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 0 8px;
            font-size: 13px;
            box-sizing: border-box;
        }

        .ess {
            color: #ff0000;
        }

        .pop_btn_area {
            text-align: center;
            margin-top: 20px;
        }

        .btn_blue {
            padding: 8px 24px;
            background: #3985EA;
            color: #fff;
            border: none;
            border-radius: 5px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        .btn_blue:hover {
            background: #2c6fd1;
        }

        .btn_gray {
            padding: 8px 24px;
            background: #fff;
            color: #666;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            cursor: pointer;
            margin-left: 6px;
        }

        .btn_gray:hover {
            background: #f5f5f5;
        }

        .btn_red {
            padding: 8px 24px;
            background: #ff4444;
            color: #fff;
            border: none;
            border-radius: 5px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            margin-left: 6px;
        }

        .btn_red:hover {
            background: #cc0000;
        }

        textarea {
            width: 100%;
            height: 60px;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 8px;
            font-size: 13px;
            box-sizing: border-box;
            resize: none;
        }

        select {
            height: 30px;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 0 8px;
            font-size: 13px;
        }
    </style>
</head>

<body style="padding: 20px;">
    <div class="pop_wrap">
        <h3 id="popTitle">상세 코드 등록</h3>
        <div class="group_info" id="groupInfoText"></div>

        <input type="hidden" id="pid" value="">
        <input type="hidden" id="storePid" value="1">
        <input type="hidden" id="grpCd" value="">

        <table class="board_write">
            <colgroup>
                <col width="120px">
                <col width="*">
            </colgroup>
            <tbody>
                <tr>
                    <th><span class="ess">*</span> 코드 ID</th>
                    <td><input type="text" id="codeCd" placeholder="영문/숫자 코드 고유 ID"></td>
                </tr>
                <tr>
                    <th><span class="ess">*</span> 코드 명칭</th>
                    <td><input type="text" id="codeNm" placeholder="코드 이름 입력"></td>
                </tr>
                <tr>
                    <th>추가 값 (Val)</th>
                    <td><input type="text" id="codeVal" placeholder="코드에 종속된 추가 데이터 (선택 사항)"></td>
                </tr>
                <tr>
                    <th>설명</th>
                    <td><textarea id="codeDesc" placeholder="설명을 입력하세요"></textarea></td>
                </tr>
                <tr>
                    <th>정렬 순서</th>
                    <td><input type="number" id="codeSort" value="0"></td>
                </tr>
                <tr>
                    <th>사용 여부</th>
                    <td>
                        <select id="listUse">
                            <option value="y">사용 (Y)</option>
                            <option value="n">미사용 (N)</option>
                        </select>
                    </td>
                </tr>
            </tbody>
        </table>

        <div class="pop_btn_area">
            <button type="button" class="btn_blue" id="btn_save">저장</button>
            <button type="button" class="btn_red" id="btn_delete" style="display:none;">삭제</button>
            <button type="button" class="btn_gray" id="btn_close">닫기</button>
        </div>
    </div>

    <script th:src="@{/js/web/settings/code/popup/codePop.js}"></script>
</body>

</html>