/* QR 작업용 좌우 패널. 기존 폭, 표, 스와이프 구조를 유지한다. */
.qr-shipment-parts { display: block; margin-top: 6px; white-space: nowrap; }
.qr-shipment-parts input { width: 70px; min-height: 44px; padding: 6px; border: 1px solid #8b9eaf; border-radius: 4px; text-align: right; }
@media screen {
    #leftSideMenu.sideMenu, #rightSideMenu.sideMenu {
        --qr-ink: #203247;
        --qr-line: #cbd5df;
        --qr-primary: #116b63;
        background: #f5f7fa;
        color: var(--qr-ink);
        padding: 12px 10px 24px;
        box-shadow: 0 0 24px #20324726;
        line-height: 1.5;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        z-index: 1040;
        font-size: 16px;
        box-sizing: border-box;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--qr-primary);
        color: var(--qr-ink);
        font-size: 18px;
        font-weight: 700;
        text-align: left;
        position: sticky;
        top: -12px;
        z-index: 5;
        background: #f5f7fa;
        padding-top: 12px;
        margin-top: -12px;
    }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-close {
        background: #fff;
        color: #33485e;
        border: 1px solid var(--qr-line);
        border-radius: 6px;
        min-width: 60px;
        min-height: 44px;
        font-size: 14px;
    }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-heading-actions { display: flex; gap: 6px; flex-shrink: 0; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-help { min-width: 64px; min-height: 44px; border: 1px solid #a82622; border-radius: 6px; color: #fff; background: #c9302c; font-size: 14px; font-weight: 600; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-heading > span { font-size: 17px; }
    :is(#leftSideMenu, #rightSideMenu) .qr-pallet-detail-trigger { display: inline-block; max-width: 100%; min-height: 44px; border: 0; padding: 4px 1px; background: transparent; color: #116476; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
    :is(#leftSideMenu, #rightSideMenu) .qr-pallet-detail-trigger:focus-visible { outline: 3px solid #126fbc; outline-offset: 0; }
    :is(#leftSideMenu, #rightSideMenu) table {
        width: 100%;
        margin-top: 12px;
        margin-bottom: 16px;
        background: #fff;
        border-color: var(--qr-line);
        color: var(--qr-ink);
        font-size: 14px;
        font-variant-numeric: tabular-nums;
    }
    :is(#leftSideMenu, #rightSideMenu) table :is(th, td) {
        padding: 8px 4px;
        vertical-align: middle;
        border-color: var(--qr-line);
        line-height: 1.5;
    }
    :is(#leftSideMenu, #rightSideMenu) table thead :is(th, td) {
        background: #e9eff4;
        color: #263d52;
        font-size: 14px;
        font-weight: 700;
    }
    :is(#leftSideMenu, #rightSideMenu) table tbody tr:focus-within {
        outline: 2px solid var(--qr-primary);
        outline-offset: -2px;
    }
    :is(#leftSideMenu, #rightSideMenu) :is(input.form-control, select.form-control, .selection-input) {
        min-height: 44px;
        padding: 8px 4px;
        background: #fff;
        color: #172f46;
        border: 1px solid #8b9eaf;
        border-radius: 5px;
        font-size: 16px;
        font-variant-numeric: tabular-nums;
        box-shadow: none;
    }
    :is(#leftSideMenu, #rightSideMenu) input[type=number] { text-align: right; }
    :is(#leftSideMenu, #rightSideMenu) input[readonly] {
        background: #edf1f5;
        border-color: #cbd5df;
        color: #40566c;
    }
    :is(#leftSideMenu, #rightSideMenu) :is(button, input, select):focus-visible {
        outline: 3px solid #126fbc;
        outline-offset: 2px;
    }
    :is(#leftSideMenu, #rightSideMenu) .btn {
        min-height: 44px;
        padding: 8px 7px;
        border-radius: 5px;
        font-size: 14px;
        font-weight: 600;
        min-width: 52px;
        white-space: nowrap;
    }
    :is(#leftSideMenu, #rightSideMenu) button[id$="-reset"] {
        background: #fff;
        color: #42566a;
        border-color: #8b9eaf;
    }
    :is(#leftSideMenu, #rightSideMenu) button[id$="-complete"] {
        background: var(--qr-primary);
        color: #fff;
        border-color: var(--qr-primary);
    }
    :is(#leftSideMenu, #rightSideMenu) tfoot td {
        padding-top: 12px;
        padding-bottom: 12px;
        background: #f0f4f7;
        border-top: 2px solid var(--qr-line);
    }
    :is(#leftSideMenu, #rightSideMenu) ._scan-info td {
        background: #e7f1f0;
        color: #174d48;
        font-weight: 700;
    }
    :is(#leftSideMenu, #rightSideMenu) .qr-pallet-badge {
        display: block;
        margin: 4px 0;
        font-size: 12px;
        font-weight: 600;
        color: #35556c;
        white-space: normal;
    }
    :is(#leftSideMenu, #rightSideMenu) > .red-bold {
        color: #536477 !important;
        font-size: 14px !important;
    }
    #leftSideMenu :is(#table-insert-qrcode-scan-list, #table-qrcode-scan-list) { min-width: 460px; }
    :is(#leftSideMenu, #rightSideMenu) ul { padding-left: 24px; }
    :is(#leftSideMenu, #rightSideMenu) li { margin-bottom: 10px; }
    #rightSideMenu .qr-output-default { display: block; text-align: left; margin: 10px 0; font-size: 14px; }
    #rightSideMenu .qr-output-type { min-width: 64px; margin-top: 6px; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-guide { margin: 0 0 12px; padding: 8px 10px; border: 1px solid #b5d5d0; border-radius: 6px; background: #edf6f4; color: #204c46; font-size: 14px; font-weight: 400; text-align: left; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-guide ol { padding-left: 20px; margin: 0; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-guide li { margin: 0 0 5px; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-guide p { margin: 7px 0 0; color: #35556c; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-empty { padding: 16px 12px; margin-bottom: 12px; border: 1px dashed #9aafc0; border-radius: 6px; background: #fff; color: #40566c; font-size: 15px; text-align: left; }
    :is(#leftSideMenu, #rightSideMenu) [hidden] { display: none !important; }
    :is(#leftSideMenu, #rightSideMenu) > br { display: none; }
    :is(#leftSideMenu, #rightSideMenu) .qr-slide-scan-switch { display: block; margin: 8px 0; text-align: right; }
    :is(#leftSideMenu, #rightSideMenu) .qr-table-hint { margin: 10px 0 4px; color: #40566c; font-size: 13px; text-align: left; }
    :is(#leftSideMenu, #rightSideMenu) .table-responsive { border: 1px solid var(--qr-line); border-radius: 5px; }
    :is(#leftSideMenu, #rightSideMenu) .table-responsive table { margin: 0; }
    :is(#leftSideMenu, #rightSideMenu) table p { margin: 0; }
    :is(#leftSideMenu, #rightSideMenu) ._input-pan small { display: inline-block; color: #40566c; font-size: 13px; padding: 2px 0 5px; }
    :is(#leftSideMenu, #rightSideMenu) ._buttons .btn { min-width: 64px; }
    :is(#leftSideMenu, #rightSideMenu) .background-FFD9EC > td { background: #fff3e2; }
    :is(#leftSideMenu, #rightSideMenu) .background-B2CCFF > td { background: #edf1f5; }
    :is(#leftSideMenu, #rightSideMenu) .matched-input { background: #edf1f5 !important; }
    :is(#leftSideMenu, #rightSideMenu) .qr-output-default { color: #263d52; font-weight: 700; }
    :is(#leftSideMenu, #rightSideMenu) .qr-output-default select { margin-top: 4px; }
    :is(#leftSideMenu, #rightSideMenu) ._buttons .btn { height: auto !important; }
    :is(#leftSideMenu, #rightSideMenu) input:is([name="insertPiece[]"], [name$="[piece]"], [name$="[eggPiece]"]) { width: 38px !important; min-width: 38px !important; max-width: 38px; flex: 0 0 38px; padding: 6px 3px; text-align: center; margin-inline: auto; appearance: textfield; }
    :is(#leftSideMenu, #rightSideMenu) input::-webkit-inner-spin-button, :is(#leftSideMenu, #rightSideMenu) input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
    :is(#leftSideMenu, #rightSideMenu) .qr-inline-quantity { display: flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; }
    :is(#leftSideMenu, #rightSideMenu) .qr-inline-quantity input[name="insertPan[]"] { width: 45px; min-width: 0; padding: 6px 3px; text-align: center; }
    :is(#leftSideMenu, #rightSideMenu) .qr-inline-quantity small { padding: 0; font-size: 12px; }
    :is(#leftSideMenu, #rightSideMenu) td.qr-exact-quantity { font-size: 0; }
    :is(#leftSideMenu, #rightSideMenu) td.qr-exact-quantity::after { content: attr(data-qr-quantity); font-size: 13px; white-space: nowrap; }
    :is(#leftSideMenu, #rightSideMenu) .qr-input-dialog-cell > :not(.qr-input-summary), :is(#leftSideMenu, #rightSideMenu) td.qr-input-dialog-piece { display: none; }
    :is(#leftSideMenu, #rightSideMenu) .qr-input-summary { display: inline-block; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    #leftSideMenu #table-qrcode-scan-list { min-width: 0; max-width: 100%; table-layout: fixed; }
    #leftSideMenu #table-qrcode-scan-list :is(th,td) { padding: 6px 2px; font-size: 13px; }
    #leftSideMenu #table-qrcode-scan-list td.qr-exact-quantity { font-size: 0; }
    #leftSideMenu #table-qrcode-scan-list :is(th,.qr-shipping-summary) { white-space: nowrap; }
    #leftSideMenu #table-qrcode-scan-list ._farm-name, #leftSideMenu #table-qrcode-scan-list ._company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #leftSideMenu #table-qrcode-scan-list .btn { width: 100%; min-width: 0; height: auto !important; padding: 8px 2px; font-size: 13px; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(1) { width: 15%; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(2) { width: 15%; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(3) { width: 14%; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(4) { width: 7%; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(5) { width: 15%; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(6) { width: 16%; }
    #leftSideMenu #table-qrcode-scan-list.qr-shipping-table th:nth-child(7) { width: 18%; }
    #leftSideMenu #table-qrcode-scan-list.qr-simple-shipping-table th:nth-child(1) { width: 20%; }
    #leftSideMenu #table-qrcode-scan-list.qr-simple-shipping-table th:nth-child(2) { width: 29%; }
    #leftSideMenu #table-qrcode-scan-list.qr-simple-shipping-table th:nth-child(3) { width: 17%; }
    #leftSideMenu #table-qrcode-scan-list.qr-simple-shipping-table th:nth-child(4) { width: 17%; }
    #leftSideMenu #table-qrcode-scan-list.qr-simple-shipping-table th:nth-child(5) { width: 17%; }
    @media (max-width: 1023px) { #leftSideMenu.sideMenu, #rightSideMenu.sideMenu { width: 100%; } }
    @media (min-width: 0px) {
        #leftSideMenu #table-insert-qrcode-scan-list { min-width: 0; max-width: 100%; table-layout: fixed; }
        #leftSideMenu #table-insert-qrcode-scan-list :is(th,td) { padding: 6px 2px; overflow-wrap: anywhere; white-space: normal; }
        #leftSideMenu #table-insert-qrcode-scan-list input { width: 100%; min-width: 0; }
        #leftSideMenu #table-insert-qrcode-scan-list ._buttons .btn { min-width: 0; width: 100%; padding: 8px 2px; font-size: 13px; white-space: normal; }
        #leftSideMenu #table-insert-qrcode-scan-list .qr-pallet-badge { font-size: 12px; line-height: 1.5; }
        #leftSideMenu #table-insert-qrcode-scan-list .qr-trace-link { font-size: 12px; line-height: 1.5; }
        #leftSideMenu #table-insert-qrcode-scan-list th { font-size: 13px; white-space: nowrap !important; word-break: keep-all !important; overflow-wrap: normal !important; }
        #leftSideMenu #table-insert-qrcode-scan-list tfoot .btn { min-width: 0; padding: 8px 3px; font-size: 13px; white-space: normal; }
        #leftSideMenu #table-insert-qrcode-scan-list colgroup { display: none; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(1) { width: 6%; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(2) { width: 13%; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(3) { width: 18%; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(4) { width: 17%; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(5) { width: 14%; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(6) { width: 14%; }
        #leftSideMenu #table-insert-qrcode-scan-list th:nth-child(7) { width: 18%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(1) { width: 5%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(2) { width: 13%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(3) { width: 8%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(4) { width: 17%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(5) { width: 15%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(6) { width: 23%; }
        #leftSideMenu[data-qr-workflow="sorting"] #table-insert-qrcode-scan-list th:nth-child(7) { width: 19%; }
        #leftSideMenu:is([data-qr-workflow="packing"],[data-qr-workflow="moving"]) #table-insert-qrcode-scan-list th:nth-child(5) { width: 28%; }
    }
    :is(#leftSideMenu, #rightSideMenu) .qr-trace-link { display: inline-block; padding: 8px 0; color: #12617a; text-decoration: underline; font-size: 12px; }
    @media (prefers-reduced-motion: reduce) {
        #leftSideMenu.sideMenu, #rightSideMenu.sideMenu { transition: none; }
    }
}

@media screen {
    select.qr-pallet-native { position: absolute !important; width: 1px !important; min-width: 0 !important; max-width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; clip-path: inset(50%); pointer-events: none; }
    .qr-pallet-choices { display: flex; align-items: center; gap: 6px; }
    .qr-pallet-choices button { min-width: 58px; min-height: 44px; padding: 8px 10px; border: 1px solid #8b9eaf; border-radius: 5px; color: #263d52; background: #fff; font-size: 15px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
    .qr-pallet-choices button[aria-pressed="true"] { color: #fff; background: #116b63; border-color: #116b63; box-shadow: inset 0 0 0 1px #fff; }
    .qr-pallet-choices button:focus-visible { outline: 3px solid #126fbc; outline-offset: 2px; }
    .qr-pallet-choices[data-error] { outline: 2px solid #c9302c; outline-offset: 3px; }
    .qr-pallet-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 12px 0; }
    #rightSideMenu .qr-pallet-toolbar .qr-output-default { margin: 0; }
    .qr-output-caption { display: block; margin-bottom: 4px; font-size: 13px; color: #40566c; font-weight: 400; text-align: left; }
    .qr-pallet-choices-compact { gap: 2px; margin-top: 4px; }
    .qr-pallet-choices-compact button { min-width: 36px; min-height: 44px; padding: 6px 2px; font-size: 12px; flex: 1 1 auto; }
    #rightSideMenu .btn { height: auto !important; }
    #rightSideMenu #selection-qrcode-scan-list > br { display: none; }
    #rightSideMenu #selection-qrcode-scan-list > :is(.font20,.black-bold) { font-size: 16px !important; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list { table-layout: fixed; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list col:nth-child(1) { width: 25% !important; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list col:nth-child(2), #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list col:nth-child(3), #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list col:nth-child(4) { width: 12% !important; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list col:nth-child(5) { width: 17% !important; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list col:nth-child(6) { width: 22% !important; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list td:first-child { padding: 4px 2px; }
    #rightSideMenu[data-qr-workflow="packing"] #table-selection-qrcode-scan-list :is(input.form-control,.btn) { font-size: 14px; }
    #qr-pallet-details-modal { color: #203247; font-size: 15px; line-height: 1.5; }
    #qr-pallet-details-modal .modal-dialog { width: calc(100% - 24px); max-width: 640px; margin: 20px auto; }
    #qr-pallet-details-modal .modal-content { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); border-radius: 10px; }
    #qr-pallet-details-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-color: #cbd5df; }
    #qr-pallet-details-modal .modal-title { margin: 0; color: #203247; font-size: 18px; font-weight: 700; }
    #qr-pallet-details-modal .qr-detail-close { min-width: 56px; min-height: 44px; flex-shrink: 0; background: #fff; border: 1px solid #9aafc0; border-radius: 6px; font-size: 14px; }
    #qr-pallet-details-modal .modal-body { overflow-y: auto; overscroll-behavior: contain; font-weight: 400; }
    #qr-pallet-details-modal .modal-body p { margin: 5px 0; }
    #qr-pallet-details-modal .modal-footer { border-color: #cbd5df; }
    #qr-pallet-details-modal .btn { min-height: 44px; font-size: 14px; }
    #qr-pallet-details-modal [hidden] { display: none !important; }
    #qr-pallet-details-modal .qr-detail-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 12px; border: 1px solid #b5d5d0; border-radius: 6px; background: #edf6f4; }
    #qr-pallet-details-modal .qr-detail-summary dt { font-size: 14px; font-weight: 400; }
    #qr-pallet-details-modal .qr-detail-summary dd { margin: 0; font-size: 16px; font-weight: 700; text-align: right; }
    #qr-pallet-details-modal .qr-detail-section { margin: 18px 0 10px; font-size: 16px; font-weight: 700; }
    #qr-pallet-details-modal .qr-detail-events { margin: 0; padding: 0; list-style: none; }
    #qr-pallet-details-modal .qr-detail-events > li { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #cbd5df; border-radius: 6px; background: #fff; }
    #qr-pallet-details-modal .qr-detail-events > .qr-detail-current { border-left: 4px solid #116b63; background: #f4f9f8; }
    #qr-pallet-details-modal .qr-detail-event-heading { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
    #qr-pallet-details-modal .qr-detail-event-heading time { color: #40566c; font-size: 13px; font-weight: 400; white-space: nowrap; }
    #qr-pallet-details-modal .qr-detail-quantity, #qr-pallet-details-modal .qr-detail-history-no { font-size: 14px; font-variant-numeric: tabular-nums; }
    #qr-pallet-details-modal .qr-detail-origin { color: #40566c; font-size: 13px; }
    #qr-pallet-details-modal .qr-detail-documents { display: flex; gap: 12px; flex-wrap: wrap; }
    #qr-pallet-details-modal a { color: #12617a; text-decoration: underline; }
    #qr-pallet-details-modal .qr-detail-documents a { display: inline-block; padding: 8px 0; font-size: 14px; }
    #qr-pallet-details-modal .qr-detail-error { color: #a12626; }
    #qr-pallet-details-modal .qr-help-example { padding: 8px 10px; border-radius: 5px; background: #edf6f4; color: #174d48; font-weight: 700; }
    #qr-pallet-details-modal .qr-quantity-available { padding: 10px 12px; background: #edf6f4; border-radius: 6px; font-size: 17px; font-weight: 700; }
    #qr-pallet-details-modal .qr-quantity-fields { display: flex; align-items: end; gap: 24px; margin: 16px 0; }
    #qr-pallet-details-modal .qr-quantity-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 15px; }
    #qr-pallet-details-modal .qr-quantity-field input { width: 100px; min-height: 48px; padding: 8px; font-size: 20px; font-variant-numeric: tabular-nums; text-align: right; appearance: textfield; }
    #qr-pallet-details-modal .qr-quantity-field input.qr-quantity-loose { width: 44px; padding: 8px 4px; text-align: center; }
    #qr-pallet-details-modal input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    #qr-pallet-details-modal .qr-quantity-preview { font-size: 15px; font-variant-numeric: tabular-nums; }
    #qr-pallet-details-modal .qr-quantity-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
}
@media print { #qr-pallet-details-modal { display: none !important; } }
