/**
 * 입고 분류 작업자 페이지 스타일
 */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #2d3748;
    line-height: 1.5;
}

/* 헤더 */
.header { background-color: #2d3748; color: #ffffff; border-bottom: 1px solid #4a5568; }
.header-container { max-width: 900px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 18px; font-weight: 600; color: #ffffff; }
.header-info { font-size: 13px; color: #e2e8f0; margin-top: 2px; }
.header-nav { display: flex; gap: 12px; }
.header-nav a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s ease;
}
.header-nav a:hover { background-color: #4a5568; color: #ffffff; }
.logout-btn { background: rgba(255,255,255,0.15); color: #fff; border: none; padding: 8px 14px; border-radius: 3px; cursor: pointer; font-size: 13px; text-decoration: none; transition: all 0.2s ease; }
.logout-btn:hover { background: rgba(255,255,255,0.25); }

/* 메인 컨테이너 */
.main-container { padding: 20px; max-width: 800px; margin: 0 auto; }

/* 통계 카드 - 사이드메뉴에서 표시하므로 숨김 */
.stats-row {
    display: none;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.stat-value { font-size: 28px; font-weight: 700; color: #2d3748; }
.stat-label { font-size: 12px; color: #718096; margin-top: 4px; }
.stat-card.warehouse .stat-value { color: #3182ce; }.stat-card.warehouse .stat-value{ color: #946200; }
.stat-card.outgoing .stat-value { color: #38a169; }

/* 스캔 섹션 */
.scan-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.scan-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
}
.scan-input-wrap {
    display: flex;
    gap: 10px;
}
.scan-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
}
.scan-input:focus {
    outline: none;
    border-color: #3182ce;
}.scan-input:focus{
    outline: none;
    border-color: #FFC21A;
}

/* 최근 스캔 */
.recent-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.recent-title { font-size: 14px; font-weight: 600; color: #4a5568; margin-bottom: 12px; }
.recent-list {
    max-height: 260px; /* 약 3개 행 높이 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* scroll-snap 제거: y mandatory 스냅이 맨 위 도달을 막고(스티키 헤더와 겹침)
       위로 올려도 가까운 행으로 되돌아오는 버그가 있어 자유 스크롤로 변경 (2026-07-03) */
    scroll-padding-top: 36px;
}
.recent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.recent-table thead {
    background: #f7fafc;
    position: sticky;
    top: 0;
}
.recent-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}
.recent-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}.recent-table td{
    padding: 8px 10px;
    border-bottom: 1px solid #FFD24D;
    vertical-align: middle;
}
.recent-table tbody tr:hover { background: #f7fafc; }
.recent-table .col-product { min-width: 100px; }
.recent-table .col-qty {
    width: 50px;
    text-align: center;
    font-weight: 600;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 상품 리스트 섹션 */
.product-list-section {
    background: #fff;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}
.product-list-header:hover { background: #edf2f7; }.product-list-header:hover{ background: #FFF4D1; }
.product-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}
.product-list-count {
    font-weight: 400;
    color: #718096;
    margin-left: 6px;
}
.product-list-toggle {
    font-size: 12px;
    color: #718096;
    transition: transform 0.3s ease;
}
.product-list-toggle.open { transform: rotate(180deg); }
.product-list-content {
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 드래그 시 행 단위로 멈추도록 스냅 (mandatory는 sticky 헤더를 말아넣어 버려서 proximity로 완화).
       스냅 정지 위치를 필터바(48px)+헤더 높이만큼 내려서 행이 sticky 바 밑으로 숨지 않게 함 */
    scroll-snap-type: y proximity;
    scroll-padding-top: 86px;
}
.product-list-content .product-list-table tbody tr {
    scroll-snap-align: start;
}
.product-list-filter {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    height: 48px;
    box-sizing: border-box;
    border-bottom: 1px solid #e2e8f0;
    background: #f7fafc;
    position: sticky;
    top: 0;
    z-index: 3;
    align-items: center;
}
.product-list-tabs { display: flex; gap: 4px; }
.pl-tab-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e0;
    background: #fff;
    color: #4a5568;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.pl-tab-btn.active {
    background: #3182ce;
    color: #fff;
    border-color: #3182ce;
}.pl-tab-btn.active{
    background: #FFC21A;
    color:#2B1D00;
    border-color: #FFC21A;
}
.product-list-search {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
    min-width: 0;
}
.product-list-search:focus { outline: none; border-color: #3182ce; }.product-list-search:focus{ outline: none; border-color: #FFC21A; }
.product-list-empty {
    text-align: center;
    color: #a0aec0;
    padding: 30px 20px;
    font-size: 14px;
}
.product-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.product-list-table thead {
    background: #edf2f7;
    position: sticky;
    /* 필터바(48px) 바로 아래에 고정 — 필터 뒤로 숨지 않게 */
    top: 48px;
    z-index: 2;
}.product-list-table thead{
    background: #FFF4D1;
    position: sticky;
    /* 필터바(48px) 바로 아래에 고정 — 필터 뒤로 숨지 않게 */
    top: 48px;
    z-index: 2;
}
.product-list-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    /* sticky thead가 일부 브라우저에서 투명해지는 것 방지 (셀에도 배경 지정) */
    background: #edf2f7;
}.product-list-table th{
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    /* sticky thead가 일부 브라우저에서 투명해지는 것 방지 (셀에도 배경 지정) */
    background: #FFF4D1;
}
.product-list-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}.product-list-table td{
    padding: 10px 12px;
    border-bottom: 1px solid #FFD24D;
    vertical-align: middle;
}
.product-list-table tbody tr:hover { background: #f7fafc; }
.product-list-table .col-no {
    width: 40px;
    text-align: center;
    color: #a0aec0;
}
.product-list-table .col-zone,
.recent-table .col-zone {
    width: 48px;
    text-align: center;
    font-weight: 600;
    color: #285e61;
    font-size: 12px;
}
.product-list-table .product-zone,
.recent-table .product-zone {
    color: #285e61;
}
.product-list-table .col-product { min-width: 120px; }
.product-list-table .col-qty {
    width: 60px;
    text-align: center;
    font-weight: 600;
}
.product-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.product-name-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    word-break: break-all;
}
.product-option {
    font-size: 11px;
    color: #718096;
}
.order-qty { color: #38a169; }
.warehouse-qty { color: #3182ce; }.warehouse-qty{ color: #946200; }
.incoming-qty { color: #805ad5; white-space: nowrap; cursor: pointer; }
.incoming-qty:hover { background: #e9d8fd; border-radius: 4px; }
.incoming-qty.complete { color: #38a169; background: #c6f6d5; border-radius: 4px; }
.incoming-qty.complete:hover { background: #9ae6b4; }
/* 매입(입고예정) 수량 초과 — 완료(초록)보다 우선. 직접수량 입력 등으로 초과 저장 시 바로 눈에 띄게 빨강 표시 */
.incoming-qty.over { color: #c53030; background: #fed7d7; border-radius: 4px; font-weight: 700; }
.incoming-qty.over:hover { background: #feb2b2; }

/* zone 진행 상태 색상: 시작전(빨강) → 진행중(녹색) → 완료(파랑) */
.zone-qty.zone-pending  { color: #e53e3e; font-weight: 600; }
.zone-qty.zone-progress { color: #38a169; font-weight: 600; }
.zone-qty.zone-complete { color: #3182ce; background: #bee3f8; border-radius: 4px; font-weight: 600; }.zone-qty.zone-complete{ color: #946200; background: #FFF4D1; border-radius: 4px; font-weight: 600; }

/* 수량 입력 모달 */
.qty-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;  /* 모바일 브라우저 하단 툴바 제외한 실제 높이 */
    background: rgba(0,0,0,0.5);
    z-index: 100002;  /* worker-back-bar(99999) / scan-toast(100001) 위 */
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);  /* 하단 네비게이션 안전영역 */
}
.qty-modal-overlay.open { display: flex; }
.qty-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 360px;
    max-height: 100%;       /* 오버레이(안전영역 제외) 안에서만 — 하단 잘림 방지 */
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.qty-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.qty-modal-title { font-size: 14px; font-weight: 600; color: #2d3748; }
.qty-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
}
.qty-modal-close:hover { color: #4a5568; }
.qty-modal-body { padding: 12px 16px; }
.qty-modal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #f7fafc;
    border-radius: 6px;
}
.qty-modal-product {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qty-modal-current { font-size: 13px; color: #718096; }
.qty-modal-current strong { color: #805ad5; }
.qty-modal-inputs { display: flex; flex-direction: column; gap: 8px; }
.qty-modal-inputs-row {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}
/* flex: 1 1 0 + min-width:0 → 두 input이 모달 폭 안에서 균등 분배 */
.qty-modal-inputs-row .qty-input-group { flex: 1 1 0; min-width: 0; }
.qty-input-divider-inline {
    font-size: 12px;
    color: #a0aec0;
    padding-bottom: 10px;
    flex-shrink: 0;
}
.qty-input-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.qty-input-group label { font-size: 12px; font-weight: 600; color: #4a5568; }
.qty-input-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    min-width: 0;
}
.qty-input-group input:focus { outline: none; border-color: #805ad5; }
.qty-input-group small { font-size: 11px; color: #a0aec0; text-align: center; }
.qty-input-divider {
    text-align: center;
    font-size: 11px;
    color: #a0aec0;
    position: relative;
}
.qty-input-divider::before,
.qty-input-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}
.qty-input-divider::before { left: 0; }
.qty-input-divider::after { right: 0; }
.qty-modal-footer {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #e2e8f0;
}
.qty-modal-btn {
    flex: 1;
    padding: 9px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.qty-modal-btn.cancel { background: #edf2f7; color: #4a5568; }.qty-modal-btn.cancel{ background: #FFF4D1; color: #4a5568; }
.qty-modal-btn.cancel:hover { background: #e2e8f0; }
.qty-modal-btn.confirm { background: #805ad5; color: #fff; }
.qty-modal-btn.confirm:hover { background: #6b46c1; }
/* 전체완료: 피킹 수량모달과 동일하게 푸터 좌측 초록 버튼 (위치 통일) */
.qty-modal-btn.complete { flex: 0 0 auto; background: #38a169; color: #fff; margin-right: auto; }
.qty-modal-btn.complete:hover { background: #2f855a; }

/* 입고리스트 버튼 */
.incoming-list-section {
    margin-bottom: 16px;
}
.incoming-list-btn {
    width: 100%;
    padding: 14px 20px;
    background: #2d3748;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.incoming-list-btn:hover { background: #4a5568; }
.incoming-list-count {
    margin-left: 6px;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
}

/* 입고리스트 모달 */
.incoming-list-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;  /* 모바일 브라우저 하단 툴바 제외한 실제 높이 */
    background: rgba(0,0,0,0.5);
    /* main-tabs-bar(100000) / worker-back-bar(99999) 위로 */
    z-index: 200000;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);  /* 하단 네비게이션 안전영역 */
}
.incoming-list-modal-overlay.open { display: flex; }
.incoming-list-modal {
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 500px;
    max-height: 85vh;
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.2s ease;
}
.incoming-list-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.incoming-list-modal-title { font-size: 16px; font-weight: 600; color: #2d3748; }
.incoming-list-modal-close {
    background: none; border: none;
    font-size: 24px; color: #a0aec0;
    cursor: pointer; line-height: 1;
}
.incoming-list-modal-close:hover { color: #4a5568; }
.incoming-list-filter {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.filter-presets {
    display: flex;
    gap: 8px;
}
.filter-presets .filter-btn {
    flex: 1;
    padding: 9px 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.filter-presets .filter-btn:hover { background: #f7fafc; }
.filter-presets .filter-btn.active {
    background: #3182ce;
    color: #fff;
    border-color: #3182ce;
}.filter-presets .filter-btn.active{
    background: #FFC21A;
    color:#2B1D00;
    border-color: #FFC21A;
}
.filter-dates {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-date-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    color: #2d3748;
    background: #fff;
    min-width: 0;
}
.filter-date-input:focus {
    border-color: #3182ce;
    outline: none;
    box-shadow: 0 0 0 2px rgba(49,130,206,0.15);
}.filter-date-input:focus{
    border-color: #FFC21A;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,194,26,0.15);
}
.filter-date-sep {
    color: #a0aec0;
    font-size: 13px;
    flex-shrink: 0;
}
.filter-search-btn {
    padding: 8px 16px;
    background: #2d3748;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.filter-search-btn:hover { background: #4a5568; }
.filter-supplier {
    display: flex;
}
.filter-supplier-select {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    color: #2d3748;
    background: #fff;
    cursor: pointer;
    appearance: auto;
}
.filter-supplier-select:focus {
    border-color: #3182ce;
    outline: none;
    box-shadow: 0 0 0 2px rgba(49,130,206,0.15);
}.filter-supplier-select:focus{
    border-color: #FFC21A;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,194,26,0.15);
}
.incoming-list-modal-body {
    overflow-y: auto;
    padding: 0;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.incoming-list-empty {
    text-align: center;
    color: #a0aec0;
    padding: 40px 20px;
    font-size: 14px;
}
.incoming-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.incoming-list-table thead {
    background: #f7fafc;
    position: sticky;
    top: 0;
}
.incoming-list-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}
.incoming-list-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}.incoming-list-table td{
    padding: 10px 12px;
    border-bottom: 1px solid #FFD24D;
}
.incoming-list-table tbody tr:hover { background: #f7fafc; }
.incoming-list-table .col-center { text-align: center; }

/* 배치 상태 뱃지 */
.batch-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.batch-status-pending { background: #fed7d7; color: #c53030; }
.batch-status-progress { background: #fefcbf; color: #b7791f; }
.batch-status-done { background: #c6f6d5; color: #276749; }

/* 적재 버튼/배지 — 버튼='적재처리'(파랑), 배지='적재완료'(초록) — 색/문구로 상태 구분 */
.batch-load-btn {
    background: #3182ce; color: #fff; border: none;
    padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: background 0.15s ease;
}.batch-load-btn{
    background: #FFC21A; color:#2B1D00; border: none;
    padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: background 0.15s ease;
}
.batch-load-btn:hover:not(:disabled) { background: #2b6cb0; }.batch-load-btn:hover:not(:disabled){ background: #FFC21A; ;color:#2B1D00}
.batch-load-btn:disabled { background: #a0aec0; cursor: not-allowed; }
.batch-loaded-badge {
    display: inline-block;
    padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600;
    background: #c6f6d5; color: #22543d; white-space: nowrap;
}
.batch-load-na { color: #a0aec0; font-size: 12px; }
.batch-load-pending {
    display: inline-block;
    padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600;
    background: #feebc8; color: #9c4221; white-space: nowrap; cursor: help;
}
.batch-partial-btn { background: #dd6b20; }
.batch-partial-btn:hover:not(:disabled) { background: #c05621; }

/* 체크박스 컬럼 */
.incoming-list-table th.col-check,
.incoming-list-table td.col-check {
    width: 32px;
    text-align: center;
    padding: 4px 2px;
}
.incoming-list-table .batch-row-check,
.incoming-list-table #batchMasterCheck {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

/* 다중 선택 액션 바 */
.bulk-load-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fffbeb;
    border-bottom: 1px solid #f6e05e;
    font-size: 13px;
}
.bulk-load-info { color: #744210; font-weight: 500; }
.bulk-load-info strong { color: #c05621; font-size: 15px; margin-right: 2px; }
.bulk-load-btn {
    background: #3182ce; color: #fff; border: none;
    padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s ease;
}.bulk-load-btn{
    background: #FFC21A; color:#2B1D00; border: none;
    padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s ease;
}
.bulk-load-btn:hover { background: #2b6cb0; }.bulk-load-btn:hover{ background: #FFC21A; ;color:#2B1D00}

/* 입고리스트 행 클릭 */
.incoming-list-row { cursor: pointer; transition: background 0.15s ease; }
.incoming-list-row:hover { background: #edf2f7; }.incoming-list-row:hover{ background: #FFF4D1; }
.incoming-list-row.selected { background: #ebf8ff; }.incoming-list-row.selected{ background: #FFF4D1; }

/* 상품 리스트 헤더 우측 */
.product-list-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-list-reset {
    font-size: 12px;
    color: #3182ce;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    background: #ebf8ff;
    transition: background 0.2s ease;
}.product-list-reset{
    font-size: 12px;
    color: #946200;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    background: #FFF4D1;
    transition: background 0.2s ease;
}
.product-list-reset:hover { background: #bee3f8; }.product-list-reset:hover{ background: #FFF4D1; }

/* 스캔 결과 토스트 — worker-back-bar(z 99999) 위에 떠야 함 */
.scan-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    z-index: 100001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.scan-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.scan-toast-outgoing { background: #38a169; }
.scan-toast-warehouse { background: #3182ce; }.scan-toast-warehouse{ background: #FFC21A; ;color:#2B1D00}
.scan-toast-error { background: #e53e3e; }

/* 반응형 */
@media (max-width: 767px) {
    .scan-section { padding: 12px; margin-bottom: 12px; }
    .scan-input { padding: 10px 12px; font-size: 16px; }

    .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-value { font-size: 22px; }
    .scan-input-wrap { flex-direction: column; }

    .product-list-table { font-size: 12px; }
    .product-list-table th,
    .product-list-table td { padding: 8px 6px; }
    .product-list-table .col-qty { width: 45px; }
    .product-list-table .col-zone,
    .recent-table .col-zone { width: 36px; font-size: 11px; }
    .recent-list {
        max-height: 145px;
    }
    /* 수량 모달 모바일: 상단 위치 (키패드 올라와도 확인 버튼 노출되도록 위로 붙임) */
    .qty-modal-overlay { align-items: flex-start; padding-top: 16px; }
    .qty-modal { max-height: calc(100dvh - 32px); }
    /* 모달 푸터(확인/취소 버튼)를 sticky 처리해서 본문 스크롤시에도 항상 노출 */
    .qty-modal-footer { position: sticky; bottom: 0; background: #fff; z-index: 1; }
}
