/* PC 온라인 견적 - 다나와 스타일 */

/* ===== gnuboard 불필요 요소 제거 (PC 견적 앱 전용) ===== */
#container_title {
    display: none !important;
    /* 페이지 제목 h2 숨김 */
}

#container {
    padding: 0 !important;
    margin: 0 !important;
}

#cbp-hrmenu-btm,
.rb_sidemenu,
#aside {
    display: none !important;
    /* 모바일메뉴·사이드위젯 숨김 */
}

/* ===== 전체 앱 컨테이너 (mb-wrap 가로폭 내, 높이는 JS로 계산) ===== */
.dw-wrap {
    display: flex;
    flex-direction: row;
    background: #f0f0f0;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    width: 100%;
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
    /* height: JS로 동적 설정 (window.innerHeight - getBoundingClientRect().top) */
}

/* ===== 좌측: 상품 목록 영역 ===== */
.dw-product-area {
    flex: 1;
    overflow-y: auto;
    background: #fff;
    min-width: 0;
    min-height: 0;
    /* flex 자식의 overflow 정상 동작에 필수 */
    display: flex;
    flex-direction: column;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
}

/* 검색 바 (상단 고정) */
.dw-search-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dw-search-input-wrap {
    flex: 1;
    position: relative;
    max-width: 500px;
}

.dw-search-input {
    width: 100%;
    padding: 7px 34px 7px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.dw-search-input:focus {
    border-color: #2b2b2b;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .08);
}

.dw-search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
    pointer-events: none;
}

/* 패널 영역 */
.dw-panels-wrap {
    padding: 14px 16px;
    flex: 1;
}

/* 빈 상태 (카테고리 미선택) */
.dw-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #aaa;
    font-size: 14px;
}

.dw-empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ===== 상품 패널 (카테고리별) ===== */
.dw-panel {
    display: none;
}

.dw-panel.active {
    display: block;
}

.dw-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.dw-panel-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.dw-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.dw-panel-count {
    font-size: 12px;
    color: #999;
}

/* 정렬 탭 */
.dw-sort-tabs {
    display: flex;
    gap: 3px;
}

.dw-sort-btn {
    padding: 5px 11px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.dw-sort-btn.active {
    background: #2b2b2b;
    border-color: #2b2b2b;
    color: #fff;
    font-weight: 600;
}

.dw-sort-btn:hover:not(.active) {
    background: #f5f5f5;
    border-color: #bbb;
    color: #2b2b2b;
}

/* ===== 상품 목록 (리스트 스타일) ===== */
.dw-product-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.dw-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}

.dw-item:hover {
    border-color: #2b2b2b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.dw-item.selected {
    border-color: #bbb;
    background: #f5f5f5;
}

.dw-item.selected:hover {
    border-color: #bbb;
}

/* 상품 이미지 */
.dw-item-img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 5px;
    flex-shrink: 0;
    background: #fafafa;
}

.dw-item-img-placeholder {
    width: 74px;
    height: 74px;
    border-radius: 5px;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 24px;
    flex-shrink: 0;
}

/* 상품 정보 */
.dw-item-info {
    flex: 1;
    min-width: 0;
}

.dw-item-maker {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dw-item-spec {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 상세보기 버튼 */
.dw-detail-btn {
    display: inline-block;
    margin-top: 3px;
    font-size: 10px;
    color: #c0392b;
    background: none;
    border: 1px solid #e5bab4;
    border-radius: 3px;
    padding: 1px 5px;
    cursor: pointer;
    line-height: 1.6;
    font-family: inherit;
    transition: background .1s;
}

.dw-detail-btn:hover {
    background: #fdf0ee;
}

/* ===== 상품 상세 모달 ===== */
.dw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.dw-modal {
    background: #fff;
    border-radius: 10px;
    width: 480px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .22);
}

.dw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}

.dw-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.dw-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 2px 6px;
}

.dw-modal-close:hover {
    color: #333;
}

.dw-modal-body {
    display: flex;
    gap: 16px;
    padding: 18px;
}

.dw-modal-img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 6px;
    flex-shrink: 0;
}

.dw-modal-info {
    flex: 1;
    min-width: 0;
}

.dw-modal-maker {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
}

.dw-modal-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 8px;
}

.dw-modal-spec {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-all;
}

