.wd-layout { max-width:1800px; }
.wd-sidebar { width:300px; }

/* 서브 바 버튼 - 배너 매니저와 동일 */
.wd-subbar .section .image-btn { background-color: #f6d82c; }

/* 트리메뉴 - 배너 매니저와 동일한 구조 (기존 클래스명 유지) */
.wd-sidebar .tree-structure, .wd-sidebar .sidebar-list { margin:10px 0; }
.wd-sidebar .tree-structure li, .wd-sidebar .sidebar-list li { margin-bottom:10px; padding:10px 15px 10px 5px; border-radius:var(--radius-sm); border:2px solid #ddd; background:#fff; cursor:default; }
.wd-sidebar .tree-structure li.active { border:2px solid #6139f3; }
.wd-sidebar .tree-structure li.disabled { opacity:0.5; }
.wd-sidebar .tree-structure .title-wrap { display:flex; align-items:center; justify-content:space-between; }
.wd-sidebar .tree-structure li .design-title { font-size:var(--font-size-xl); font-weight:700; padding:10px 10px 10px 15px; color:#111; flex:1; cursor:pointer }
.wd-sidebar .tree-structure li.active .design-title { color:#111; }
.wd-sidebar .tree-structure .group-list { margin:0 0 0 10px; }
.wd-sidebar .tree-structure .group-item:first-child { margin:10px 0; }
.wd-sidebar .tree-structure .group-item { display:flex; justify-content:space-between; align-items:center; padding:7px 4px 7px 12px; min-height:40px; border:2px solid #ddd; margin-bottom:10px; border-radius:var(--radius-sm); font-size:var(--font-size-lg); color:#333; cursor:pointer; transition:background 0.2s ease; user-select:none; -webkit-user-drag:none; }
.wd-sidebar .tree-structure .group-item.active { border:2px solid #40b736; }
.wd-sidebar .tree-structure .group-item.disabled { opacity:0.4; pointer-events:auto; }
.wd-sidebar .tree-structure .group-item.disabled.active { opacity:1; background:#ddd; color:#111; border-color:#bbb; }

/* 그룹 컨텐츠 내부 - SET 박스 제거됨 */
.wd-sidebar .tree-structure .group-content { display:flex; align-items:center; gap:0; flex:1; position:relative; user-select:none; }
.wd-sidebar .tree-structure .group-name { font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px; margin-left: 5px; }

/* 토글 버튼 */
.wd-sidebar .tree-structure .toggle-switch { transform:scale(0.65); display:inline-block; margin-left:auto; }

/* 디자인명 수정 input */
.wd-sidebar .tree-structure .design-edit-input { width:100%; height:19px; line-height:normal; color:#6139f3; font-weight:700; font-size:var(--font-size-xl)!important; border:0; outline:none; background:transparent; vertical-align:middle; appearance:none; }

/* 디자인추가 입력 인풋+버튼 */
.wd-sidebar .form-inline { display:flex; flex-direction:row; align-items:flex-start; justify-content:space-between; margin-bottom:20px; box-sizing:border-box; }
.wd-sidebar .form-inline input[type="text"] { flex:1; height:45px; line-height:45px; border-radius:var(--radius-xs); border:1px solid #6139f3; font-size:var(--font-size-md); text-indent:15px; box-sizing:border-box; }
.wd-sidebar .form-inline button { height:45px; line-height:45px; padding:0 20px; border-radius:var(--radius-xs); background:#6139f3; color:#fff; border:none; font-size:var(--font-size-md); font-weight:600; cursor:pointer; flex-shrink:0; box-sizing:border-box; }

/* 그룹추가 입력 인풋+버튼 */
.wd-sidebar .tree-structure .group-input { display:flex; flex-direction:row; align-items:flex-start; justify-content:space-between; margin:20px 10px 10px; }
.wd-sidebar .tree-structure .group-input input[type="text"] { flex:1; width:188px; height:45px; line-height:45px; margin:0 5px 0 0; border-radius:var(--radius-xs); border:1px solid #40b736; font-size:var(--font-size-md); text-indent:15px; box-sizing:border-box; }
.wd-sidebar .tree-structure .group-input button { height:45px; line-height:45px; padding:0 20px; border-radius:var(--radius-xs); background:#40b736; color:#fff; border:none; font-size:var(--font-size-md); font-weight:600; cursor:pointer; flex-shrink:0; box-sizing:border-box; }

/* 공통 영역 */
.setting-container { display:flex; flex-direction:column; gap:30px; }
.delete-item-btn { width:60px; padding:5px 0; border:1px solid #ddd; background-color: #fff; border-radius:var(--radius-lg); font-size:var(--font-size-sm); box-shadow: none; cursor: pointer;}

/* 그룹 영역 */
.setting-group { }
.group-header { display:flex; align-items:center; gap:10px; margin-bottom:14px; font-weight:bold; font-size:var(--font-size-lg); }
.group-header input.group-title, .group-header input.group-code { width:170px; margin:0 5px 0 0; padding:12px 12px 12px 20px; border:1px solid #ddd; background-color:transparent; border-radius:var(--radius-sm); font-size:var(--font-size-2xl); font-weight:700; }

/* 테이블 영역 */
.setting-table { position:relative; overflow: hidden; width:100%; border-collapse:separate; border-spacing:0; margin-bottom:50px; border:1px solid #eaeaea; border-radius:var(--radius-lg); border-radius:var(--radius-md); box-shadow: var(--shadow-xs); background:#fff; transition:opacity 0.3s ease; }
.setting-group.disabled .setting-table { opacity:0.4; }
.setting-table thead { background:#fafafc; }
.setting-table th { padding:25px 0; border-bottom:1px solid #eaeaea; font-size:var(--font-size-md); font-weight:600; color:#111; text-align:center; }
.setting-table tr.disabled-row td { opacity:0.4; transition:opacity 0.3s ease; }
.setting-table td { vertical-align:middle; padding:15px 7px; border-bottom:1px solid #eee; background:#fff; font-size:var(--font-size-md); text-align:center; }

/* 기본 input/select */
.setting-table td input:not(.tag-input-box):not(.tag-tag):not(.li-category-input):not(.li-sub-input), .setting-table td select { width:100%; padding:12px; border:1px solid #ddd; border-radius:var(--radius-sm); font-size:var(--font-size-md); box-sizing:border-box; }
.setting-table td select { padding:12px; }

/* type=textarea 전용 */
.setting-table textarea.item-value.textarea { width:100%; min-height:80px; padding:12px; font-size:var(--font-size-md); border:1px solid #ddd; border-radius:var(--radius-sm); resize:none; overflow:hidden; box-sizing:border-box; }

/* li메뉴 타입 */
.setting-table .li-menu-builder { width:100%; }
.setting-table .li-category-item { padding:12px; }
.setting-table .li-category-item.selected { border-radius:var(--radius-sm); background:#eff1f7; }
.setting-table .li-category-row { display:flex; align-items:center; gap:10px; padding:8px 0; width:100%; }
.setting-table .li-drag-handle { cursor:grab; font-size:12px; color:#666; padding:4px; line-height:1; user-select:none; flex-shrink:0; }
.setting-table .li-drag-handle:active { cursor:grabbing; }
.setting-table .li-category-input { flex:1; width:100%; padding:12px; border:1px solid #ddd; border-radius:var(--radius-sm); font-size:var(--font-size-md); background:white; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-sizing:border-box; }
.setting-table .li-toggle-switch { position:relative; display:inline-block; width:40px; height:20px; flex-shrink:0; margin-left:10px; }
.setting-table .li-toggle-switch input { opacity:0; width:0; height:0; }
.setting-table .li-slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background-color:#ccc; transition:.4s; border-radius:20px; }
.setting-table .li-slider:before { position:absolute; content:""; height:16px; width:16px; left:2px; bottom:2px; background-color:white; transition:.4s; border-radius:50%; }
.setting-table .li-toggle-switch input:checked + .li-slider { background-color:#ffc107; }
.setting-table .li-toggle-switch input:checked + .li-slider:before { transform:translateX(20px); }
.setting-table .li-sub-items { padding:0; width:100%; }
.setting-table .li-sub-item { display:flex; align-items:center; gap:10px; padding:8px 0; position:relative; width:100%; }
.setting-table .li-sub-item:last-child { margin-bottom:0; }
.setting-table .li-sub-indicator { color:#333; font-size:18px; min-width:15px; flex-shrink:0; }
.setting-table .li-sub-drag { cursor:grab; font-size:12px; color:#666; padding:2px; line-height:1; user-select:none; flex-shrink:0; }
.setting-table .li-sub-drag:active { cursor:grabbing; }
.setting-table .li-sub-input { flex:1; width:100%; padding:10px 30px 10px 10px; border:1px solid #ddd; border-radius:var(--radius-sm); font-size:var(--font-size-md); background:white; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-sizing:border-box; }
.setting-table .li-category-row.disabled-row { opacity:0.4; transition:opacity 0.3s ease; }
.setting-table .li-sub-item.disabled-row { opacity:0.4; transition:opacity 0.3s ease; }
.setting-table .li-menu-actions { display:flex; justify-content:center; gap:10px; margin:10px 0; padding:0; }
.setting-table .li-add-category { padding:10px 20px; border:none; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; background:#007bff; color:white; transition:background-color 0.2s; }
.setting-table .li-add-category:hover { background:#0056b3; }
.setting-table .li-add-sub { padding:10px 20px; border:none; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; background:#17a2b8; color:white; transition:background-color 0.2s; }
.setting-table .li-add-sub:hover { background:#138496; }

/* 셀렉트, 라디오 태그 스타일 */
.setting-table .tag-field-wrap { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.setting-table .tag-field { display:flex; position:relative; align-items:center; gap:4px; }
.setting-table .tag-input-box, .setting-table .tag-tag { padding:12px; border:1px solid #ddd; border-radius:var(--radius-sm); font-size:var(--font-size-md); min-width:50px; width:auto; white-space:nowrap; box-sizing:content-box; display:inline-block; }
.setting-table .tag-input-box:focus { outline:none; }
.setting-table .li-remove-btn, .setting-table .tag-x { position:absolute; top:46%; right:8px; transform:translateY(-50%); font-size:24px; color:#888; cursor:pointer; font-style:normal; }

/* 링크 타입 */
.setting-table .link-wrap { display:flex; align-items:center; gap:10px; }
.setting-table .link-wrap .link-url { flex:1; padding:12px; font-size:var(--font-size-md); border:1px solid #ccc; border-radius:var(--radius-sm); }
.setting-table .link-wrap .link-target { width:100px; padding:12px; font-size:var(--font-size-md); border:1px solid #ccc; border-radius:var(--radius-sm); }

/* 순서 박스 (배너 매니저와 동일) */
.setting-table .order-box { display:flex; align-items:center; justify-content:center; gap:8px; cursor:grab; user-select:none; }
.setting-table .order-box:active { cursor:grabbing; }
.setting-table .order-box span { font-weight:600; color:#333; }
.setting-table .order-box .arrow { font-size:14px; color:#666; line-height:1; }

/* 레이아웃 너비 */
.setting-table th:nth-child(1), .setting-table td:nth-child(1) { width:50px; }
.setting-table th:nth-child(2), .setting-table td:nth-child(2) { width:140px; }
.setting-table th:nth-child(3), .setting-table td:nth-child(3) { width:160px; }
.setting-table th:nth-child(4), .setting-table td:nth-child(4) { width:110px; }
.setting-table th:nth-child(5), .setting-table td:nth-child(5) { width:auto; text-align:left; }
.setting-table th:nth-child(6), .setting-table td:nth-child(6) { width:70px; }
.setting-table th:nth-child(7), .setting-table td:nth-child(7) { width:75px; }