/* 사내 CS 1.8 P1 화면 개선 (P-03, 2026-10-25). 다른 화면 파일 뒤에 읽어 덮어쓴다. */

/* P1-8 기본 글자 크기 ×1.25: 브라우저 100%에서 지금 사이트를 125%로 본 크기.
   글자·행 높이·입력칸·여백이 같은 비율로 커진다. 휴대폰 폭(950px 이하)은 기존 크기를 유지한다.
   다른 CSS의 vh/vw는 calc(…/var(--ui-zoom))로, 760px 초과 화면폭 기준은 ×1.25로 맞춰 두었다. */
:root{--ui-zoom:1}
@media (min-width:951px){:root{--ui-zoom:1.25}html{zoom:1.25}}

/* P1-3 상태 색: 메뉴와 상관없이 같은 색 (접수 대기 파랑 · 처리 중 주황 · 보류 회색 · 처리 완료 초록) */
:root{--s-wait:#2f6fd0;--s-wait-bg:#e7effb;--s-doing:#b9600c;--s-doing-bg:#fcf0e2;--s-hold:#62676b;--s-hold-bg:#eceeef;--s-done:#2f7d46;--s-done-bg:#e5f3e8;--s-flag:#8f5d00;--s-flag-bg:#fff1c9}
.consultation-status-pending,.badge.pending,.badge.review,.wf-status-pending{background:var(--s-wait-bg);color:var(--s-wait)}
.consultation-status-processing,.badge.processing,.wf-status-processing{background:var(--s-doing-bg);color:var(--s-doing)}
.consultation-status-hold,.badge.hold,.wf-status-hold{background:var(--s-hold-bg);color:var(--s-hold)}
.consultation-status-completed,.badge.completed,.wf-status-completed{background:var(--s-done-bg);color:var(--s-done)}
.wf-status{display:inline-flex;align-items:center;padding:4px 8px;border-radius:6px;font-weight:600;white-space:nowrap}
.review-flag{display:inline-flex;align-items:center;margin-left:5px;padding:4px 7px;border-radius:999px;background:var(--s-flag-bg);color:var(--s-flag);font-size:11px;font-weight:700;white-space:nowrap;cursor:help;vertical-align:middle}
.issue-card-status{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.review-reason{display:block;margin-top:4px;color:#7d7262;font-size:11px;white-space:normal}

/* 대시보드 입고 현황: 반품·교환·A/S·제품사고 + 검수미완료 */
.workflow.receipt-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (min-width:2000px){.workflow.receipt-overview{grid-template-columns:repeat(6,minmax(0,1fr))}}
.workflow.receipt-overview .stage .name{white-space:nowrap}
.workflow.receipt-overview .stage{min-width:0}
.workflow.receipt-overview .stage-alert{background:#fffaf0;border-color:#f0d58a}

/* 상담 목록: 1440(배율 1.25)에서도 연결 업무 열이 보이게 폭을 줄이고 연결 업무 열은 오른쪽에 고정 */
.cw-table{min-width:860px}
.cw-table th:nth-child(1){width:96px}
.cw-table td:nth-child(1){white-space:nowrap}
.cw-table th:nth-child(2){width:88px}
.cw-table th:nth-child(3){width:132px}
.cw-table th:nth-child(4){width:130px}
.cw-table th:nth-child(6){width:80px}
.cw-table th:nth-child(7){width:178px}
.cw-table td:nth-child(4){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cw-table :is(th,td):last-child{position:sticky;right:0;background:#fff;box-shadow:-6px 0 8px -6px rgba(0,0,0,.18)}
.cw-table th:last-child{background:#edf1f6}
.cw-table tr[data-cw-record]:hover>td:last-child{background:#edf3ff}

/* 송장 사진 등록: 안내 3단계 삭제 후 한 칸 */
.split-content.single{grid-template-columns:minmax(0,1fr)}

/* P1-7 입고 관리 표: 10칸 + 행 펼침, 왼쪽(번호·입고일)·오른쪽(조회·연결) 고정 */
/* A4 확인: 1920에서 넘치지 않게 # 56px·입고일 116px, 송장·고객·제품 칸도 조금 줄인다(1440은 좌우 고정 열로 조작). */
.receipt-workspace{--receipt-sheet-min:1180px;--receipt-row-width:56px;--receipt-date-width:116px;--receipt-link-width:150px}
.receipt-sheet-table td.receipt-row-no{padding-left:4px;padding-right:4px}
.receipt-sheet-table td.receipt-row-no>button[data-select-row]{padding:0 4px}
.receipt-sheet-table .rs-invoice{width:148px}
.receipt-sheet-table .rs-type{width:104px}
.receipt-sheet-table .rs-care{width:88px}
.receipt-sheet-table .rs-customer{width:132px}
.receipt-sheet-table .rs-product{width:140px}
.receipt-sheet-table td [data-row-field="received_date"]{padding-left:4px;padding-right:2px}
.receipt-sheet-table .rs-inspection{width:110px}
.receipt-sheet-table .rs-content{width:auto}
.receipt-expand{display:inline-grid;place-items:center;width:20px;height:20px;border:1px solid #d6dde6;border-radius:4px;background:#fff;font-size:11px;line-height:1;color:#3a4a5e;padding:0;margin:0 4px 2px 0;vertical-align:middle;cursor:pointer}
.receipt-expand[aria-expanded="true"]{background:#edf1f6;border-color:#8fa3bb}
.receipt-saved-select{display:inline-flex;align-items:center;gap:4px;vertical-align:middle}
.receipt-row-no>button.receipt-expand{display:inline-block;margin:0 0 2px}
.receipt-row-no>button[data-select-row]{display:inline-block}
.receipt-sheet-table tr.receipt-expand-row>td{position:static!important;box-shadow:none!important;background:#f9fafc!important;padding:8px 12px}
.receipt-sheet-table tr.receipt-expand-row.receipt-draft>td{background:#fffdf5!important}
.receipt-expand-body{position:sticky;left:12px;display:flex;flex-wrap:wrap;gap:10px 18px;align-items:flex-start;max-width:min(980px,calc(100vw - 420px))}
.receipt-expand-field{display:grid;gap:4px;min-width:160px;font-size:12px;color:#213249}
.receipt-expand-field.wide{flex:1 1 280px}
.receipt-expand-field>span:first-child{font-size:11px;color:#536470}
.receipt-link-cell{display:table-cell}
.receipt-link-cell .receipt-connect{display:flex;align-items:center;gap:4px;margin:4px 0 3px}
.receipt-link-cell .receipt-source-label{margin-top:2px}
.receipt-source-label.is-linked{background:var(--s-done-bg);color:var(--s-done)}
.receipt-source-label.is-unlinked{background:#edf1f6;color:#536470}
.receipt-lookup-options summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none}
.receipt-lookup-options summary::-webkit-details-marker{display:none}
.receipt-lookup-options summary>span:first-child:before{content:"▸ ";color:#536470}
.receipt-lookup-options[open] summary>span:first-child:before{content:"▾ "}
.receipt-lookup-options[open] summary .btn{visibility:hidden}
.receipt-unsaved-banner.is-empty{background:transparent;border-color:transparent;justify-content:flex-end;padding-top:6px;padding-bottom:6px}
.receipt-unsaved-banner .receipt-input-legend{display:flex;gap:6px;flex-basis:auto;margin-left:auto}
.rl-chip{display:inline-flex;align-items:center;gap:3px;border:1px solid #d6dde6;border-radius:5px;padding:1px 7px;font-size:11px;color:#213249;background:#fff;white-space:nowrap}
.rl-chip.is-auto{background:#edf1f6}
.rl-chip.is-readonly{background:#edf1f6}

/* 주문 조회 기간 접힘 (송장 사진 등록) */
.lookup-period{grid-column:1/-1;border:1px dashed #bcc8d8;border-radius:8px;background:#f5f7fa;padding:7px 12px}
.lookup-period summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;font-size:12px}
.lookup-period summary .btn{white-space:nowrap;flex:none}
.lookup-period summary::-webkit-details-marker{display:none}
.lookup-period summary>span:first-child:before{content:"▸ ";color:#536470}
.lookup-period[open] summary>span:first-child:before{content:"▾ "}
.lookup-period[open] summary .btn{visibility:hidden}
.lookup-period>.form-grid{margin-top:10px}

/* 저장 전 행이 없으면 하단 저장 바를 숨긴다 (P1-7) */
.receipt-save-footer[hidden]{display:none}

/* ===== HANIL OPS 상담내역 부품 (D-080에서 시작, 색은 R3.1 값) =====
   보이는 모양만 바꾼다. 색·크기 값은 CS-UX\HANIL-OPS-디자인기준\DESIGN.md를 따른다.
   - 사이드바·상단 줄: 모든 메뉴가 같이 쓰는 틀이라 전체에 적용한다(메뉴를 옮길 때 틀 모양이 바뀌지 않게).
   - 목록·필터·상세 서랍: 상담내역(.consultation-workspace, .cw-overview-drawer)에만 적용한다. 다른 메뉴 본문은 그대로다. */
:root{--ops-ground:#edf0f4;--ops-surface:#fff;--ops-ink:#213249;--ops-muted:#536470;--ops-line:#d6dde6;--ops-line-strong:#bcc8d8;--ops-row-line:#e8edf3;--ops-selected:#e7ecf3;--ops-hover:#f5f7fa;--ops-accent:#225fd0;--ops-pill:#edf1f6}

/* 틀(왼쪽 메뉴·위쪽 막대)은 파일 끝 R3.1 구역에 있다. */
.crumb{font-size:12px;color:var(--ops-muted)}
.crumb strong{color:var(--ops-ink);font-weight:650}

/* 상담내역 목록 */
.consultation-workspace{color:var(--ops-ink)}
.consultation-workspace .cw-heading{align-items:center;margin-bottom:14px}
.consultation-workspace .cw-heading h1{font-size:20px;font-weight:650;letter-spacing:-.3px;margin:0;color:var(--ops-ink)}
.consultation-workspace .btn{min-height:30px;padding:5px 12px;border-radius:6px;border-color:var(--ops-line-strong);color:var(--ops-ink);font-size:12.5px}
.consultation-workspace .btn.primary{background:var(--ops-accent);border-color:var(--ops-accent);color:#fff}
.consultation-workspace :is(.btn,input,select,[data-cw-record]):focus-visible{outline:2px solid var(--ops-accent);outline-offset:1px}
.consultation-workspace .cw-filters{gap:8px 10px;padding:10px 12px;border:1px solid var(--ops-line);border-radius:8px;background:var(--ops-surface);align-items:flex-end}
.consultation-workspace .cw-filters>label{flex:0 0 150px;gap:3px;font-size:12px;color:var(--ops-muted)}
.consultation-workspace .cw-filters input,.consultation-workspace .cw-filters select{height:30px;min-height:30px;padding:3px 8px;border:1px solid var(--ops-line-strong);border-radius:6px;font-size:13px;color:var(--ops-ink)}
.consultation-workspace .cw-filters .cw-search{flex:1 1 320px;align-self:flex-end;height:30px;padding:0 10px;border:1px solid var(--ops-line-strong);border-radius:6px;background:#fff;color:var(--ops-muted)}
.consultation-workspace .cw-filters .cw-search:focus-within{outline:2px solid var(--ops-accent);outline-offset:1px}
.consultation-workspace .cw-filters .cw-search input{height:28px;min-height:0;padding:0;border:0;outline:none}
.consultation-workspace .cw-period{flex:1 1 calc(100% - 90px);gap:6px;font-size:12px;color:var(--ops-muted)}
.consultation-workspace .cw-period>span:first-child{font-weight:500;margin-right:4px}
.consultation-workspace .cw-period .btn{min-height:28px;padding:3px 10px;font-weight:500}
.consultation-workspace .cw-period .btn.is-selected{background:var(--ops-selected);border-color:#bcc8d8;font-weight:700}
.consultation-workspace .cw-period input{max-width:140px;font-variant-numeric:tabular-nums}
.consultation-workspace .cw-list-meta{margin:16px 2px 8px;color:var(--ops-ink)}
.consultation-workspace .cw-list-meta strong{font-size:14px;font-weight:700}
.consultation-workspace .cw-list-meta span{font-size:12px;color:var(--ops-muted);font-variant-numeric:tabular-nums}
.consultation-workspace .cw-table-scroll{border:1px solid var(--ops-line);border-radius:8px;background:var(--ops-surface)}
.consultation-workspace .cw-table{min-width:960px}
.consultation-workspace .cw-table th{height:32px;padding:0 12px;background:transparent;border-bottom:1px solid var(--ops-line);font-size:12px;font-weight:500;color:var(--ops-muted)}
.consultation-workspace .cw-table th:nth-child(1){width:100px}
.consultation-workspace .cw-table th:nth-child(2){width:142px}
.consultation-workspace .cw-table th:nth-child(3){width:190px}
.consultation-workspace .cw-table th:nth-child(4){width:150px}
.consultation-workspace .cw-table th:nth-child(6){width:116px}
.consultation-workspace .cw-table th:nth-child(7){width:164px}
.consultation-workspace .cw-table td{height:36px;padding:0 12px;border-bottom:1px solid var(--ops-row-line);vertical-align:middle;font-size:13px;line-height:1.4;color:var(--ops-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:keep-all}
.consultation-workspace .cw-table td:nth-child(1){font-variant-numeric:tabular-nums}
.consultation-workspace .cw-table td:nth-child(2):before{content:"";display:inline-block;width:6px;height:6px;margin:0 8px 1px 0;border-radius:50%;background:#8a99ab;vertical-align:middle}
.consultation-workspace .cw-table td>strong{display:inline;font-size:13px;font-weight:650}
.consultation-workspace .cw-table td>small{display:inline;margin-left:8px;font-size:12px;color:var(--ops-muted);font-variant-numeric:tabular-nums}
.consultation-workspace .cw-table .cw-draft-tag{margin:0 0 0 6px;padding:1px 6px;font-size:11.5px}
.consultation-workspace .cw-table .cw-summary{white-space:nowrap;color:var(--ops-muted)}
.consultation-workspace .cw-table td:last-child{padding-top:0;padding-bottom:0}
.consultation-workspace .cw-table :is(th,td):last-child{background:var(--ops-surface);box-shadow:-1px 0 0 var(--ops-row-line)}
.consultation-workspace .cw-table th:last-child{background:var(--ops-surface)}
.consultation-workspace .cw-table tr[data-cw-record]:hover,.consultation-workspace .cw-table tr[data-cw-record]:hover>td:last-child{background:var(--ops-hover)}
.consultation-workspace .cw-table tr[data-cw-record]:focus-visible{outline:2px solid var(--ops-accent);outline-offset:-2px}
.consultation-workspace .cw-table td:last-child>div{display:inline-flex;flex-wrap:wrap;align-items:center;vertical-align:middle;max-width:100%}
/* 연결 업무가 여러 개면 알약이 잘리지 않게 이 칸만 줄을 바꾼다(필요할 때만 두 줄, DESIGN.md 4절) */
.consultation-workspace .cw-table td:last-child{white-space:normal;overflow:visible;padding-top:5px;padding-bottom:5px}
.consultation-workspace .cw-business-summary,.consultation-workspace .cw-work-summary-group,.consultation-workspace .cw-work-summary-states{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}
.consultation-workspace .cw-work-summary-divider{display:none}
.consultation-workspace .cw-work-summary-states .cw-work-tag{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:5px;background:var(--ops-pill);color:var(--ops-ink);font-size:11.5px;font-weight:650;line-height:20px;white-space:nowrap}
.consultation-workspace .cw-work-count{font-weight:500;color:var(--ops-muted)}
.consultation-workspace .cw-related-summary{margin:0 0 0 6px;padding:0;border-top:0;font-size:11.5px;color:var(--ops-muted)}
.consultation-workspace .cw-related-summary .cw-work-tag{background:transparent;padding:0;color:var(--ops-muted);font-weight:500;height:auto}
.consultation-workspace .cw-related-summary .cw-inspection-count{color:var(--ops-muted)}
.consultation-workspace .cw-table td .cw-muted{font-size:12px;line-height:1.4;color:var(--ops-muted)}
.consultation-workspace .cw-empty{height:auto;white-space:normal;padding:28px 16px!important;color:var(--ops-muted)!important}
.consultation-workspace .cw-pagination{padding:10px 2px;font-size:12px;color:var(--ops-muted);font-variant-numeric:tabular-nums}
/* 1440 등 1700 이하 화면: 1.10처럼 표 안 가로 스크롤 없이 들어가게 열 폭을 줄인다 */
@media(max-width:1700px){.consultation-workspace .cw-table{min-width:860px}.consultation-workspace .cw-table th:nth-child(2){width:130px}.consultation-workspace .cw-table th:nth-child(3){width:160px}.consultation-workspace .cw-table th:nth-child(4){width:110px}.consultation-workspace .cw-table th:nth-child(7){width:150px}}
@media(max-width:1000px){.consultation-workspace .cw-filters>label{flex:1 1 140px}.consultation-workspace .cw-period{flex-basis:100%}}

/* 상담 상세·수정 서랍: 내용·버튼은 그대로, 모양만 */
.cw-drawer.cw-overview-drawer{color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .drawer-head{padding:16px 22px 12px;border-bottom:1px solid var(--ops-line)}
.cw-drawer.cw-overview-drawer .drawer-head h2{font-size:20px;font-weight:650;color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-eyebrow{font-size:12px;color:var(--ops-muted)}
.cw-drawer.cw-overview-drawer .cw-overview-layout{gap:14px;background:var(--ops-ground)}
.cw-drawer.cw-overview-drawer :is(.cw-record-panel,.cw-overview-work){border:1px solid var(--ops-line);border-radius:8px;background:var(--ops-surface);box-shadow:none;padding:14px 16px}
.cw-drawer.cw-overview-drawer .cw-record-panel h3,.cw-drawer.cw-overview-drawer .cw-note h3,.cw-drawer.cw-overview-drawer .cw-work-heading h3{font-size:14px;font-weight:700;color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-muted{font-size:12px;color:var(--ops-muted)}
.cw-drawer.cw-overview-drawer .cw-detail-kv{grid-template-columns:92px minmax(0,1fr);gap:6px 12px;font-size:13px;line-height:1.7}
.cw-drawer.cw-overview-drawer .cw-detail-kv dt{color:var(--ops-muted)}
.cw-drawer.cw-overview-drawer .cw-detail-kv dd{color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-note p{padding:10px 14px;border:0;border-radius:6px;background:#f5f7fa;font-size:13px;line-height:1.7;color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-contact-link{color:var(--ops-accent)}
.cw-drawer.cw-overview-drawer .cw-raw-value{color:var(--ops-muted)}
.cw-drawer.cw-overview-drawer .cw-field>span{font-size:12.5px;color:var(--ops-muted)}
.cw-drawer.cw-overview-drawer .cw-field :is(input,select,textarea){font-size:13px;min-height:32px;padding:5px 9px;border-color:var(--ops-line-strong);color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-field :is(input,select,textarea):focus{outline:2px solid var(--ops-accent);outline-offset:1px;border-color:var(--ops-accent);box-shadow:none}
.cw-drawer.cw-overview-drawer .cw-overview-row{border-bottom-color:var(--ops-row-line);color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-overview-row:hover{background:var(--ops-hover)}
.cw-drawer.cw-overview-drawer .cw-work-link{border-color:var(--ops-line);background:var(--ops-surface);color:var(--ops-ink)}
.cw-drawer.cw-overview-drawer .cw-work-link:hover{background:var(--ops-hover);border-color:var(--ops-line-strong)}
.cw-drawer.cw-overview-drawer .btn{min-height:32px;padding:5px 14px;border-radius:6px;border-color:var(--ops-line-strong);color:var(--ops-ink);font-size:13px}
.cw-drawer.cw-overview-drawer .btn.primary{background:var(--ops-accent);border-color:var(--ops-accent);color:#fff}
.cw-drawer.cw-overview-drawer :is(.btn,button,a):focus-visible{outline:2px solid var(--ops-accent);outline-offset:2px}
.cw-drawer.cw-overview-drawer .cw-intake-button{border-color:var(--ops-line-strong);color:var(--ops-ink);font-weight:600}
.cw-drawer.cw-overview-drawer .drawer-foot{border-top:1px solid var(--ops-line)}

/* D-221 등록 기기: 승인 대기·관리자 승인 */
.device-wait{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:var(--bg,#f6f7f9)}
.device-card{width:min(520px,100%);background:#fff;border:1px solid var(--line,#e3e6ea);border-radius:12px;padding:32px 28px;display:grid;gap:10px}
.device-title{font-size:22px;line-height:1.4;margin:14px 0 2px}
.device-lead{margin:0;color:var(--ops-muted,#5b6470)}
.device-code{font-size:44px;font-weight:700;letter-spacing:.08em;text-align:center;padding:18px 8px;margin:8px 0;border-radius:10px;background:var(--bg,#f6f7f9);font-variant-numeric:tabular-nums}
.device-code[data-expired],.device-code:not(:empty){overflow-wrap:anywhere}
.device-meta{font-size:13px;color:var(--ops-muted,#5b6470)}
.device-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.device-note{font-size:13px;line-height:1.6;padding:10px 12px;border-radius:8px;background:var(--bg,#f6f7f9)}
.device-recovery{margin-top:8px;font-size:13px}
.device-recovery summary{cursor:pointer;color:var(--ops-muted,#5b6470)}
.device-recovery form{display:grid;gap:8px;margin-top:8px}
.device-banner{display:flex;align-items:center;gap:8px;margin-bottom:16px;padding:12px 14px;border:1px solid var(--line,#e3e6ea);border-radius:8px;background:#fff;font-weight:600;color:inherit;text-decoration:none}
.device-hint{margin:0;padding:0 20px 12px;font-size:13px;color:var(--ops-muted,#5b6470)}
.device-warn{font-size:12px;font-weight:600;color:#b4530a}
.device-code-input{width:96px;letter-spacing:.1em;text-transform:uppercase}
.device-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.device-empty{padding:16px 20px}
.auth-sso{display:flex;justify-content:center;margin:12px 0}.device-card .brand{padding:0;margin:0}
.device-request{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px 24px;padding:14px 20px;border-top:1px solid var(--line,#e3e6ea);font-size:13px}
.device-request-who{flex:1 1 160px;min-width:0}
.device-request-when{flex:1 1 200px;min-width:0}
.device-request-act{flex:0 1 auto}
.device-title,.device-lead,.device-hint,.device-note,.device-note-small,.device-approved-notice{word-break:keep-all}
.device-note-small{margin:8px 0 0;color:var(--ops-muted,#5b6470);line-height:1.5}
.device-approved-notice{position:fixed;left:16px;right:16px;bottom:16px;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:560px;margin:0 auto;padding:12px 14px;border:1px solid var(--line,#e3e6ea);border-radius:8px;background:#fff;font-size:13px;line-height:1.5}
.device-request-when{word-break:keep-all}

/* ===== HANIL OPS 공통 디자인 R3.1 (실장님 적용 승인 2026-11-01, 모양만) =====
   기준: CS-UX\HANIL-OPS-Codex시안_20261030\보완검토_R3_1_20261031. 값은 시안에서 옮겼고 코드를 복사하지 않았다.
   951px 이상은 html{zoom:1.25}이므로 크기는 '화면에 보이는 시안 값 ÷ 1.25'로 적었다. 색은 그대로다.
   파랑은 동작(--action), 초록은 정상(--ok)에만 쓴다. */
@font-face{font-family:Pretendard;src:url("/assets/PretendardVariable.woff2") format("woff2");font-weight:45 920;font-style:normal;font-display:swap}
:root{--ops-top:58px;--ops-bar:#2b3438;--ops-side:#172339;--ops-side-text:#e6edf8;--ops-side-sub:#c4ccd7;--ops-side-hover:#22324e;--ops-side-active:#28466e;--ops-radius:3px;--ops-required:#eaf2ff}
@media(min-width:951px){:root{--ops-top:48px}}
body{background:var(--bg);color:var(--text)}

/* 위쪽 막대: 로고 + 사이트 이동 + 검색·알림·계정 */
.ops-topbar{position:sticky;top:0;z-index:30;box-sizing:border-box;height:var(--ops-top);display:flex;align-items:center;gap:14px;padding:0 16px;background:var(--ops-bar);border-top:3px solid var(--action);color:#fff}
.ops-logo{display:block;flex:none}
.ops-logo img{display:block;width:141px;height:auto}
.ops-sites{display:flex;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none}
.ops-site{padding:7px 11px;border-radius:4px;font-size:12px;font-weight:600;color:#fff;white-space:nowrap}
.ops-site:hover{background:#3a464c}
.ops-site.active{background:#424f54}
.ops-site:focus-visible,.ops-logo:focus-visible,.ops-topbar button:focus-visible{outline:2px solid #fff;outline-offset:1px}
.ops-topbar .top-right{margin-left:auto;display:flex;align-items:center;gap:10px;flex:none}
.ops-topbar .top-search{display:flex;align-items:center;gap:6px;height:30px;padding:0 9px;border:1px solid #69747a;border-radius:var(--ops-radius);background:#3e484e;color:#d7dee2}
.ops-topbar .top-search:focus-within{outline:2px solid #fff;outline-offset:1px}
.ops-topbar .top-search input{width:170px;padding:0;border:0;background:transparent;box-shadow:none;font-size:12px;color:#fff}
.ops-topbar .top-search input::placeholder{color:#d7dee2}
.ops-topbar .keycap{border-color:#69747a;color:#d7dee2;font-size:11px}
.ops-topbar .icon-btn,.ops-topbar .profile{color:#fff}
.ops-topbar .icon-btn:hover{background:#3a464c}
.ops-topbar .profile{display:flex;align-items:center;gap:8px;font-size:12px;text-align:left}
.ops-topbar .profile small{font-size:11px;color:#d7dee2}
.ops-topbar .avatar{background:#e9edf0;color:#34424a;font-weight:700}
.ops-topbar .mobile-menu{display:none;margin:0;color:#fff}
.ops-plain-head{box-sizing:border-box;height:58px;display:flex;align-items:center;padding:0 30px;background:#fff;border-bottom:1px solid var(--line);color:var(--text)}
.ops-plain-head{gap:12px}
.ops-plain-head img{display:block;width:141px;height:auto}
.ops-plain-head strong{font-size:13px;font-weight:700}

/* 왼쪽 메뉴 */
.shell{min-height:calc(100vh / var(--ui-zoom,1) - var(--ops-top))}
.shell.hsl-managed>.hsl-panel{top:var(--ops-top);height:calc(100vh / var(--ui-zoom,1) - var(--ops-top));height:calc(100dvh / var(--ui-zoom,1) - var(--ops-top));max-height:calc(100dvh / var(--ui-zoom,1) - var(--ops-top))}
.sidebar{background:var(--ops-side);border-right:0;color:var(--ops-side-text)}
.sidebar .ops-brand{height:auto;min-height:0;flex-direction:row;align-items:baseline;gap:8px;padding:14px 16px 8px;color:#fff}
.sidebar .ops-brand .brandmark{display:none}
.sidebar .ops-brand .brandname{font-size:12px;font-weight:750;letter-spacing:.3px;color:#fff}
.sidebar .ops-brand-sub{font-size:11px;font-weight:500;color:var(--ops-side-sub)}
.sidebar .nav{padding:2px 10px 14px}
.sidebar .nav-label{display:block;padding:12px 8px 4px;font-size:11px;font-weight:500;letter-spacing:0;color:var(--ops-side-sub)}
.sidebar .nav-item{min-height:29px;padding:6px 9px;margin:1px 0;border-radius:var(--ops-radius);font-size:11px;font-weight:500;color:var(--ops-side-text)}
.sidebar .nav-item .icon{width:14px;height:14px;color:inherit}
.sidebar .nav-item:hover{background:var(--ops-side-hover);color:#fff}
.sidebar .nav-item.active{background:var(--ops-side-active);color:#fff;font-weight:700;box-shadow:inset 3px 0 var(--action)}
.sidebar .nav-item.active:before{display:none}
.sidebar .nav-item:focus-visible{outline:2px solid #fff;outline-offset:-1px}
.sidebar .nav-item .count{background:var(--ops-side-active);color:#fff}
.hsl-toggle{color:#536470}
.hsl-collapsed .ops-brand{justify-content:center;padding:12px 8px}
.hsl-collapsed .ops-brand .brandmark{display:grid;width:30px;height:30px;font-size:16px;background:var(--action);color:#fff}
.hsl-collapsed .ops-brand-sub{display:none}
.hsl-collapsed .nav{padding:0 8px 12px}
.hsl-collapsed .sidebar .nav-label{display:none}
.hsl-tooltip{background:var(--text);border-color:var(--text)}

/* 경로 줄과 본문 */
.topbar{position:static;height:auto;padding:10px 18px 0 38px;background:transparent;border:0}
.crumb{gap:7px}
.shell.hsl-managed>.main>.content{padding-top:8px;padding-right:18px}
.page-head{margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.page-head h1,.consultation-workspace .cw-heading h1{font-size:21px;font-weight:700;letter-spacing:-.5px;color:var(--text);margin:0}
.eyebrow{display:none}
.subtle{color:var(--muted)}
.panel{border-color:var(--line);border-radius:var(--ops-radius);box-shadow:none}
.panel-head{padding:12px 14px}
.panel-head h2{font-size:13px;font-weight:700;color:var(--text)}
.panel-head small,.text-link{color:var(--muted)}
.page-footer{color:var(--muted);font-size:11px}

/* 버튼·입력칸 */
.btn{border-color:var(--ops-line-strong);border-radius:var(--ops-radius);color:var(--text);background:#fff}
.btn:hover{background:var(--ops-hover)}
.btn.primary{background:var(--action);border-color:var(--action);color:#fff}
.btn.primary:hover{background:var(--action-strong);border-color:var(--action-strong)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--muted)}
.btn.danger{background:#fff;color:#b42318;border-color:#e8c4bf}
button:disabled.btn.primary,.btn.primary:disabled{background:#e7edf5;border-color:#c4cedd;color:#425269;opacity:1}
button:focus-visible,a:focus-visible,.btn:focus-visible{outline:2px solid var(--action);outline-offset:2px}
input,textarea,select{border-color:#bcc9d9;border-radius:var(--ops-radius);color:var(--text)}
input:focus,textarea:focus,select:focus{border-color:var(--action);box-shadow:0 0 0 2px #c3d8fc}
input::placeholder,textarea::placeholder{color:#5f6e7e}
.field label{color:var(--muted)}
.field label .required{color:var(--action)}
/* 필수칸 표시(D-254 K2). 서버 필수 검사는 그대로다. */
.field:has(label .required) :is(input,select,textarea){background:var(--ops-required);border-color:#acc6e7}

/* 표 */
th{background:#edf1f6;color:#374659;font-weight:600;border-bottom:1px solid var(--line)}
td{color:var(--text);border-bottom-color:#e2e7ee}
tbody tr:hover{background:var(--ops-hover)}
.row-name,.cell-product{color:var(--text)}
.cell-sub,.cell-content,.mono{color:var(--muted)}
.table-foot,.pagination button{color:var(--muted)}
.pagination button.active,.pagination button:hover{background:var(--action-soft);color:var(--action)}
.tab{color:var(--muted)}
.tab.active{color:var(--action);border-color:var(--action)}
.tab .pill{background:#edf1f6;color:var(--muted)}
.table-tabs,.toolbar{border-color:var(--line)}
.toolbar-search{border-color:#bcc9d9;color:var(--muted)}
.chip,.category-tag{background:#edf1f6;color:var(--muted);border-color:var(--line)}

/* 숫자 칸: 왼쪽 이름, 오른쪽 숫자 */
.stats{gap:10px;margin-bottom:14px}
.stat,.stat.featured{min-height:0;padding:11px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 10px;background:#fff;color:var(--text);border:1px solid var(--line);border-radius:var(--ops-radius);box-shadow:none}
.stat.featured:after{display:none}
.stat .stat-label,.stat.featured .stat-label{color:#5b6776;font-size:11px}
.stat .stat-num,.stat.featured .stat-num{margin:0;font-size:21px;font-weight:700;letter-spacing:0;color:#1c3761}
.stat .stat-num small,.stat.featured .stat-num small{color:var(--muted)}
.stat .stat-foot,.stat.featured .stat-foot{grid-column:1/-1;color:var(--muted);font-size:11px;margin:0}
.stage{border-radius:var(--ops-radius);background:#fff;border-color:var(--line)}
.stage .n{color:#1c3761}
.stage .name{color:var(--muted)}
.stage.active{background:var(--action-soft);border-color:#c3d8fc}
.stage.active .name{color:var(--action)}
.reminder,.note,.detail-content{background:#f5f7fa;border-color:var(--line);color:var(--text)}
.note.warning{background:#fff8eb;border-color:#f0e3c9;color:#7c5931}

/* 서랍·창·알림 */
.overlay-backdrop{background:#15243d66;backdrop-filter:none}
.drawer{box-shadow:none;border-left:1px solid var(--line)}
.modal{border-radius:8px}
.detail-kv dt{color:var(--muted)}
#toast{background:var(--text)}
.demo-banner{background:#fff8eb;border-bottom:1px solid #f0e3c9;color:#5d4e1f}

/* 로그인 전 화면 */
.auth{display:block;min-height:calc(100vh / var(--ui-zoom,1));background:var(--bg)}
.auth-form-side{min-height:calc(100vh / var(--ui-zoom,1) - 58px);align-items:flex-start;padding:34px 16px}
.auth-card{width:min(496px,100%);padding:28px;background:#fff;border:1px solid var(--line);border-radius:10px}
.auth-card .eyebrow{display:block;font-size:11px;letter-spacing:0;color:var(--muted);text-transform:none}
.auth-card h2{font-size:21px;letter-spacing:-.5px}
.auth-card .btn.primary,.auth-sso{width:100%}
.demo-link{color:var(--action);border-top-color:var(--line)}
.auth-fine{color:var(--muted)}

/* 기기 승인 대기·첫 승인 */
.device-wait{flex-direction:column;align-items:stretch;justify-content:flex-start;padding:0;min-height:calc(100vh / var(--ui-zoom,1));background:var(--bg)}
.device-card{align-self:center;width:min(496px,calc(100% - 32px));margin:34px 0;padding:28px;border-color:var(--line);border-radius:10px}
.device-title{font-size:21px;letter-spacing:-.5px;margin:0 0 4px}
.device-code{background:#eff4fc;border-radius:8px;letter-spacing:.12em}
.device-note{background:#f1f5fc;border-left:3px solid var(--action);border-radius:0}
.device-banner{background:#edf3fc;border-color:#c3d8fc;border-radius:var(--ops-radius)}
.device-warn{color:#8b5b00}
.device-approved-notice{border-color:var(--line);border-radius:var(--ops-radius)}

/* 외주: 사내 메뉴 없이 위쪽 탭 두 개, 휴대폰 390 기준 */
.shell.ops-external,.shell.hsl-managed.ops-external{display:block}
.shell.ops-external>.sidebar,.shell.ops-external .mobile-overlay{display:none!important}
.shell.hsl-managed.ops-external>.main>.content,.shell.ops-external>.main>.content{max-width:1280px;margin:0 auto;padding:12px 18px 40px}
.ops-external .topbar{padding:10px 18px 0;max-width:1280px;margin:0 auto}
.ops-ex-nav{display:flex;max-width:1244px;margin:8px auto 0;background:#fff;border:1px solid var(--line);border-bottom:0}
.ops-ex-nav .nav-item{flex:1;justify-content:center;margin:0;padding:11px 14px;border-radius:0;border-bottom:3px solid transparent;font-size:12px;font-weight:700;color:#45566d;background:transparent}
.ops-ex-nav .nav-item .icon{display:none}
.ops-ex-nav .nav-item:hover{background:var(--ops-hover);color:var(--text)}
.ops-ex-nav .nav-item.active{color:var(--action);border-bottom-color:var(--action);background:#fff}
.ops-ex-nav .nav-item.active:before{display:none}
.ops-topbar:has(+.ops-external) .mobile-menu{display:none!important}

@media(max-width:1100px){
  .ops-topbar{gap:8px;padding:0 10px}
  .ops-logo img{width:118px}
  .ops-site{padding:7px 8px;font-size:11px}
  .ops-topbar .profile>div,.ops-topbar .keycap{display:none}
  .ops-topbar .top-search input{width:110px}
}
@media(max-width:760px){
  .ops-topbar .mobile-menu{display:grid}
  .ops-topbar .top-search,.ops-sites{display:none}
  .ops-logo img{width:116px}
  .shell.hsl-managed>.hsl-panel{top:var(--ops-top);bottom:0;height:auto;max-height:none;width:min(268px,calc(100vw - 32px))}
  .sidebar{top:var(--ops-top)}
  .sidebar .nav-item{min-height:40px;font-size:14px}
  .sidebar .nav-label{font-size:12px}
  .topbar,.ops-external .topbar{padding:10px 14px 0}
  .shell.hsl-managed>.main>.content,.shell.hsl-managed.ops-external>.main>.content{padding:8px 12px 80px}
  .ops-ex-nav{margin:8px 12px 0}
  .ops-ex-nav .nav-item{font-size:14px;padding:13px 10px;min-height:46px}
  .page-head h1{font-size:22px}
  .stat .stat-num,.stat.featured .stat-num{font-size:22px}
  .device-code{font-size:38px}
}

/* 모서리·화면별 맞춤 */
.content :is(.btn,input:not([type=checkbox]):not([type=radio]),select,textarea),.drawer :is(.btn,input:not([type=checkbox]):not([type=radio]),select,textarea),.modal :is(.btn,input:not([type=checkbox]):not([type=radio]),select,textarea){border-radius:var(--ops-radius)!important}
.reminder,.quick-link,.kanban-col,.kanban-card,.manual-card,.view-toggle,.date-pill,.receipt-main,.receipt-dock,.receipt-board-column,.receipt-save-footer,.consultation-workspace .cw-filters,.consultation-workspace .cw-table-scroll,.wf-table-wrap{border-radius:var(--ops-radius)}
.receipt-heading h1{font-size:21px;letter-spacing:-.5px;margin:0}
.receipt-scan-bar input{height:34px;font-size:13px}
.receipt-scan-bar form>.btn{min-height:34px;height:34px;font-size:12px;padding:0 14px}
.receipt-unsaved-banner .receipt-add-row{background:var(--action);border-color:var(--action);color:#fff;font-size:12px;padding:6px 12px}
.receipt-unsaved-banner .receipt-add-row:hover{background:var(--action-strong)}
.receipt-dock{top:calc(var(--ops-top) + 12px)}
:is(.content,.drawer,.modal) .field:has(>:is(input,select,textarea)[required])>label::after{content:" *";color:var(--action)}
.content .field:has(>:is(input,select,textarea)[required])>:is(input,select,textarea),.drawer .field:has(>:is(input,select,textarea)[required])>:is(input,select,textarea),.modal .field:has(>:is(input,select,textarea)[required])>:is(input,select,textarea){background:var(--ops-required);border-color:#acc6e7}
.topbar .crumb>span:first-of-type{display:inline}
@media(max-width:760px){
  .topbar .crumb>span:first-of-type{display:inline}
  /* 휴대폰: 표를 가로로 밀지 않고 카드로 본다. 고객·연락처가 첫 줄이다(D-242). */
  .consultation-workspace .cw-table-scroll{overflow:visible}
  .consultation-workspace .cw-table{display:block;min-width:0}
  .consultation-workspace .cw-table thead{display:none}
  .consultation-workspace .cw-table tbody{display:block}
  .consultation-workspace .cw-table tr[data-cw-record]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:11px 12px;border-bottom:1px solid var(--ops-row-line)}
  .consultation-workspace .cw-table tr[data-cw-record]>td{display:block;height:auto;width:auto;padding:0;border:0;white-space:normal;overflow:visible;position:static;box-shadow:none;background:transparent}
  .consultation-workspace .cw-table td:nth-child(3){grid-column:1/-1;order:-3;font-size:14px}
  .consultation-workspace .cw-table td:nth-child(3)>small{display:inline-block;margin-left:8px;font-size:14px;color:var(--ops-ink)}
  .consultation-workspace .cw-table td:nth-child(4){grid-column:1/-1;order:-2;font-weight:600}
  .consultation-workspace .cw-table td:nth-child(5){grid-column:1/-1;order:-1}
  .consultation-workspace .cw-table td:nth-child(1),.consultation-workspace .cw-table td:nth-child(2),.consultation-workspace .cw-table td:nth-child(6){font-size:12px;color:var(--ops-muted)}
  .consultation-workspace .cw-table td:nth-child(7){grid-column:1/-1}
  .consultation-workspace .cw-table .cw-summary{white-space:normal}
  .ops-external .table-wrap{overflow:visible}
  .ops-external .table-wrap table{display:block;white-space:normal}
  .ops-external .table-wrap thead{display:none}
  .ops-external .table-wrap tbody{display:block}
  .ops-external .table-wrap tbody tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:12px 14px;border-bottom:1px solid var(--line)}
  .ops-external .table-wrap tbody td{display:block;max-width:none;padding:0;border:0;font-size:13px;white-space:normal}
  .ops-external .table-wrap tbody td:nth-child(2){grid-column:1/-1;order:-1;font-size:15px;font-weight:700}
  .ops-external .table-wrap tbody td:last-child{position:absolute;right:26px;opacity:.6}
}

/* 강조색은 파랑 하나(D-213): 이슈 구분·입고구분은 색 대신 글자로 구분한다. 제품사고 빨강은 뜻이 있어 둔다. */
.issue-general,.issue-coupang,.issue-accident,.issue-misdelivery,.issue-issue{--issue-accent:var(--action);--issue-soft:var(--action-soft)}
.receipt-type.type-0,.receipt-type.type-1,.receipt-type.type-2,.receipt-cell-field .receipt-category.type-0,.receipt-cell-field .receipt-category.type-1,.receipt-cell-field .receipt-category.type-2{background:#edf1f6;color:var(--text)}

/* A4 c3: 좁은 폭에서는 오른쪽 고정 칸을 풀어 가운데 칸이 보이게 한다. */
@media(max-width:1200px){.receipt-sheet-table :is(th,td):last-child{position:static;box-shadow:none}.receipt-sheet-table td.receipt-empty-draft{text-align:left!important}}