.dw-modal-price {
    font-size: 16px;
    font-weight: 800;
    color: #1e1e1e;
    margin-bottom: 12px;
}

.dw-modal-link {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: #c0392b;
    border-radius: 4px;
    padding: 5px 12px;
    text-decoration: none;
    font-weight: 600;
}

.dw-modal-link:hover {
    background: #a93226;
}

/* 가격 + 담기 버튼 */
.dw-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 110px;
}

.dw-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    text-align: right;
    white-space: nowrap;
}

.dw-item-price-unknown {
    font-size: 12px;
    color: #bbb;
}

/* 관리자 전용: 원가 표시 */
.dw-item-orig-price {
    color: #bbb;
    font-size: 11px;
    font-weight: 400;
}

.dw-add-btn {
    padding: 6px 16px;
    background: #fff;
    color: #555;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    font-family: inherit;
}

.dw-add-btn:hover {
    background: #f0f0f0;
}

.dw-add-btn.selected-btn {
    background: #2b2b2b;
    color: #fff;
    border-color: #2b2b2b;
}

.dw-add-btn.selected-btn:hover {
    background: #111;
    border-color: #111;
}

/* 상품 없음 메시지 */
.dw-no-products {
    padding: 40px 0;
    text-align: center;
    color: #bbb;
    font-size: 13px;
}

/* ===== 페이지네이션 ===== */
.dw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.dw-pg-btn {
    padding: 5px 11px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all .15s;
    font-family: inherit;
}

.dw-pg-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #2b2b2b;
    color: #2b2b2b;
}

.dw-pg-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.dw-pg-num {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all .15s;
    font-family: inherit;
}

.dw-pg-num:hover:not(.active) {
    background: #f5f5f5;
    border-color: #2b2b2b;
    color: #2b2b2b;
}

.dw-pg-num.active {
    background: #2b2b2b;
    border-color: #2b2b2b;
    color: #fff;
    font-weight: 700;
}

.dw-pg-ellipsis {
    font-size: 12px;
    color: #bbb;
    padding: 0 2px;
}

.dw-pg-info {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    margin-left: 4px;
}

/* ===== 우측: 사이드바 ===== */
.dw-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    /* flex 자식의 overflow 정상 동작에 필수 */
}

.dw-sidebar-header {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    border-bottom: 2px solid #2b2b2b;
    background: #fff;
    flex-shrink: 0;
    letter-spacing: -0.02em;
    text-align: center;
}

/* ===== 카테고리 네비게이션 ===== */
.dw-cat-nav {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    min-height: 0;
    /* flex 자식의 overflow 정상 동작에 필수 */
}

/* 카테고리 그룹 */
.dw-group {
    margin-bottom: 1px;
}

.dw-group-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    letter-spacing: -0.01em;
    cursor: pointer;
    user-select: none;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    border-top: 1px solid #e8e8e8;
}

.dw-group-title:hover {
    background: #eeeeee;
}

.dw-group-arrow {
    font-size: 9px;
    transition: transform .2s;
    color: #888;
}

.dw-group.collapsed .dw-group-arrow {
    transform: rotate(-90deg);
}

.dw-group.collapsed .dw-group-body {
    display: none;
}

/* 카테고리 아이템 - 다나와 스타일 */
.dw-cat-item {
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background .12s;
    border-left: 3px solid transparent;
}

.dw-cat-item:hover {
    background: #f8f8f8;
}

.dw-cat-item.active {
    background: #2b2b2b;
    border-left-color: #c0392b;
}

.dw-cat-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dw-cat-item-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    transition: color .12s;
}

.dw-cat-item.active .dw-cat-item-label {
    color: #fff;
    font-weight: 700;
}

.dw-cat-item:hover .dw-cat-item-label {
    color: #111;
}

/* active 상태에서는 hover 시에도 흰색 유지 */
.dw-cat-item.active:hover {
    background: #3a3a3a;
}

.dw-cat-item.active:hover .dw-cat-item-label {
    color: #fff;
}

.dw-cat-count-badge {
    font-size: 10px;
    color: #999;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 500;
}

.dw-cat-item.active .dw-cat-count-badge {
    background: rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .8);
}

