  #kdFab { /* [FAB-1 2026-09-28 만포님 지시] 플로팅 버튼 10% 축소 — 56→50px · 아이콘 28→25px (psk_win.css #pskFab 과 짝) */
    display: none; position: fixed; left: 262px; top: 96px; z-index: 99970;
    width: 50px; height: 50px; border: 1px solid transparent; border-radius: 50%;
    background: #2563eb; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.4); cursor: grab;
    align-items: center; justify-content: center; transition: box-shadow .2s ease, transform .2s ease; user-select: none; touch-action: none;
  }
  #kdFab:hover { background: #1d4ed8; box-shadow: 0 6px 16px rgba(37,99,235,0.55); transform: scale(1.05); }
  #kdFab.dragging { cursor: grabbing; transform: none; transition: none; }
  #kdFab .material-icons { font-size: 25px; pointer-events: none; }
  #kdFab .kd-fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; display: none; pointer-events: none; }
  #kdWin {
    display: none; position: fixed; left: 300px; top: 80px; z-index: 99972;
    width: 1260px; max-width: calc(100vw - 64px); height: 760px; max-height: calc(100vh - 48px); /* [KDD-21f 만포님 지시] 1180→1260 · 우측 패널 확대 · [KDD-33] 720→760 상품 행 확보 */
    background: #ffffff; border: 1px solid #cbd5e1; border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25); flex-direction: column; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 13px; color: #1e293b;
  }
  #kdWin.visible { display: flex; }
  /* [KDD-21m 2026-09-06 만포님 확정] 모드 색 규칙 — 머리띠·테두리·배지를 모드 하나가 같은 톤으로: 새입력 파랑(현재) · 수정 노랑 · 조회 초록. 음영은 모두 새입력과 동일. 예외 여부는 세그먼트 [예외]·배지 문구·#칸 색으로만 */
  /* [KDD-24 2026-09-07 만포님 확정] 모드 톤 개정 — 쓰기(입력·수정) = 극동 매출전표 빨간 톤(흰 바탕 · 붉은 선·제목 · 연분홍 표 헤더) · 수정은 머리띠만 노랑 · 조회 = 회색("변하지 않음") */
  #kdWin { border-color: #94a3b8; }                                             /* 입력·수정 공통 틀 · [KDD-28 만포님 지시] 창 테두리는 세 모드 공통 회색(조회와 동일) — 톤은 머리띠·표 헤더·합계 띠로만 */
  #kdWin .kd-head { background: #fff1f2; border-bottom-color: #fecaca; }
  #kdWin .kd-head h2 { color: #b91c1c; }
  #kdWin .kd-head h2 .material-icons { color: #dc2626; }
  #kdWin .kd-grid th { background: #fff1f2; color: #9f1239; border-bottom-color: #fecaca; }
  #kdWin .kd-grid-tot { border-top-color: #fca5a5; background: #fff7f7; }
  #kdWin .kd-modeseg button.on { background: #dc2626 !important; }              /* [기본] on · [예외] amber 는 아래 규칙이 유지 */
  #kdWin .kd-modeseg button.on.exc { background: #d97706 !important; }
  #kdWin .kd-state { background: #fee2e2; color: #b91c1c; }
  #kdWin .kd-state.held, #kdWin .kd-state.edit, #kdWin .kd-state.exc.edit { background: #fef3c7; color: #92400e; } /* 보류·수정 배지는 노랑 신호 유지(id 특이도 보정) */
  #kdWin.mode-edit { border-color: #94a3b8; }                                   /* [KDD-27a/28] 수정 = 입력과 완전히 같은 톤 · 테두리 회색 공통 · "수정" 배지만 점멸 */
  #kdWin.mode-edit .kd-head { background: #fff1f2; border-bottom-color: #fecaca; }
  @keyframes kdEditPulse { 0%, 100% { background: #dc2626; } 50% { background: #f9a8d4; } } /* [KDD-27c 만포님 지시] 글자는 흰색 고정 · 배지 바탕만 빨강↔핑크 */
  #kdWin.mode-edit .kd-state, #kdWin.mode-edit .kd-state.edit, #kdWin.mode-edit .kd-state.exc.edit { background: #dc2626; color: #fff; animation: kdEditPulse 2s ease-in-out infinite; } /* [KDD-27d] 2초 주기 = 1초 빨강·1초 핑크 */
  @media (prefers-reduced-motion: reduce) { #kdWin.mode-edit .kd-state { animation: none; } }
  .kd-modeseg button.on.exc, #kdWin .kd-modeseg button.on.exc { background: #9f1239 !important; color: #fff; } /* [KDD-27] 예외 on = rose-800 (amber 폐지 · 빨간 계열 안에서 한 단계 어둡게) */
  #kdWin.mode-view { border-color: #94a3b8; }                                    /* 조회 = 회색 */
  #kdWin.mode-view .kd-head { background: #f1f5f9; border-bottom-color: #e2e8f0; }
  #kdWin.mode-view .kd-head h2 { color: #475569; }
  #kdWin.mode-view .kd-head h2 .material-icons { color: #64748b; }
  #kdWin.mode-view .kd-grid th { background: #f1f5f9; color: #64748b; border-bottom-color: #e2e8f0; }
  #kdWin.mode-view .kd-grid-tot { border-top-color: #cbd5e1; background: #f8fafc; }
  #kdWin.mode-view .kd-state, #kdWin.mode-view .kd-state.done { background: #e2e8f0; color: #475569; }
  #kdWin.mode-view .kd-modeseg button.on { background: #64748b !important; }
  #kdWin.mode-view .kd-hdr input, #kdWin.mode-view .kd-grid input { background: #f8fafc; }
  .kd-modeseg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; height: 28px; } /* [KDD-21] 모드 세그먼트 */
  .kd-modeseg button { height: 26px !important; border: 0 !important; border-radius: 0 !important; padding: 0 12px !important; background: #fff; color: #475569; }
  #kdWin .kd-modeseg button { width: 52px; padding: 0 4px !important; text-align: center; white-space: nowrap; } /* [KDD-35a 만포님 지시] 모드·기준 세그먼트 버튼 너비 동일(기본/예외 = 기준가/직전가 = 52px) */
  .kd-modeseg button + button { border-left: 1px solid #cbd5e1 !important; }
  .kd-modeseg button.on { background: #2563eb !important; color: #fff; }
  .kd-modeseg button.on.exc { background: #d97706 !important; color: #fff; }
  .kd-modeseg button:disabled { opacity: .5; cursor: default; }
  .kd-state.exc { background: #dbeafe; color: #1d4ed8; } /* [KDD-21] 예외(새입력) = 입력 배지와 같은 파랑 · 문구로 구분 · [KDD-21m] */
  .kd-state.exc.edit { background: #fef3c7; color: #92400e; } /* [KDD-21m] 수정 · 예외 = 노랑 */
  #kdWin.dragging { transition: none; }
  #kdWin * { box-sizing: border-box; }
  .kd-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; cursor: move; user-select: none; }
  .kd-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; }
  .kd-head h2 .material-icons { font-size: 24px; color: #2563eb; }
  .kd-state { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #dbeafe; color: #1d4ed8; font-weight: 700; }
  .kd-state.done { background: #dcfce7; color: #166534; }
  .kd-state.held { background: #fef3c7; color: #92400e; }
  .kd-state.edit { background: #fef3c7; color: #92400e; } /* [KDD-8] 수정 */
  #kdWin .kd-state.ret, #kdWin.mode-edit .kd-state.ret, #kdWin.mode-view .kd-state.ret { background: #dbeafe; color: #1d4ed8; animation: none; } /* [KDD-29] 반품 배지(머리띠 1개) — 실상품 행 전부 음수일 때만 · 모드 색과 독립 */
  #kdWin .kd-grid tr.fee td, #kdWin .kd-grid tr.fee input { color: #64748b; } /* [KDCL-2] 카드 수수료 파생 행 = 회색(잠금) */
  #kdWin .kd-grid input.kd-in-amt.fee { background: #f1f5f9; color: #64748b; } /* [KDCL-2] 수수료 금액(−표시 · 편집 불가) */
  #kdWin .kd-grid input.kd-in-net { background: #fffbeb; } /* [KDCL-2] 카드수금 순액 입력 칸(단가 칸 자리 · 임시상품 선례) */
  #kdWin .kd-grid .kd-card-gross { font-weight: 700; color: #5b21b6; cursor: help; } /* [KDCL-2] 결제액(단말기) = 순액 + 수수료 · 담당자는 이 값으로 결제 */
  .kd-badge.misc.coll.fee { background: #f1f5f9; color: #475569; } /* [KDCL-2] 수수료 배지 */
  /* [KDCL-6 2026-09-17 만포님 승인] 카드 수수료 부담 주체 토글 — 우리 부담이면 수수료 행 취소선 + '수수료X' 칩 빨강 · 합계·전송에서 제외 */
  #kdWin .kd-grid tr.fee td.num { cursor: pointer; }
  #kdWin .kd-grid tr.fee.nofee input.kd-in-amt.fee { text-decoration: line-through; color: #94a3b8; background: #f8fafc; }
  #kdWin .kd-grid .kd-fee-x { display: inline-block; padding: 0 6px; border-radius: 6px; background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 700; line-height: 20px; cursor: pointer; user-select: none; }
  #kdWin .kd-grid .kd-fee-x.on { background: #fee2e2; color: #991b1b; }
  #kdWin .kd-grid .kd-card-gross.nofee { color: #b45309; }
  .kd-grid tr.ret input.kd-in-qty, .kd-grid tr.ret td.num { color: #1d4ed8; } /* [KDD-29] 반품 행 = 수량·금액·세액 파랑(음수 파랑 규약) · 배지 없음 */
  .kd-grid-tot.ret td.num { color: #1d4ed8; } /* [KDD-29] 반품 전표 합계 띠 순액 파랑 */
  .kd-head .kd-spacer { flex: 1; }
  .kd-head button { height: 28px; padding: 0 10px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #475569; cursor: pointer; }
  .kd-head button:hover { background: #f2f6fb; }
  /* [KDHD-1 2026-09-19 만포님 승인] 머리줄 한 줄 규칙 — 자리가 모자랄 때 무엇을 양보할지 정한다(종전에는 정해져 있지 않아 제목·버튼 글자가 먼저 꺾였다 · 24인치 헤더 줄바꿈의 원인) */
  .kd-head h2, .kd-head .kd-state, .kd-head .kd-modeseg, .kd-head button, .kd-head #kdTopHint { white-space: nowrap; flex-shrink: 0; } /* 절대 양보 안 함 */
  .kd-head #kdActor { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; } /* 3순위: 접수자·회수 안내는 뒤를 …으로(전문은 풍선) */
  .kd-body { flex: 1; display: flex; min-height: 0; }
  .kd-left { flex: 0 0 57%; display: flex; /* [KDD-21f] 62→57% */ flex-direction: column; min-width: 0; border-right: 1px solid #e2e8f0; }
  .kd-right { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #f8fafc; }
  .kd-hdr { display: grid; grid-template-columns: 64px 1fr 64px 1fr; gap: 6px 10px; padding: 12px 18px; border-bottom: 1px solid #e2e8f0; align-items: center; }
  .kd-hdr label { font-size: 12px; font-weight: 700; color: #475569; }
  .kd-hdr input, .kd-hdr select { height: 32px; font-size: 13px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 8px; width: 100%; font-family: inherit; color: #1e293b; }
  .kd-hdr input:focus, .kd-grid input:focus, .kd-foot textarea:focus { outline: 2px solid #bfdbfe; outline-offset: -1px; border-color: #2563eb; }
  .kd-hdr input[readonly] { background: #f1f5f9; color: #475569; }
  .kd-hdr .kd-fno { font-weight: 700; color: #1d4ed8; letter-spacing: .3px; }
  .kd-client-wrap { position: relative; display: flex; gap: 6px; align-items: center; }
  .kd-client-wrap input { flex: 1; }
  .kd-client-name { font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* [IND-P6 2026-09-14 만포님 확정] 데스크 헤더 — 대표자 · 적용공급가 요약 칩(거래처 그룹 축약 · 공통 그룹 예외 = 주황 · 특별가 = 보라) */
.kd-ceo { font-weight: 600; color: #475569; }
.kd-client-name .kd-chip { margin-left: 6px; vertical-align: 1px; cursor: default; }
.kd-chip.mg { background: #f1f5f9; color: #334155; font-weight: 600; letter-spacing: -0.2px; }
.kd-chip.mgx { background: #fef3c7; color: #92400e; }
.kd-chip.sp { background: #ede9fe; color: #5b21b6; }
  .kd-tax { display: flex; flex-wrap: nowrap; gap: 14px; align-items: center; font-size: 12px; white-space: nowrap; min-width: 0; }
  .kd-tax input[type=radio] { margin: 0 2px 0 0; }
  .kd-tax label { font-weight: 600; color: #1e293b; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
  .kd-note { grid-column: 1 / -1; font-size: 11px; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 4px 8px; display: none; }
  .kd-note.on { display: block; }
  .kd-hdr input.fdate-warn { border-color: #f59e0b; background: #fffbeb; }
  .kd-grid-wrap { flex: 1; overflow: auto; min-height: 0; position: relative; padding: 0 12px 0; } /* [TOT-1] 바닥 여백 제거 — 합계는 아래 고정 띠 */
  .kd-grid-tot { flex: 0 0 auto; padding: 0 12px; border-top: 2px solid #cbd5e1; background: #f8fafc; } /* [TOT-1] 스크롤 밖 고정 합계 띠 · 열 폭은 표와 동일(colgroup) · 우측 여백 = 12px + 스크롤바 폭(JS 동기) */
  .kd-grid-tot table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
  .kd-grid-tot td { padding: 2px 4px; height: 28px; font-weight: 700; color: #1e293b; white-space: nowrap; } /* [KDD-21g] 32→28 */
  .kd-grid-tot.empty { display: none; } /* [KDD-21g] 행 0 = 합계 띠 숨김 → 표에 공간 */
  .kd-grid-tot td.num { text-align: right; }
  .kd-grid input.kd-in-amt { text-align: right; }
  .kd-grid input.kd-in-amt.misc { background: #fffbeb; }
  .kd-grid td.name .kd-badge.misc { background: #e0e7ff; color: #3730a3; }
.kd-badge.misc.coll { background: #fee2e2; color: #b91c1c; } /* [KDD-22] 수금 배지 — 원장 수금 행 색(빨강) 계승 */
  .kd-grid { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
  .kd-grid td.name > div { display: flex; align-items: center; gap: 4px; min-width: 0; }
  .kd-grid td.name input { flex: 1 1 auto; min-width: 0; }
  .kd-grid td.name > div:has(.kd-scanb) { flex-wrap: wrap; } /* [KDP-5l] 사진 배지 줄이 있을 때만 줄바꿈(일반 배지는 한 줄 유지) */ .kd-grid td.name .kd-scanb { flex-basis: 100%; white-space: normal; line-height: 1.5; padding: 1px 0 2px; } .kd-grid td.name .kd-scanb .kd-badge, .kd-grid td.name .kd-scanb .kd-cand { margin-left: 0; margin-right: 4px; } .kd-grid tr.scanmiss td, .kd-grid tr.scanmiss td.name { height: auto; } /* [KDP-5j] 사진 배지·후보 칩 = 입력칸 아래 줄 · 옆 칸 침범 없음 */
  .kd-grid th { position: sticky; top: 0; background: #f8fafc; color: #475569; font-weight: 700; padding: 8px 6px; border-bottom: 1px solid #e2e8f0; text-align: center; z-index: 1; white-space: nowrap; } /* [STKD-2a] 헤더 한 줄 고정(단위 줄바꿈 실사고) */
  .kd-grid td { padding: 1px 4px; border-bottom: 1px solid #e2e8f0; height: 26px; white-space: nowrap; } /* [KDD-33 만포님 지시] 33→27px 행(데스크 전용 밀도 · 극동 입력감) · 본문 12px 유지 */
  .kd-grid td.num, .kd-grid th.num { text-align: right; }
  .kd-grid td.c { text-align: center; color: #64748b; }
  .kd-grid td.c { transition: color .15s ease, box-shadow .15s ease; } .kd-grid td.c.ok { color: #15803d; box-shadow: inset 2px 0 0 #16a34a; } .kd-grid td.c.pend { color: #b45309; box-shadow: inset 2px 0 0 #f59e0b; } /* [KDRS-1a 만포님 지시] 미확정 숫자 = 굵게 하지 않는다(색 + 왼쪽 선만) */ /* [KDRS-1 2026-09-18 만포님 확정] NO. 칸 행 상태 — 확정 = 초록 · 미확정 = 주황(왼쪽 2px 선 + 숫자 색 · 칸 폭·배경 무변 · 탭 점(.dot/.dot.done)과 같은 색 말) */
  .kd-grid tr.cur td { background: transparent; } /* [KDD-25 만포님 지시] 현재 행 파란 배경 은퇴 — 입력칸 포커스 테두리만으로 위치 표시 */
  .kd-grid tr.soldout td.name { color: #dc2626; }
  .kd-grid input { width: 100%; height: 22px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 6px; font-family: inherit; color: #1e293b; } /* [KDD-33] 26→22 */
  .kd-grid input.num { text-align: right; }
  .kd-grid input.kd-in-code, .kd-grid input.kd-in-qty, .kd-grid input.kd-in-side { text-align: center; }
  .kd-grid input.kd-in-side { background: #f8fafc; color: #475569; cursor: default; padding: 0; }
  .kd-grid input.kd-in-side.tok { cursor: text; font-weight: 700; } /* [KDD-21] 예외모드 토큰 칸 */
  .kd-grid input.kd-in-side.tok-direct { background: #f1f5f9; color: #1e293b; }
  .kd-grid input.kd-in-side.tok-chain { background: #f3e8ff; color: #6b21a8; border-color: #c4b5fd; }
  .kd-grid input.kd-in-side.tok-swap { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }
  .kd-grid input.kd-in-side.tok-bad { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
  .kd-grid input[readonly] { background: #f8fafc; color: #1e293b; }
  .kd-grid input.warn { border-color: #f59e0b; background: #fffbeb; }
  .kd-grid .kd-badge { font-size: 10px; padding: 1px 5px; border-radius: 8px; margin-left: 4px; vertical-align: middle; }
  .kd-grid input.kd-in-qty.so { background: #fee2e2; } /* [STKD-2b 만포님 지시] 품절 = 수량 칸 배경만 연빨강 · 테두리·글자·굵기 기본 (STKD-2: 상품명 옆 배지 은퇴 · 빈 칸에서도 보임 · 하단 가용 0 칩과 한 짝) */
  #kdWin.mode-view .kd-grid input.kd-in-qty.so { background: #fee2e2; } /* [STKD-2b] 조회모드 동일(mode-view 회색 배경보다 뒤 · id 특이도 동일) */
  .kd-badge.scanmiss { background: #fee2e2; color: #991b1b; } /* [KDP-2b] 사전에 없는 서류 품번 */
  .kd-badge.scanhint { background: #f1f5f9; color: #64748b; } /* [KDP-2b] 표기 다름(HK80L↔MF80L · -A) */
  .kd-grid tr.scanmiss td { background: #fef2f2; } /* [KDP-2b] 미매핑 행 = 빨간 배경 · 사람이 확정 */
  .kd-cand { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 3px; background: #dbeafe; color: #1e40af; cursor: pointer; vertical-align: middle; border: 1px solid transparent; } /* [KDP-2b] 후보 칩(클릭 = 상품 확정) */
  .kd-cand:hover { background: #bfdbfe; }
  .kd-cand.mfr { background: #e0f2fe; color: #075985; } /* [KDP-2c] 제조사코드관리 열기 칩 */
  #kdBtnScan { display: none; } #kdWin.mode-pur #kdBtnScan, #kdWin.mode-wh #kdBtnScan { display: inline-flex; } /* [KDP-2b] 매입 모드 · [KDP-5g] 창고 모드(선매입 입고 명세표) */
  .kd-confirm .cbody ul.kd-warns { margin: 8px 0 0; padding-left: 18px; } .kd-confirm .cbody ul.kd-warns li { margin: 3px 0; } .kd-confirm .cbody ul.kd-warns li b { color: #b91c1c; } /* [KDP-2b] 경고 목록 */
  .kd-grid input.kd-in-price.ov { background: #fef08a; } /* [STKD-2a 만포님 지시] 단가수정 = 단가 칸 배경만 노랑 · 테두리·글자 기본 — 강하 lpfb(#fffbeb 점선)보다 확연히 노랑 */
  #kdWin.mode-view .kd-grid input.kd-in-price.ov { background: #fef08a; } /* [STKD-2a] 조회모드 동일 */
  .kd-grid input.kd-in-price.lp { background: #eff6ff; border-color: #bfdbfe; } /* [KDD-21a 만포님 지시] 최근 극동 단가 프리필 = 단가 칸 연파랑(툴팁에 전표일) · 상품명 옆 배지 폐지 */
  .kd-grid input.kd-in-price.lpfb { background: #fffbeb; border-color: #fcd34d; border-style: dashed; } /* [KDD-35 만포님 확정 ⓐ] 직전가 기준인데 이력 없음 → 기준가 강하 = 연노랑 점선(툴팁 '직전가 없음 → 기준가') */
  #kdWin .kd-modeseg.basis button.on { background: #0f766e !important; } /* [KDD-35] 단가 기준 세그먼트 on = teal(모드 세그먼트 빨강 계열과 구분) */
  #kdWin .kd-modeseg button.on.pur { background: #0369a1 !important; color: #fff; } /* [KDP-1] 매입 on = sky-700(매출 빨강 계열과 구분 · 기준가 teal 과도 구분) */
  #kdWin.mode-pur .kd-head { background: #f0f9ff; border-bottom-color: #bae6fd; } /* [KDP-1] 매입 모드 = 하늘색 머리띠(구조 동일 · 톤만 교체 — 모드 색 규칙 KDD-21m 계열) */
  #kdWin.mode-pur .kd-head h2 { color: #075985; }
  #kdWin.mode-pur .kd-head h2 .material-icons { color: #0369a1; }
  #kdWin.mode-pur .kd-state, #kdWin.mode-pur .kd-state.pur { background: #e0f2fe; color: #075985; }
  #kdWin.mode-pur .kd-grid th { background: #f0f9ff; color: #075985; border-bottom-color: #bae6fd; }
  #kdWin.mode-pur .kd-grid-tot { border-top-color: #7dd3fc; background: #f0f9ff; }
  #kdWin .kd-modeseg.corp { margin-right: 4px; flex: none; } /* [KDP-1] 법인 세그먼트(매입 모드 전용 · 거래처 칸 왼쪽) */
  #kdWin .kd-modeseg.corp button.on { background: #0369a1 !important; }
  /* [KDP-5c 2026-09-10 만포님 확정] 창고 모드 = 진회색 반전 톤(머리띠 어둡게 · 글자 밝게) — 조회모드(연회색 바탕 · 진회색 글자)와 반전 관계라 한눈에 구분 · 표·입력칸은 흰색 유지
     → [WHT-1 2026-09-19 만포님 지시] '소프트 슬레이트'로 개정 — 기본·매입과 같은 공식(연한 배경 + 짙은 글자): 머리띠 #e2e8f0(Slate 200) · 제목·아이콘 #334155(Slate 700) · 상태 배지 #334155 바탕 흰 글자. 창고 탭 버튼·창 테두리의 진회색(정체성)은 그대로.
       머리띠를 #f1f5f9 가 아니라 한 단계 짙은 #e2e8f0 로 둔 이유 = 조회모드 머리띠가 #f1f5f9 라서 같은 색이면 '창고 모드 입력 중'과 '조회 중'이 구분되지 않는다 */
  #kdWin .kd-modeseg button.on.wh { background: #334155 !important; color: #fff; }
  #kdWin.mode-wh { border-color: #334155; }
  #kdWin.mode-wh .kd-head { background: #e2e8f0; border-bottom-color: #cbd5e1; }
  #kdWin.mode-wh .kd-head h2 { color: #334155; }
  #kdWin.mode-wh .kd-head h2 .material-icons { color: #334155; }
  #kdWin.mode-wh .kd-head #kdActor { color: #475569 !important; }
  #kdWin.mode-wh .kd-state, #kdWin.mode-wh .kd-state.wh { background: #334155; color: #ffffff; }
  #kdWin.mode-wh .kd-modeseg.corp button.on { background: #334155 !important; }
  #kdWin.mode-wh .kd-grid th { background: #f1f5f9; color: #334155; border-bottom-color: #cbd5e1; }
  #kdWin.mode-wh .kd-grid-tot { border-top-color: #94a3b8; background: #f8fafc; }
  #kdWin.mode-wh .kd-grid input.kd-in-price, #kdWin.mode-wh .kd-grid input.kd-in-amt { background: #f1f5f9; color: #94a3b8; pointer-events: none; } /* 단가·금액 = 0 고정(창고전표 금액 0 · 이동은 서버 대체단가) */
  .kd-chip.wh { background: #334155; color: #fff; border-color: #1e293b; }
  .kd-chip.tok.low { opacity: .55; font-size: 10px; } /* C(순회) 후순위 칩 */
  .kd-chip.tok small { display: block; font-size: 9px; color: #64748b; line-height: 1.1; }
  .kd-chip.tok.pon small { color: #e2e8f0; }
  #kdBtnHoldPick { margin-right: 6px; } /* [KDP-5h] 헤더 상시 버튼 */
  #kdHoldCorp { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; } #kdHoldCorp button { height: 26px; padding: 0 12px; font-size: 12px; font-weight: 700; border: 0; background: #fff; color: #475569; cursor: pointer; } #kdHoldCorp button.on { background: #334155; color: #fff; } /* [KDP-5h] 법인 세그(창고 톤) */
  #kdHoldPick .cbody table { width: 100%; font-size: 12px; } #kdHoldPick .cbody th { text-align: left; color: #475569; font-weight: 700; padding: 4px 6px; border-bottom: 1px solid #e2e8f0; } #kdHoldPick .cbody td { padding: 4px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: top; } #kdHoldPick .cbody td.num, #kdHoldPick .cbody th.num { text-align: right; } #kdHoldPick .cbody input.kd-hold-in { height: 24px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 6px; }
  #kdHoldPick .cbody { max-height: 52vh; overflow: auto; }
  #kdHoldPick { position: fixed; z-index: 99980; } #kdHoldPick h3 { cursor: move; user-select: none; } #kdHoldPick.dragged { transform: none; } /* [KDP-5e] body 직속 fixed — 데스크 창(z 99972) 밖으로 끌어도 안 숨음 · 항상 맨 앞 */
  #kdHoldPick .cbody { height: 430px; max-height: 62vh; } /* [KDP-5e] 높이 고정(필터 결과와 무관) */
  #kdHoldPick .cbody th { text-align: center; } /* [KDP-5e] 헤더 가운데 */
  #kdHoldPick .cbody td.prod { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #kdHoldPick .cbody td.prod small { color: #64748b; }
  #kdHoldPick .cbody td.pl { color: #475569; white-space: nowrap; text-align: right; } #kdHoldPick .cbody td.pl small { color: #94a3b8; margin-left: 4px; } /* [KDP-5e] 1P/L 한 줄: 80 · 36P */
  #kdHoldPick .htop { display: flex; align-items: center; gap: 10px; padding: 6px 14px 0; } #kdHoldPick .htop input[type="text"] { width: 38%; height: 28px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 8px; font-size: 12px; } #kdHoldPick .htop label { font-size: 12px; color: #475569; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
  .kd-chip.pur { background: #e0f2fe; color: #075985; } /* [KDP-1] */
  .kd-chip.tok.pon { background: #0369a1; color: #fff; border-color: #0369a1; } /* [KDP-1] 선택된 입고창고·이동 칩 */
  #kdWin.mode-view .kd-modeseg.basis button.on { background: #64748b !important; }
  .kd-dd { position: absolute; z-index: 99975; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); max-height: 300px; overflow: auto; min-width: 320px; max-width: calc(100vw - 48px); width: max-content; display: none; font-size: 12px; }
  .kd-dd.on { display: block; }
  #kdProdDd { position: fixed; } /* [KDD-33] 스크롤 컨테이너(.kd-grid-wrap overflow) 안 상대 좌표 → 뷰포트 고정 좌표(12행 이후 드롭다운이 wrap 아래로 숨던 결함) · 아래 공간 부족 시 위로 펼침(ddOpen) */
  .kd-dd div { padding: 6px 10px; cursor: pointer; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
  .kd-dd div span { white-space: nowrap; flex: 0 0 auto; }
  .kd-dd div.sel, .kd-dd div:hover { background: #eff6ff; }
  .kd-dd .code { font-weight: 700; color: #1d4ed8; min-width: 110px; font-family: Consolas, monospace; }
  .kd-dd .muted { color: #64748b; font-size: 11px; }
  .kd-foot { display: grid; grid-template-columns: 60px 1fr 120px; gap: 4px 10px; padding: 6px 18px; border-top: 1px solid #e2e8f0; align-items: center; } /* [KDD-21f] 상하 여백 10→6 */
  .kd-foot label { font-size: 12px; font-weight: 700; color: #475569; }
  .kd-foot textarea { height: 32px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 8px; resize: none; font-family: inherit; line-height: 20px; } /* [KDD-21f] 44→32 (한 줄 · Shift+Enter 줄바꿈은 스크롤) */
  .kd-foot textarea::placeholder { color: #b6c0cc; font-weight: 400; white-space: nowrap; overflow: hidden; }
  .kd-bal { font-size: 12px; text-align: right; line-height: 1.5; }
  .kd-bal b { display: inline-block; min-width: 92px; color: #1e293b; }
.kd-bal #kdBalCur { color: #b91c1c; } /* [KDD-25 만포님 지시] 현잔액 = 이 전표 처리 후 결과 · 빨강 강조 */
  .kd-bal b.wait, .kd-bal #kdBalCur.wait { color: #94a3b8; font-weight: 400; font-size: 11px; } /* [KDD-30a] 미러 반영 전 조회 = 확정되지 않은 잔액을 숫자로 보여주지 않는다(확정형) */
  .kd-bal span { color: #64748b; }
  .kd-actions { display: flex; gap: 6px; padding: 10px 18px; border-top: 1px solid #e2e8f0; background: #f1f5f9; align-items: center; }
  .kd-actions button { height: 34px; padding: 0 14px; font-size: 12px; font-weight: 600; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #475569; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
  .kd-actions button .material-icons { font-size: 16px; }
  .kd-actions button.icon { padding: 0; width: 38px; justify-content: center; } .kd-actions button.icon .material-icons { font-size: 18px; } /* [KDP-5i] 아이콘 전용(사진·최소화) */
  .kd-actions button:hover:not(:disabled) { background: #f2f6fb; } /* [KDD-28 만포님 지시] 비활성 버튼은 호버 반응 없음 */
  .kd-actions button:disabled { opacity: .45; cursor: default; }
  .kd-actions .primary { background: #2563eb; color: #fff; border-color: #2563eb; }
  .kd-actions button { white-space: nowrap; flex-shrink: 0; } /* [KDD-26b] 라벨 줄바꿈·축소 방지 */
  .kd-actions #kdBtnIssue, .kd-actions #kdBtnHold, .kd-actions #kdBtnDelOrder, .kd-actions #kdBtnCancel { width: 92px; min-width: 92px; padding: 0 6px; justify-content: center; } /* [APC-2 2026-09-20 만포님 지시] 우측 4버튼 동일 폭 106 → 92(주문삭제 추가로 줄바꿈 방지) */
  .kd-actions #kdBtnEdit, .kd-actions #kdBtnDelRow { padding: 0 8px; gap: 2px; } /* [APC-2 만포님 지시] 줄삽입·줄삭제 폭 축소 */
  .kd-actions #kdBtnDelOrder { background: #fff; color: #dc2626; border-color: #dc2626; font-weight: 700; } /* [APC-2] 주문삭제 = 빨강 외곽선([취소] 빨강 채움과 구분) */
  .kd-actions #kdBtnDelOrder:hover:not(:disabled) { background: #fef2f2; } /* [KDD-26a/b 만포님 지시] 우측 3버튼 동일 폭 = 이전 극동처리 폭 */ /* [KDD-21k] 닫기 = 임시접수와 같은 폭(가장 자주 누르는 버튼) */
  .kd-actions #kdBtnMin { width: 38px; min-width: 38px; padding: 0; justify-content: center; } /* [KDD-21k] 최소화 = 아이콘만 */
  .kd-actions .primary:hover:not(:disabled) { background: #1d4ed8; }
  .kd-actions .primary:disabled { background: #cbd5e1; border-color: #cbd5e1; color: #fff; opacity: 1; cursor: default; } /* [KDD-28] 극동처리 비활성 = 무채색(누를 수 없음이 보이게) */
  .kd-actions .hold { background: #f59e0b; color: #fff; border-color: #f59e0b; } /* [KDD-26 만포님 지시] 임시접수 = 저장하기와 같은 채움 색 */
  .kd-actions .hold.save { background: #f59e0b; color: #fff; border-color: #f59e0b; } /* [KDD-8] 저장하기 = 채움 */
  .kd-actions .hold:hover:not(:disabled) { background: #d97706; }
  .kd-actions .hold:disabled { background: #e2e8f0; border-color: #e2e8f0; color: #94a3b8; opacity: 1; cursor: default; } /* [KDD-27a 만포님 지시] 비활성 = 무채색(흐린 노랑 폐지) */
  .kd-actions #kdBtnCancel.cancel-danger { background: #dc2626; color: #fff; border-color: #dc2626; } /* [KDD-26 만포님 지시] 취소 = 변경을 버림 · 빨강 채움 흰 글씨 */
  .kd-actions #kdBtnCancel.cancel-danger:hover { background: #b91c1c; }
  .kd-actions #kdBtnCancel.cancel-return { background: #fff; color: #2563eb; border-color: #2563eb; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; } /* [KDD-26 제안] 복귀하기 = 파랑 외곽선 + ↶ (조회 회색 위에서 "작성 중 전표로 돌아감") */
  .kd-actions #kdBtnCancel.cancel-return .material-icons { font-size: 18px; }
  .kd-actions #kdBtnCancel.cancel-return:hover { background: #eff6ff; }
  .kd-actions .danger { color: #dc2626; }
  .kd-actions .kd-spacer { flex: 1; }
  .kd-right h4 { margin: 0; padding: 8px 12px; font-size: 12px; font-weight: 700; color: #475569; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 6px; }
  .kd-right h4 .material-icons { font-size: 16px; color: #2563eb; }
  .kd-right h4 .kd-rq { margin-left: auto; width: 203px; /* [KDD-21h] 150→203(+35%) */ height: 24px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 8px; font-family: inherit; font-weight: 400; color: #1e293b; } /* [KDD-21e] 최근 전표 검색칸 */
  .kd-right h4 .kd-rq.on { border-color: #2563eb; background: #eff6ff; }
  .kd-recent td.cli { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; } /* [KDD-21e] 전 거래처 검색 결과의 거래처 열 */
  .kd-route { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; font-size: 12px; background: #fff; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; }
  .kd-chip { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
  .kd-chip.corp1 { background: #dbeafe; color: #1e40af; }
  .kd-chip.corp2 { background: #ede9fe; color: #5b21b6; }
  .kd-chip.chain { background: #f3e8ff; color: #6b21a8; }
  .kd-chip.warn { background: #fef3c7; color: #92400e; }
  .kd-chip.ok { background: #dcfce7; color: #166534; }
  .kd-chip.gray { background: #e2e8f0; color: #475569; }
  .kd-chip.stk { margin-left: 10px; padding: 1px 8px; background: #e2e8f0; color: #334155; vertical-align: baseline; } /* [STKD-1] 합계 띠 '가용 N' 칩 — 충분 */
  .kd-chip.stk.short { background: #fef3c7; color: #b45309; } /* [STKD-1] 입력 수량 > 가용 (exc/확인요망 톤) */
  .kd-chip.stk.out { background: #fee2e2; color: #991b1b; } /* [STKD-1] 가용 ≤ 0 (품절 배지 톤) */
  .kd-chip.stk.na { background: #f1f5f9; color: #94a3b8; font-weight: 600; } /* [STKD-1] 판정 없음 · 풍선에 사유 */
  .kd-chip.exc { background: #fef3c7; color: #b45309; } /* [KDD-21] */
  .kd-chip.tok { background: #f8fafc; color: #334155; border: 1px solid #e2e8f0; font-weight: 600; }
  .kd-chip.tok.def { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
  .kd-chip.plt { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; } /* [PLT-P2 2026-09-15] 최적 적재 칩 — 적재·택배비 탭과 같은 teal 계열 · 갱신 대기 중(stale)은 흐리게 */
  .kd-chip.plt.stale { opacity: .6; }
  .kd-right h4 .kd-plt-wrap { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; } /* [PLT-P2a] 제목 줄 우측 정렬(최근 전표 검색칸 규칙) */
  .kd-chip.plt.on { box-shadow: 0 0 0 2px #a5f3fc inset; } /* [PLT-P3] 도면 열림 */
  .kd-plt-draw { padding: 8px 12px 10px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; font-size: 12px; max-height: 52vh; overflow: auto; } /* [P3a] 패널 자체 스크롤 — 아래 최근 전표를 밀지 않는다 */
  .kd-plt-draw-head { display: flex; align-items: center; gap: 8px; color: #0f172a; white-space: nowrap; }
  .kd-plt-sum { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; color: #0e7490; font-weight: 700; }
  .kd-plt-legend { color: #64748b; font-size: 11px; margin: 2px 0 6px; }
  .kd-plt-layers { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }
  .kd-plt-layer { flex: 0 0 auto; }
  .kd-plt-x { width: 22px; height: 22px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: pointer; font-size: 12px; color: #475569; padding: 0; }
  .kd-plt-pal { margin: 4px 0; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 4px 8px; }
  .kd-plt-pal summary { cursor: pointer; font-weight: 700; color: #0e7490; padding: 2px 0; }
  .kd-plt-layer { margin: 6px 0 2px; }
  .kd-plt-cap { color: #475569; font-size: 11px; margin: 4px 0 2px; }
  .kd-chip.plt small.chk { font-size: 9px; font-weight: 800; background: #fef3c7; color: #b45309; border-radius: 6px; padding: 0 4px; margin-left: 5px; vertical-align: 1px; } /* [PLT-P1c] 경계 확인요망 */
  .kd-chip.plt small.est { font-size: 9px; font-weight: 700; background: #fff; color: #0369a1; border-radius: 6px; padding: 0 4px; margin-left: 5px; vertical-align: 1px; }
  .kd-extras { max-height: 34%; overflow: auto; border-bottom: 1px solid #e2e8f0; background: #fff; }
  .kd-extras .row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 12px; border-bottom: 1px solid #f1f5f9; font-size: 12px; cursor: pointer; }
  .kd-extras .row:hover { background: #f8fafc; }
  .kd-extras .row input { margin-top: 3px; }
  .kd-extras .empty { padding: 10px 12px; color: #94a3b8; font-size: 12px; }
  .kd-extras .st { font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
  .st.stl { background: #dcfce7; color: #166534; } .st.def { background: #fee2e2; color: #991b1b; } .st.nor { background: #dcfce7; color: #166534; } .st.pend { background: #fef3c7; color: #92400e; }
  .kd-recent { flex: 1; overflow: auto; min-height: 0; background: #fff; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #e2e8f0; } /* [KDD-21g] 바닥 여백 · [KDD-21h] 목록 상자 자체가 창 바닥에서 12px 떠 있게(margin) */
  .kd-recent table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
  .kd-recent th { position: sticky; top: 0; background: #f8fafc; color: #475569; font-weight: 700; padding: 6px; border-bottom: 1px solid #e2e8f0; text-align: center; }
  .kd-recent td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; text-align: center; }
  .kd-recent td.num { text-align: right; }
  .kd-recent td.memo { max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: #475569; text-align: left; }
  .kd-recent tr.mine td { background: #eff6ff; font-weight: 700; }
  .kd-recent tr.ecs td.fno { text-decoration: underline dotted #94a3b8; text-underline-offset: 2px; } /* [KDD-31] 서버 확정 · 극동 미러 반영 대기 전표 — 점선 밑줄 + 툴팁만(배지 없음) */
  .kd-recent td.fno { font-family: Consolas, monospace; color: #1d4ed8; text-decoration: underline; cursor: pointer; } /* [KDD-9] 클릭 = 조회모드 */
  .kd-recent td.fno:hover { background: #dbeafe; }
.kd-recent span.fno { font-family: Consolas, monospace; color: #1d4ed8; text-decoration: underline; cursor: pointer; padding: 0 2px; border-radius: 3px; } .kd-recent span.fno:hover { background: #dbeafe; } /* [KDW-R1] 창고 모드 전표번호(한 셀에 ①·②) */
  .kd-recent th.w1 { width: 1%; white-space: nowrap; } /* [KDD-21n] 자릿수 고정 열 = 내용 폭 (table 은 auto 레이아웃 · 잔여 폭은 거래처·비고) */
  #kdChip { display: none; position: fixed; left: 262px; bottom: 16px; z-index: 99971; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: 20px; background: #1e293b; color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,0.28); cursor: pointer; max-width: 420px; white-space: nowrap; }
  #kdChip.on { display: inline-flex; }
  #kdChip .material-icons { font-size: 18px; color: #93c5fd; }
  #kdChip .st { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: #334155; color: #cbd5e1; }
  #kdChip .st.done { background: #14532d; color: #bbf7d0; } #kdChip .st.held { background: #78350f; color: #fde68a; }
  #kdChip .t { overflow: hidden; text-overflow: ellipsis; }
  .kd-tabs { display: none; }
  .kd-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; font-size: 11px; font-weight: 600; color: #475569; cursor: pointer; white-space: nowrap; max-width: 180px; }
  .kd-tab.active { background: #e9f2ff; border-color: #2563eb; color: #1d4ed8; }
  .kd-tab .x { color: #94a3b8; font-size: 14px; line-height: 1; }
  .kd-tab .x:hover { color: #dc2626; }
  .kd-tab .dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
  .kd-tab .dot.done { background: #16a34a; }
  .kd-tabs .add { border-style: dashed; color: #2563eb; }
  .kd-overlay { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.92); z-index: 5; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; font-size: 13px; color: #475569; }
  .kd-overlay.on { display: flex; }
  .kd-overlay .ring { width: 48px; height: 48px; border: 3px solid rgba(26,115,232,0.12); border-top-color: #1a73e8; border-radius: 50%; animation: kdspin 1.2s cubic-bezier(0.5,0,0.5,1) infinite; }
  @keyframes kdspin { to { transform: rotate(360deg); } }
  .kd-confirm { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 560px; max-width: 95%; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); z-index: 6; display: none; flex-direction: column; max-height: 80%; }
  .kd-confirm.on { display: flex; }
  .kd-confirm h3 { margin: 0; padding: 12px 16px; font-size: 15px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 6px; }
  .kd-confirm h3 .material-icons { color: #f59e0b; }
  .kd-confirm .cbody { padding: 10px 16px; overflow: auto; font-size: 12px; line-height: 1.6; }
  .kd-confirm .cbody table { width: 100%; border-collapse: collapse; }
  .kd-confirm .cbody th, .kd-confirm .cbody td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; text-align: left; }
  .kd-confirm .cbody td.num { text-align: right; }
  #kdConfirm .cbody th { text-align: center; } #kdConfirm .cbody td.num, #kdConfirm .cbody td:nth-child(2) { text-align: center; } /* ★ [KDOS-1c 2026-09-21 만포님 지시] 재고 부족 확인창 표 — 항목명 전부·창고(2열)·재고/요청/부족 값 가운데(상품 값만 왼쪽) · 다른 kd-confirm 창(발행 확인·보관분 등) 무접촉 */
  .kd-confirm .cact { display: flex; gap: 6px; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid #e2e8f0; background: #f1f5f9; }
  .kd-confirm .cact button { height: 34px; padding: 0 14px; font-size: 12px; font-weight: 600; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #475569; cursor: pointer; }
  .kd-confirm .cact .primary { background: #2563eb; color: #fff; border-color: #2563eb; }
  .kd-confirm .sum { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; font-size: 12.5px; }
  .kd-confirm .sum b { color: #1e293b; }
  .kd-confirm .sum .big { font-size: 15px; font-weight: 700; color: #1d4ed8; }
  .kd-extras .grp { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 700; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 1; } /* [KDD-8] 그룹 헤더(현물정산 · AS) */
  .kd-extras .grp .n { font-weight: 400; color: #64748b; }
  .kd-extras .grp label { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; cursor: pointer; }
  .kd-extras .grp label input { margin: 0; }
  .kd-toast { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); background: #1e293b; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 12px; z-index: 7; display: none; max-width: 90%; white-space: pre-wrap; }
  .kd-toast.on { display: block; }
  .kd-toast.err { background: #dc2626; }
  .kd-toast.ok { background: #166534; }
  /* [KDLG-1 2026-09-17 만포님 승인] 데스크 공용 대화상자 — 브라우저 alert/confirm 대체 · .kd-confirm 규격 상속 · 창 정중앙 · 본문 글자 선택·복사 가능 */
  .kd-dialog { z-index: 8; width: 520px; }
.kd-dlg-shield { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 7; display: none; background: rgba(15,23,42,0.10); border-radius: inherit; cursor: default; } /* [DSK-2a3 2026-09-17 만포님 확정] 알림·확인창이 떠 있는 동안 뒤 화면을 막는 막 — 브라우저 기본 alert/confirm 의 '뒤를 막는 성질' 복원(KDLG-1 에서 빠졌던 것) · 발행 확인 패널(z6) 위 · 알림창(z8) 아래 */
.kd-dlg-shield.on { display: block; }
  .kd-dialog .cbody { white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; max-height: 60vh; font-size: 12.5px; }
  .kd-dialog .cact button:focus { outline: 2px solid #2563eb; outline-offset: 1px; }
  .kd-dialog .cact button.primary:focus { outline-color: #1d4ed8; }
  #kdIssue .cact button:focus { outline: 2px solid #2563eb; outline-offset: 1px; } /* [KDIC-1 2026-09-18] 발행 확인창 — 첫 커서가 [극동처리 확정] 에 있음이 보이도록(.kd-dialog 와 같은 규격) */
  #kdIssue .cact button.primary:focus { outline-color: #1d4ed8; }
  #kdConfirm .cact button:focus { outline: 2px solid #2563eb; outline-offset: 1px; } /* ★ [KDOS-1 2026-09-21] 재고 부족 확인창 — 버튼 3개(중단·부족해도 진행·제외하고 진행) ← → 이동이 보이도록(KDIC-1 규격 그대로) */
  #kdConfirm .cact button.primary:focus { outline-color: #1d4ed8; }
  .kd-dialog.swap .cact { flex-direction: row-reverse; justify-content: flex-start; } /* [KDLG-2 2026-09-18 만포님 지시] 버튼 좌우 바꿈 — 오른쪽 정렬은 그대로 · [확인(버리고 계속)] 왼쪽 · [취소] 오른쪽 */
  /* ───────── [DWIN-1 2026-09-18 만포님 확정] 데스크 전용 창(/desk/window.html) — 껍데기가 <html class="kd-host-window"> 를 세운다. 본체(index.html)에는 이 클래스가 없으므로 아래 규칙은 본체 모달에 닿지 않는다 ───────── */
  html.kd-host-window #kdFab { display: none !important; } /* 창 전체가 데스크 — 둥근 버튼 없음(본문의 300ms 표시 루프가 인라인 display 를 다시 써도 이긴다) */
  html.kd-host-window #kdWin { left: 0 !important; top: 0 !important; width: 100vw !important; max-width: none !important; height: 100vh !important; max-height: none !important; border: 0; border-radius: 0; box-shadow: none; transform: none !important; } /* 위치 기억(kd_desk_win_pos)이 인라인 left/top 을 써도 창 전체를 덮는다 · position:fixed 는 그대로(로드 관문이 확인) */
  html.kd-host-window #kdWin .kd-head { cursor: default; } /* 끌어서 옮기는 창이 아니다 */
  html.kd-host-window #kdBtnMin { display: none; }
  /* [KDHD-1] 전용 창은 별도 문서라 창 폭을 CSS 가 잰다 — 폭 단계별 양보(기본 창은 모달이라 여기 없음) · 검증기 규약: kd-host-window 규칙 줄은 html.kd-host-window 로 시작 */
  @media (max-width: 1700px) {
  html.kd-host-window #kdTopHint .kd-hint-txt { display: none; } /* 2순위: 📌 글자 숨김(아이콘만 · 풍선에 전문) */
  html.kd-host-window #kdTopHint { margin-right: 2px; }
  }
  @media (max-width: 1300px) {
  html.kd-host-window .kd-head #kdActor { display: none; } /* 4순위: 접수자·회수 안내 숨김 */
  } /* 최소화 = 운영체제 창의 최소화 단추 */

/* ═══ ★ [KPD-1 2026-09-21 만포님 확정] 데스크 [행사조회] — 우측 h4 버튼 + 모달(.kd-confirm 규격 상속 · 폭만 확장) ═══ */
.kd-right h4 .kd-promo-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px; font-size: 11.5px; font-weight: 700; color: #1d4ed8; background: #eff6ff; border: 1px solid #93c5fd; border-radius: 6px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.kd-right h4 .kd-promo-btn .material-icons { font-size: 14px; color: #1d4ed8; }
.kd-right h4 .kd-promo-btn:hover:not(:disabled) { background: #dbeafe; }
.kd-right h4 .kd-promo-btn:disabled { opacity: .45; cursor: default; }
.kd-promo { width: 820px; max-width: 96%; max-height: 82%; } /* (KPD-1b 2026-09-21 만포님 지시) 좌:우 = 4:6 · 우측 표 줄바꿈 없이 */
.kd-promo .pbody { display: flex; min-height: 0; flex: 1; overflow: hidden; }
.kd-promo .plist { width: 40%; flex: 0 0 40%; border-right: 1px solid #e2e8f0; overflow: auto; background: #f8fafc; } /* (KPD-1b) 240px 고정 → 40% */
.kd-promo .plist .prow { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid #e2e8f0; background: transparent; font-family: inherit; font-size: 12px; color: #1e293b; cursor: pointer; line-height: 1.45; }
.kd-promo .plist .prow:hover { background: #eef2ff; }
.kd-promo .plist .prow.cur { background: #e9f2ff; box-shadow: inset 3px 0 0 #2563eb; }
.kd-promo .pdetail { flex: 0 0 60%; width: 60%; min-width: 0; overflow: auto; padding: 10px 12px; font-size: 12px; line-height: 1.5; } /* (KPD-1b) 60% */
.kd-promo .empty { padding: 14px 10px; color: #94a3b8; font-size: 12px; text-align: center; }
.kd-promo .empty.err { color: #b91c1c; }
.kd-promo .sub { color: #64748b; font-size: 11px; font-weight: 400; }
.kd-promo .st { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; font-weight: 600; vertical-align: 1px; }
.kd-promo .st.on { background: #dcfce7; color: #166534; } .kd-promo .st.over { background: #f1f5f9; color: #64748b; } .kd-promo .st.pre { background: #fef3c7; color: #92400e; } .kd-promo .st.off { background: #fee2e2; color: #991b1b; }
.kd-promo .st.done { background: #dcfce7; color: #166534; } .kd-promo .st.todo { background: #fee2e2; color: #991b1b; } .kd-promo .st.live { background: #e0f2fe; color: #075985; }
.kd-promo .phead { padding: 4px 0 10px; font-size: 13px; border-bottom: 1px solid #e2e8f0; margin-bottom: 8px; }
.kd-promo .ptbl { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.kd-promo .ptbl th, .kd-promo .ptbl td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; text-align: left; white-space: nowrap; } /* (KPD-1b) 줄바꿈 없음 */
.kd-promo .ptbl td:first-child { white-space: normal; } /* 상품명 칸만 필요 시 줄바꿈(코드가 긴 경우) */
.kd-promo .ptbl .num { width: 1%; } /* 숫자 3열은 내용 폭만 · 나머지는 상품명 */
.kd-promo .ptbl th { background: #f1f5f9; color: #475569; font-weight: 700; font-size: 11.5px; }
.kd-promo .ptbl .num { text-align: right; }
.kd-promo .ptbl tfoot td { background: #f8fafc; font-weight: 700; }
.kd-promo .ptbl tr.zero td { color: #94a3b8; }
.kd-promo .pnote { padding: 8px 10px; background: #fef3c7; color: #92400e; border-radius: 6px; font-size: 11.5px; }
.kd-promo .cact button.mark { color: #166534; border-color: #86efac; background: #f0fdf4; }
.kd-promo .cact button:disabled { opacity: .45; cursor: default; }
#kdPromo { position: fixed; } #kdPromo h3 { cursor: move; user-select: none; } #kdPromo.dragged { transform: none; } /* (KPD-1f) fixed = ecsDrag 계약(뷰포트 좌표 · 데스크 창·보관분 창과 동일) */ /* (KPD-1d 2026-09-22 만포님 지시) [행사조회] 제목줄 드래그 · 보관분 창과 같은 규칙 */
.kd-promo .ptbl .hot { color: #dc2626; } /* (KPD-1g 2026-09-22 만포님 지시) 매출공제 합계·10+1 지급수량 > 0 = 빨강 */
.kd-parcel { border-top: 1px dashed #e2e8f0; padding: 8px 16px 10px; font-size: 12px; background: #fff; } /* (DSN-1b 2026-09-22 만포님 확정) 확인창 택배 구획 — .cbody 와 .cact 사이 · 토글 기본 꺼짐 */
.kd-parcel .phead { display: flex; align-items: center; gap: 10px; }
.kd-parcel .ptg { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #1e293b; cursor: pointer; user-select: none; }
.kd-parcel .ptg input { margin: 0 2px 0 0; }
.kd-parcel .ptg .material-icons { font-size: 16px; color: #0369a1; }
.kd-parcel .pnote { color: #64748b; font-size: 11px; }
.kd-parcel .pbody { margin-top: 8px; max-height: 38vh; overflow: auto; }
.kd-parcel .pbody input[type="text"], .kd-parcel .pbody input:not([type]), .kd-parcel .pbody select { height: 26px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 6px; background: #fff; color: #1e293b; box-sizing: border-box; }
.kd-parcel .pbody input:disabled, .kd-parcel .pbody select:disabled { background: #f8fafc; color: #64748b; }
.kd-parcel .pbody .sum b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-weight: 400; }
.kd-parcel .pbtn { height: 26px; padding: 0 10px; font-size: 11px; font-weight: 600; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #475569; cursor: pointer; }
.kd-parcel .pbtn:disabled { opacity: .45; cursor: default; }
.kd-parcel .ptbl { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; }
.kd-parcel .ptbl th { text-align: left; color: #475569; font-weight: 700; padding: 3px 6px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.kd-parcel .ptbl td { padding: 3px 6px; border-bottom: 1px solid #f1f5f9; }
.kd-parcel .ptbl tfoot td { font-weight: 700; border-bottom: 0; color: #1d4ed8; }
.kd-parcel .phint { color: #64748b; font-size: 11px; margin-top: 6px; }
.kd-parcel .pload { color: #64748b; padding: 6px 0; }
.kd-chip.pcl { background: #e0f2fe; color: #075985; margin-left: 6px; vertical-align: middle; } /* (DSN-1b) 경로·배송 제목줄 운송장 칩 — 접수됨 */
.kd-chip.pcl.ok { background: #dcfce7; color: #166534; } /* 운송장번호 회수 */
.kd-chip.pcl.gray { background: #e2e8f0; color: #475569; } /* 접수 중 · 발행 전 */
.kd-chip.pcl.err { background: #fee2e2; color: #991b1b; cursor: pointer; } /* 접수 실패 · 클릭 = 재시도 */
#kdIssue { width: 760px; max-height: 88%; } /* (DSN-1b-x 2026-09-23 만포님 지시) 발행 확인창 세로 여유형 — 폭 760 · 높이 88% · 요약(cbody) 최소 6줄 확보 · 택배 본문은 안쪽 스크롤 */
#kdIssue.dragged { position: fixed; transform: none; max-height: 88vh; } /* 드래그 계약(KPD-1f) = fixed · 픽셀 좌표 · transform 없음 */
#kdIssue h3 { cursor: move; user-select: none; }
#kdIssue .cbody { flex: 1 1 auto; min-height: 150px; }
#kdIssue .kd-parcel { flex: 0 0 auto; }
#kdIssue .kd-parcel .pbody { max-height: 46vh; }
.kd-parcel .pbody .sum b label { display: inline-flex; align-items: center; gap: 4px; }
.kd-parcel .ptbl td .phint { display: block; margin-top: 2px; }
#kdIssue details.kd-items { margin-top: 8px; color: #64748b; } /* (DSN-1b-y 2026-09-23 만포님 지시) 확인창 품목 나열 = 접어 둠 */
#kdIssue details.kd-items > summary { cursor: pointer; font-size: 11.5px; color: #2563eb; font-weight: 600; user-select: none; }
#kdIssue details.kd-items > div { margin-top: 4px; }
.kd-parcel .ptbl td.pitems { cursor: help; }
.kd-parcel .ptbl .pinfo { font-size: 14px; color: #94a3b8; vertical-align: -2px; }
.kd-pclv { width: 860px; max-width: 96%; max-height: 82%; } /* (DSN-1d 2026-09-23 만포님 확정) 택배조회 — 오늘 접수 목록·상태·운송장번호 */
.kd-pclv .pbody { flex: 1; min-height: 120px; overflow: auto; padding: 10px 16px; }
.kd-pclv .pbody .empty { color: #64748b; font-size: 12px; padding: 18px 0; text-align: center; }
.kd-pclv .ptbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.kd-pclv .ptbl th { text-align: left; color: #475569; font-weight: 700; padding: 4px 6px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; position: sticky; top: 0; background: #fff; }
.kd-pclv .ptbl td { padding: 4px 6px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.kd-pclv .ptbl tr.err td { background: #fef2f2; }
.kd-pclv .pbtn { height: 24px; padding: 0 9px; font-size: 11px; font-weight: 600; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #475569; cursor: pointer; }
.kd-pclv .pbtn:disabled { opacity: .45; cursor: default; }
.kd-chip.pcl.warn { background: #fef3c7; color: #92400e; }
/* [DSN-3 2026-09-27 만포님 확정] 송장대기 — 확인창 [인쇄대기 추가](호박색 보조 버튼 · KDIC-1 포커스 규격) · '인쇄대기/대기(보류)' 칩 · 택배조회 [송장출력] */
#kdIssue .cact button.hold { background: #fffbeb; color: #b45309; border-color: #f59e0b; display: inline-flex; align-items: center; }
#kdIssue .cact button.hold:hover { background: #fef3c7; }
#kdIssue .cact button.hold:focus { outline: 2px solid #d97706; outline-offset: 1px; }
.kd-chip.pcl.hold { background: #fef3c7; color: #b45309; }
.kd-pclv .pbtn.rel { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.kd-right h4 #kdBtnPclv { margin-left: 8px; }
#kdPclv { position: fixed; } #kdPclv h3 { cursor: move; user-select: none; } #kdPclv.dragged { transform: none; } /* (DSN-1d2 2026-09-23 만포님 지시) 제목줄 드래그 = KPD-1f 계약(fixed · transform 없음) — 종전 누락으로 잡으면 창이 달아났다 */
.kd-pclv .phead { display: flex; align-items: center; gap: 6px; padding: 8px 16px 0; font-size: 12px; flex-wrap: wrap; }
.kd-pclv .phead .lbl { color: #475569; font-weight: 700; }
.kd-pclv .phead .seg { height: 26px; padding: 0 10px; font-size: 11.5px; font-weight: 600; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #475569; cursor: pointer; }
.kd-pclv .phead .seg.on { border-color: #2563eb; background: #dbeafe; color: #1d4ed8; }
.kd-pclv .phead input[type="date"] { height: 26px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 6px; }
.kd-pclv .phead #kdPclvQ { margin-left: auto; width: 260px; height: 26px; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 8px; }
.kd-pclv .ptbl th, .kd-pclv .ptbl td { text-align: center; } /* (DSN-1d2) 가운데 정렬 — 거래처만 왼쪽 */
.kd-pclv .ptbl th.l, .kd-pclv .ptbl td.l { text-align: left; }
.kd-pclv .ptbl tfoot td { font-weight: 700; color: #1d4ed8; border-top: 2px solid #e2e8f0; border-bottom: 0; background: #f8fafc; position: sticky; bottom: 0; }
.kd-pclv .ptbl .fnolink { color: #2563eb; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.kd-pclv .ptbl .fnolink:hover { color: #1d4ed8; }
.kd-pclv { height: 82%; max-height: 82%; } /* (DSN-1d3 2026-09-23 만포님 지시) 데스크 창 높이만큼 고정 — 건수가 적어도 창이 쪼그라들지 않게 · 목록만 안쪽 스크롤 */
.kd-pclv .pbody { flex: 1 1 auto; min-height: 0; overflow: auto; }
.kd-pclv { width: 740px; height: 57%; max-height: 57%; min-height: 260px; } /* (DSN-1d4 2026-09-23 만포님 지시) 높이 30% 축소 · 폭 타이트 — 상태·운송장번호·처리 열은 최소 폭 */
.kd-pclv .ptbl th, .kd-pclv .ptbl td { padding: 4px 4px; }
.kd-pclv .ptbl .kd-chip.pcl { margin-left: 0; padding: 1px 6px; }
.kd-pclv .pbtn { padding: 0 7px; }
.kd-pclv .phead { flex-wrap: nowrap; gap: 5px; padding: 8px 12px 0; } /* (DSN-1d5 2026-09-23 만포님 지시) 머리줄 한 줄 고정 — 줄바꿈 없음 */
.kd-pclv .phead .seg { padding: 0 8px; flex: 0 0 auto; }
.kd-pclv .phead input[type="date"] { width: 116px; flex: 0 0 auto; padding: 0 4px; }
.kd-pclv .phead #kdPclvQ { width: 176px; flex: 1 1 130px; min-width: 110px; margin-left: auto; }
.kd-pclv { width: 780px; } /* (DSN-1d6 2026-09-23 만포님 확정) 행 → 유형·수량 두 열 — 한 열 늘어난 만큼(40px)만 넓힘 · 거래처 칸 폭은 종전 그대로 */
.kd-pclv { height: 725px; max-height: calc(100vh - 40px); } /* (DSN-1d8c 2026-09-23 만포님 확정) 높이 = 지금 기본 창에서 보이는 높이(만포님 화면 실측 약 725px · "딱 좋아") 로 두 창 고정 — 전용 창은 창이 본체보다 낮아 57vh 가 약 530px 로 작았다 · 화면이 작으면 화면 높이 − 40px 까지만 */
.kd-pclv h3 .pclv-hc { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; user-select: none; white-space: nowrap; } /* (DSN-1d8) 제목줄 우측 끝 [취소가리기] */
.kd-pclv h3 .pclv-hc input { margin: 0; cursor: pointer; }
.kd-recent td.cli { text-align: left; } /* (DSN-1d8 2026-09-23 만포님 지시) 최근 전표 목록 거래처 칸 왼쪽 정렬 */
.kd-pclv .ptbl td.pk.mix { color: #b91c1c; font-weight: 700; } /* (DSN-1d6) 유형 '혼합'(파렛·낱개 섞임 = 규칙 위반)만 빨강 — 파렛·낱개는 기본 글자 */

.kd-parcel .pup-err { color: #b91c1c; font-weight: 600; } /* (DSN-1e 2026-09-23) 업체 파일 막힘 사유 */
.kd-parcel .ptbl td.pup-addr { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* (DSN-1e) 미리보기 주소 한 줄 */

/* (DSN-2c 2026-09-24 만포님 확정) 대신 PC 멈춤 알림 — 빨간 점 · 알림 띠 */
.kd-promo-btn.pcl-alert, #kdFab.pcl-alert { position: relative; }
.kd-promo-btn.pcl-alert::after, #kdFab.pcl-alert::after { content: ''; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 2px #fff; }
.kd-pclalert-bar { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 6px 10px; border: 1px solid #fecaca; border-radius: 6px; background: #fef2f2; color: #991b1b; font-size: 12px; }
.kd-pclalert-bar .material-icons { font-size: 16px; } .kd-pclalert-bar span:not(.material-icons) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kd-pclalert-bar .pbtn { height: 24px; padding: 0 9px; font-size: 11px; font-weight: 600; border: 1px solid #fca5a5; border-radius: 4px; background: #fff; color: #991b1b; cursor: pointer; white-space: nowrap; }