/* 선택된 상품 미니 표시 (카테고리 아이템 아래) */
.dw-cat-selected-mini {
    margin-top: 7px;
    padding: 7px 9px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, .25);
    position: relative;
}

.dw-cat-selected-mini-remove {
    position: absolute;
    top: 5px;
    right: 7px;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 12px;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.dw-cat-selected-mini-remove:hover {
    color: #e53e3e;
}

.dw-cat-selected-mini-name {
    font-size: 11px;
    color: #222;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 16px;
}

.dw-cat-selected-mini-price {
    font-size: 11px;
    color: #c0392b;
    margin-top: 4px;
    font-weight: 700;
}

/* 다중선택 개별 항목 행 (2줄 레이아웃) */
.dw-cat-mini-item {
    display: block;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.dw-cat-mini-item:last-of-type {
    border-bottom: none;
}

.dw-cat-mini-item-name {
    flex: 1;
    font-size: 10px;
    color: #222;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-cat-mini-item-price {
    font-size: 10px;
    color: #c0392b;
    font-weight: 700;
    white-space: nowrap;
}

.dw-cat-mini-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 10px;
    padding: 0 0 0 2px;
    line-height: 1;
    flex-shrink: 0;
    font-family: inherit;
}

.dw-cat-mini-item-remove:hover {
    color: #e53e3e;
}

.dw-cat-mini-total {
    font-size: 11px;
    color: #c0392b;
    font-weight: 700;
    margin-top: 5px;
    text-align: right;
    border-top: 1px solid rgba(0, 0, 0, .1);
    padding-top: 4px;
}

/* ===== 공임비 섹션 (카테고리 하단) ===== */
.dw-labor-section {
    flex-shrink: 0;
    border-top: 2px solid #c8c8c8;
    padding: 0;
    background: #fff;
    overflow-y: auto;
    max-height: 25%;
    min-height: 0;
}

.dw-labor-title {
    font-size: 12px;
    font-weight: 700;
    color: #444;
    letter-spacing: -0.01em;
    padding: 9px 14px;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    border-top: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.dw-labor-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    padding: 0 12px;
}

.dw-labor-label {
    width: 62px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-align: right;
    white-space: nowrap;
}

.dw-labor-select {
flex: 1;
min-width: 0;
padding: 4px 6px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 11px;
color: #333;
background: #fff;
outline: none;
font-family: inherit;
cursor: pointer;
}

.dw-labor-select:focus {
    border-color: #2b2b2b;
}

/* ===== 견적 요약 (사이드바 하단, 고객폼 포함) ===== */
.dw-summary {
    flex-shrink: 0;
    border-top: 1px solid #e0e0e0;
    padding: 12px 14px;
    background: #fff;
    overflow-y: auto;
    max-height: 25%;
}

.dw-sum-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dw-sum-count-label {
    font-size: 12px;
    color: #555;
}

.dw-sum-count-num {
    font-weight: 700;
    color: #2b2b2b;
}

.dw-sum-clear-btn {
    font-size: 11px;
    color: #999;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.dw-sum-clear-btn:hover {
    border-color: #e53e3e;
    color: #e53e3e;
}

.dw-sum-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    padding: 9px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.dw-sum-total-label {
    font-size: 12px;
    color: #666;
}

.dw-sum-total-note {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}

.dw-sum-total-price {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.dw-sum-labor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
}

.dw-sum-labor-label {
    color: #777;
}

.dw-sum-labor-price {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.dw-sum-grand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0 8px;
    border-top: 1px solid #e0e0e0;
    margin-top: 4px;
}

.dw-sum-grand-label {
    font-size: 13px;
    font-weight: 700;
    color: #111;
}

.dw-sum-grand-price {
    font-size: 18px;
    font-weight: 800;
    color: #1e1e1e;
    white-space: nowrap;
}

/* 메인 액션 버튼 (견적 등록하기) */
.dw-btn-register {
    display: block;
    width: 100%;
    padding: 11px;
    background: #1e1e1e;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background .15s;
    font-family: inherit;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    box-sizing: border-box;
}

.dw-btn-register:hover {
    background: #000;
}

/* 보조 버튼 (견적저장/공유/출력) */
.dw-sum-secondary {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.dw-btn-sm {
    flex: 1;
    padding: 7px 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    font-family: inherit;
}

.dw-btn-sm:hover {
    border-color: #2b2b2b;
    color: #2b2b2b;
    background: #f5f5f5;
}

/* ===== 고객 정보 폼 (항상 표시) ===== */
.dw-customer-form {
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.dw-customer-form-title {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* 가로 레이아웃: 라벨 왼쪽, 인풋 오른쪽 */
.dw-form-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.dw-form-label {
    width: 50px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-align: right;
    white-space: nowrap;
}

.dw-form-input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.dw-form-input:focus {
    border-color: #2b2b2b;
}
select.dw-form-input {
    cursor: pointer;
    padding-right: 24px;
}
.dw-form-textarea {
    resize: vertical;
    min-height: 56px;
    line-height: 1.4;
}
/* 요청사항 행 — 라벨을 상단 정렬 */
.dw-form-row:has(.dw-form-textarea) {
    align-items: flex-start;
}
.dw-form-row:has(.dw-form-textarea) .dw-form-label {
    padding-top: 6px;
}

.dw-form-input[readonly] {
    background: #f8f8f8;
    color: #aaa;
    cursor: default;
    font-size: 11px;
}


/* ===== 관리자 패널 ===== */
.dw-admin-bar {
    background: #fff;
    border-top: 3px solid #2b2b2b;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 4px;
}

.dw-admin-bar.collapsed .dw-admin-body {
    display: none;
}

.dw-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #2b2b2b;
    cursor: pointer;
    user-select: none;
}

.dw-admin-head-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .3px;
}

.dw-admin-toggle {
    background: transparent;
    color: rgba(255, 255, 255, .8);
    border: 1px solid rgba(255, 255, 255, .3);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.dw-admin-toggle:hover {
    background: rgba(255, 255, 255, .15);
}

.dw-admin-body {
    padding: 12px 16px 16px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 섹션 카드 */
.dw-admin-section {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    overflow: hidden;
}

.dw-admin-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    background: #f2f3f5;
    padding: 6px 12px;
    border-bottom: 1px solid #e4e4e4;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.dw-admin-section-note {
    font-weight: 400;
    font-size: 10px;
    color: #888;
    text-transform: none;
    letter-spacing: 0;
}

/* 가로 필드 그리드 */
.dw-admin-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.dw-admin-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
}

.dw-admin-field label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    width: 60px;
    flex-shrink: 0;
    white-space: nowrap;
}

.dw-admin-field input {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
}

.dw-admin-field input:focus {
    outline: none;
    border-color: #2b2b2b;
    box-shadow: 0 0 0 2px rgba(43, 43, 43, .07);
}

/* 마진율 섹션: 그룹명이 길어서 label 유동폭 */
.dw-admin-field-margin {
    min-width: 0;
}

.dw-admin-field-margin label {
    width: auto;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-admin-field-margin input {
    width: 64px;
    flex: none;
    text-align: right;
}

/* 액션 버튼 행 */
.dw-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.dw-admin-section .dw-admin-actions {
    border-top: 1px solid #f0f0f0;
}

.dw-admin-save {
    background: #2b2b2b;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}

.dw-admin-save:hover {
    background: #111;
}

/* 임포트 버튼 색상 */
.dw-btn-dark {
    background: #2b2b2b;
}

.dw-btn-dark:hover {
    background: #111;
}

.dw-btn-gray {
    background: #666;
}

.dw-btn-gray:hover {
    background: #444;
}

/* 임포트 섹션 */
.dw-admin-import-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    flex-wrap: wrap;
}

/* ===== 관리자 공임비 설정 ===== */
.dw-admin-labor-grid {
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.dw-admin-labor-cat {
    margin-bottom: 0;
}

.dw-admin-labor-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    background: #f2f3f5;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    border: 1px solid #e4e4e4;
}

.dw-admin-labor-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 2px;
    border-bottom: 1px solid #f5f5f5;
}

.dw-admin-labor-label {
    flex: 1;
    font-size: 11px;
    color: #555;
    line-height: 1.4;
}

.dw-admin-labor-price {
    width: 85px;
    flex-shrink: 0;
    padding: 4px 7px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    text-align: right;
    background: #fff;
}

.dw-admin-labor-price:focus {
    outline: none;
    border-color: #2b2b2b;
}

/* ===== 카트 미니 2줄 레이아웃 ===== */
.dw-cat-mini-row1 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dw-cat-mini-row2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    gap: 4px;
}

.dw-cat-mini-qty {
    display: flex;
    align-items: center;
    gap: 3px;
}

.dw-cat-mini-qty-btn {
    width: 18px;
    height: 18px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    color: #333;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.dw-cat-mini-qty-btn:hover {
    background: #e0e0e0;
}

.dw-cat-mini-qty-num {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    min-width: 14px;
    text-align: center;
}

/* ===== 인풋 단위 래퍼 (%, 원) ===== */
.dw-input-unit-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dw-input-unit {
    position: absolute;
    right: 7px;
    font-size: 11px;
    color: #999;
    pointer-events: none;
    font-weight: 500;
    white-space: nowrap;
}

/* 마진 인풋: % 공간 확보 */
.dw-admin-field-margin .dw-input-unit-wrap input {
    padding-right: 22px;
}

/* 공임비 인풋: 원 공간 확보 + text-align */
.dw-admin-labor-row .dw-input-unit-wrap {
    width: 100%;
    max-width: 105px;
}

.dw-admin-labor-row .dw-input-unit-wrap input {
    width: 100%;
    padding-right: 24px;
    text-align: right;
    box-sizing: border-box;
}

/* 업체정보 4열 통합 그리드 */
.dw-seller-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.dw-seller-col2 {
    grid-column: span 2;
}

@media (max-width: 1100px) {
    .dw-seller-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dw-seller-col2 {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .dw-seller-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-seller-col2 {
        grid-column: span 2;
    }
}

/* ===== 쿠폰 관리자 섹션 ===== */
.dw-admin-coupon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.dw-admin-coupon-box {
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    min-width: 0;
}

.dw-admin-coupon-box:nth-child(4n) {
    border-right: none;
}

.dw-admin-coupon-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f8f8f8;
    border-bottom: 1px solid #ececec;
}

.dw-admin-coupon-no {
    font-size: 11px;
    font-weight: 700;
    color: #2b2b2b;
    flex-shrink: 0;
    white-space: nowrap;
}

.dw-coupon-title-input {
    flex: 1;
    min-width: 0;
    padding: 4px 7px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    background: #fff;
}

.dw-coupon-title-input:focus {
    outline: none;
    border-color: #2b2b2b;
}

.dw-admin-coupon-item-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-bottom: 1px solid #f5f5f5;
}

.dw-admin-coupon-item-row:last-child {
    border-bottom: none;
}

.dw-coupon-item-title {
    flex: 1;
    min-width: 0;
    padding: 3px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    background: #fff;
}

.dw-coupon-item-title:focus {
    outline: none;
    border-color: #2b2b2b;
}

.dw-coupon-item-price {
    width: 72px;
    padding: 3px 22px 3px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    text-align: right;
    background: #fff;
}

.dw-coupon-item-price:focus {
    outline: none;
    border-color: #2b2b2b;
}

/* 4열 반응형 */
@media (max-width: 1100px) {
    .dw-admin-coupon-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-admin-coupon-box:nth-child(4n) {
        border-right: 1px solid #f0f0f0;
    }

    .dw-admin-coupon-box:nth-child(2n) {
        border-right: none;
    }
}

/* ===== 사이드바 쿠폰 섹션 ===== */
.dw-coupon-section {
    border-top: 1px solid #ebebeb;
    padding: 8px 0 4px;
}

/* ===== 요약 소계 / 쿠폰 할인 ===== */
.dw-sum-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid #e8e8e8;
    margin-top: 2px;
}

.dw-sum-subtotal-label {
    font-size: 12px;
    color: #555;
    font-weight: 600;
}

.dw-sum-subtotal-price {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.dw-sum-coupon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.dw-sum-coupon-label {
    font-size: 12px;
    color: #c0392b;
}

.dw-sum-coupon-price {
    font-size: 13px;
    font-weight: 700;
    color: #c0392b;
}

/* ===== 반응형 ===== */
@media (max-width: 960px) {
    .dw-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .dw-wrap {
        flex-direction: column;
    }

    .dw-sidebar {
        width: 100%;
        height: 240px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        order: -1;
    }

    .dw-cat-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .dw-group {
        display: inline-block;
        vertical-align: top;
    }
}