/* ========================================
   WMS工作台 - 打包模块样式
   ======================================== */

/* 打包模块容器 */
.wms-packing-container {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* 主布局区域 */
.wms-packing-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    gap: 12px;
    padding: 12px;
}

/* 左侧区域 (26%) */
.wms-packing-left {
    width: 26%;
    min-width: 400px;
    max-width: 26%;
    display: flex;
    flex-direction: column;
    gap: 0;
    white-space: nowrap;
}

/* 右侧区域 (74%) */
.wms-packing-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 区域通用样式 */
.wms-packing-scan-area,
.wms-packing-settings-area,
.wms-packing-camera-area,
.wms-packing-operation-area {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 左上：打包任务 */
.wms-packing-scan-area {
    flex: 1;
    min-height: 0;
    border-radius: 8px 8px 0 0;
}

/* 左下：设置区 - 固定高度 */
.wms-packing-settings-area {
    height: 116px;
    flex-shrink: 0;
    border-radius: 0 0 8px 8px;
}

/* 右上：监控区域 (40%) */
.wms-packing-monitor-area {
    height: 40%;
    display: flex;
    gap: 8px;
}

.wms-packing-monitor-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 打包监控区域 - 按16:9比例 */
.wms-packing-monitor-item.packing-monitor {
    flex: none;
    /* 宽度由JavaScript根据高度按16:9比例计算 */
}

.wms-packing-monitor-item .wms-area-header {
    background-color: #f5f7fa;
    padding: 10px 12px;
    border-bottom: 1px solid #e7e7e7;
    flex-shrink: 0;
}

.wms-packing-monitor-item .wms-area-content {
    flex: 1;
    padding: 12px;
    overflow: auto;
}

/* 摄像头样式 */
.wms-camera-content {
    padding: 0 !important;
    position: relative;
    background-color: #000;
}

.wms-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 摄像头叠加信息 */
.wms-camera-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 10;
}

.wms-camera-overlay-time {
    font-size: clamp(12px, 1.5vw, 18px);
    font-weight: 600;
    color: #fff;
    font-family: 'Consolas', 'Monaco', monospace;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}

.wms-camera-overlay-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wms-camera-overlay-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wms-camera-overlay-label {
    font-size: clamp(10px, 1vw, 12px);
    color: rgba(255, 255, 255, 0.7);
    min-width: clamp(50px, 5vw, 60px);
    flex-shrink: 0;
}

.wms-camera-overlay-value {
    font-size: clamp(11px, 1.1vw, 14px);
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wms-camera-waiting {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    background-color: #1a1a1a;
}

.wms-camera-waiting svg {
    opacity: 0.4;
    margin-bottom: 12px;
}

.wms-camera-waiting p {
    margin: 0;
    font-size: 14px;
    color: #888;
}

.wms-camera-waiting-hint {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: #555 !important;
}

.wms-camera-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    background-color: #1a1a1a;
    padding: 20px;
}

.wms-camera-error svg {
    opacity: 0.5;
    margin-bottom: 12px;
    color: #ff4d4f;
}

.wms-camera-error p {
    margin: 0;
    font-size: 14px;
    color: #888;
    text-align: center;
    white-space: pre-line;
}

.wms-camera-error-hint {
    margin-top: 8px !important;
    font-size: 12px !important;
    color: #555 !important;
    opacity: 0.8;
}

/* 右下：打包操作 (60%) */
.wms-packing-operation-area {
    height: 60%;
}

/* 区域头部 */
.wms-area-header {
    height: 40px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e7e7e7;
    background-color: #fafafa;
}

.wms-area-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    user-select: none;
}

/* 区域内容 */
.wms-area-content {
    flex: 1;
    padding: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========================================
   打包任务区域样式
   ======================================== */

/* 扫码输入框锁定状态 */
.wms-scan-input-locked {
    background: linear-gradient(135deg, #e6f4ff 0%, #d6e8ff 100%) !important;
    border-color: #91caff !important;
    color: #0052d9 !important;
    font-weight: 600;
    text-align: center;
    cursor: not-allowed;
}

/* 扫码输入框 */
.wms-scan-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.wms-scan-input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease;
}

.wms-keyboard-btn {
    width: 44px;
    height: 40px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wms-keyboard-btn:hover {
    background-color: #f5f5f5;
    border-color: #0052d9;
}

.wms-keyboard-btn:hover svg {
    stroke: #0052d9;
}

.wms-keyboard-btn:active {
    background-color: #e8e8e8;
}

.wms-keyboard-btn:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.5;
}

.wms-scan-input:focus {
    border-color: #0052d9;
}

.wms-scan-input::placeholder {
    color: #999;
}

/* 区域分块 */
.wms-scan-section {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.wms-scan-section:last-child {
    margin-bottom: 0;
}

/* 货品信息区域使用flex填充剩余空间 */
.wms-scan-section.wms-product-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.wms-product-section .wms-scan-section-title {
    flex-shrink: 0;
}

.wms-product-section .wms-product-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.wms-scan-section-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid #0052d9;
    user-select: none;
}

/* 包裹任务 */
.wms-package-empty,
.wms-task-info-empty,
.wms-product-empty {
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

.wms-package-error {
    color: #d4380d;
    font-size: 13px;
    text-align: center;
    padding: 16px;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
}

.wms-package-error strong {
    color: #a8071a;
    font-weight: 500;
}

.wms-package-warning {
    color: #d48806;
    font-size: 13px;
    padding: 12px;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: wms-fade-in 0.3s ease;
}

.wms-package-warning strong {
    color: #ad6800;
    font-weight: 600;
}

@keyframes wms-fade-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.wms-package-count {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.wms-package-count strong {
    color: #0052d9;
}

.wms-package-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.wms-package-tags::-webkit-scrollbar {
    height: 4px;
}

.wms-package-tags::-webkit-scrollbar-thumb {
    background-color: #d9d9d9;
    border-radius: 2px;
}

.wms-package-tags::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

/* 包裹任务摘要样式 */
.wms-package-summary {
    margin-bottom: 10px;
    user-select: none;
}

.wms-package-progress {
    font-size: 13px;
    color: #666;
}

.wms-package-progress strong {
    color: #0052d9;
}

.wms-package-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background-color: #e6f0ff;
    border-radius: 4px;
    border-left: 3px solid #0052d9;
}

.wms-package-current-label {
    font-size: 12px;
    color: #666;
}

.wms-package-current-code {
    font-size: 14px;
    font-weight: 600;
    color: #0052d9;
}

.wms-package-current-status {
    font-size: 12px;
    color: #fff;
    background-color: #0052d9;
    padding: 2px 8px;
    border-radius: 3px;
}

/* 包裹任务操作按钮 */
.wms-package-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.wms-package-viewall-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #0052d9;
    border: 1px solid #0052d9;
    color: #fff;
}

.wms-package-viewall-btn:hover {
    background-color: #0043a8;
}

/* 弹窗样式 */
.wms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.wms-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    display: flex;
    user-select: none;
    flex-direction: column;
}

.wms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e7e7e7;
}

.wms-modal-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.wms-modal-body {
    flex: 0 0 auto;
    padding: 12px;
}

/* 发货单列表样式 */
.wms-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wms-tasks-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wms-tasks-item.active {
    background-color: #e6f0ff;
    border-left: 3px solid #0052d9;
}

.wms-tasks-item.completed {
    background-color: #f0f9eb;
    opacity: 0.7;
}

.wms-tasks-item.pending {
    background-color: #fafafa;
    opacity: 0.8;
}

.wms-tasks-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wms-tasks-item-code {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.wms-tasks-item-status {
    font-size: 11px;
    color: #666;
    background-color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}

.wms-tasks-item-status.wms-status-completed {
    background-color: #e1f3d8;
    color: #67c23a;
}

.wms-tasks-item-status.wms-status-pending {
    background-color: #fdf6ec;
    color: #e6a23c;
}

.wms-tasks-item-index {
    font-size: 12px;
    color: #999;
}

/* 弹窗分页样式 */
.wms-modal-content-lg {
    width: 500px;
}

.wms-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px;
    border-top: 1px solid #e7e7e7;
    background-color: #fafafa;
}

.wms-pagination-btn {
    min-width: 80px;
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.wms-pagination-btn:hover:not(:disabled) {
    border-color: #0052d9;
    color: #0052d9;
}

.wms-pagination-btn:active:not(:disabled) {
    background-color: #f0f5ff;
}

.wms-pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e7e7e7;
}

.wms-pagination-info {
    font-size: 14px;
    color: #666;
    min-width: 100px;
    text-align: center;
}

/* 触屏优化 - 增大点击区域 */
.wms-modal-close {
    width: 44px;
    height: 44px;
    font-size: 24px;
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}

.wms-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.wms-modal-close:active {
    background-color: #e8e8e8;
}

.wms-tasks-item {
    padding: 14px 16px;
    min-height: 48px;
}

/* 任务信息 */
.wms-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    user-select: none;
}

.wms-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wms-info-item-full {
    grid-column: span 3;
}

.wms-info-item-full .wms-info-value {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wms-info-label {
    font-size: 12px;
    color: #999;
}

.wms-info-value {
    font-size: 14px;
    color: #333;
}

.wms-info-value-bold {
    font-weight: 600;
    color: #0052d9;
}

.wms-status-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 13px;
    border-radius: 3px;
}

.wms-status-yes {
    background-color: #e6fffb;
    color: #13c2c2;
}

.wms-status-no {
    background-color: #f5f5f5;
    color: #999;
}

/* 货品列表 */
.wms-product-header {
    border: 1px solid #e7e7e7;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.wms-product-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #e7e7e7;
    border-top: none;
    border-radius: 0 0 4px 4px;
    user-select: none;
    -webkit-user-select: none;
}

.wms-product-body::-webkit-scrollbar {
    width: 6px;
}

.wms-product-body::-webkit-scrollbar-thumb {
    background-color: #d9d9d9;
    border-radius: 3px;
}

.wms-product-body::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

.wms-product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.wms-product-table th,
.wms-product-table td {
    padding: 8px 6px;
    text-align: left;
}

.wms-product-table th {
    background-color: #fafafa;
    font-weight: 500;
    color: #666;
}

.wms-product-table td {
    color: #333;
    border-bottom: 1px solid #e7e7e7;
}

.wms-product-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* 出库数量列居中 */
.wms-product-table th:nth-child(3),
.wms-product-table td:nth-child(3) {
    text-align: center;
}

/* 无数据时的样式 */
.wms-product-empty {
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    padding: 20px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* ========================================
   底部任务栏
   ======================================== */

.wms-taskbar {
    height: 40px;
    background: linear-gradient(to right, #0078d4, #005a9e);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
    user-select: none;
}

.wms-taskbar-left,
.wms-taskbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wms-taskbar-item {
    display: flex;
    align-items: center;
}

.wms-taskbar-label {
    color: rgba(255, 255, 255, 0.8);
}

.wms-taskbar-value {
    font-weight: 500;
    color: #fff;
}

.wms-taskbar-unit {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 2px;
}

.wms-taskbar-divider {
    width: 1px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
}

.wms-taskbar-logout {
    padding: 4px 12px;
    font-size: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.wms-taskbar-logout:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   设置区按钮
   ======================================== */

.wms-settings-buttons {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    height: 100%;
    align-items: center;
    padding: 0;
}

.wms-settings-btn {
    flex: 1;
    height: 52px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
    box-sizing: border-box;
}

.wms-settings-btn:hover {
    border-color: #0052d9;
    color: #0052d9;
    background: #f0f5ff;
}

.wms-settings-btn:active {
    transform: scale(0.98);
}

.wms-settings-btn svg {
    width: 18px;
    height: 18px;
}

/* 退出系统按钮 - 红色 */
.wms-settings-btn-danger {
    color: #d4380d;
}

.wms-settings-btn-danger svg {
    stroke: #d4380d;
}

.wms-settings-btn-danger:hover {
    border-color: #d4380d;
    color: #d4380d;
    background: #fff2f0;
}

/* ========================================
   退出确认弹窗
   ======================================== */

.wms-logout-modal {
    background-color: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    width: 320px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

.wms-logout-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #fff2f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.wms-logout-icon svg {
    stroke: #d4380d;
}

.wms-logout-icon-warning {
    background-color: #fffbe6;
}

.wms-logout-icon-warning svg {
    stroke: #d48806;
}

.wms-logout-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.wms-logout-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    text-align: center;
}

.wms-logout-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.wms-logout-btn {
    flex: 1;
    height: 48px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.wms-logout-btn-cancel {
    background-color: #f5f5f5;
    color: #333;
}

.wms-logout-btn-cancel:hover {
    background-color: #e8e8e8;
}

.wms-logout-btn-cancel:active {
    background-color: #d9d9d9;
}

.wms-logout-btn-confirm {
    background-color: #d4380d;
    color: #fff;
}

.wms-logout-btn-confirm:hover {
    background-color: #b80700;
}

.wms-logout-btn-confirm:active {
    background-color: #9c0600;
}

.wms-logout-btn-single {
    background-color: #0052d9;
    color: #fff;
}

.wms-logout-btn-single:hover {
    background-color: #0043a8;
}

.wms-logout-btn-single:active {
    background-color: #003580;
}

/* ========================================
   左中右三列布局 - 打包操作区域
   ======================================== */

/* 三列布局容器 */
.wms-packing-three-col {
    display: flex;
    gap: 12px;
    flex: 1;
    min-height: 0;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
}

/* 左侧：耗材复核 */
.wms-packing-three-col-left {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* 中间：货品复核 */
.wms-packing-three-col-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 右侧：重量复核 */
.wms-packing-three-col-right {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* 复核卡片基础样式 */
.wms-review-card {
    background-color: #fafafa;
    border-radius: 6px;
    border: 1px solid #e7e7e7;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wms-review-card-header {
    height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e7e7e7;
    flex-shrink: 0;
}

.wms-review-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wms-review-card-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
}

.wms-review-card.completed .wms-review-card-icon {
    background-color: #52c41a;
}

.wms-review-card.pending .wms-review-card-icon {
    background-color: #d9d9d9;
}

.wms-review-card.active .wms-review-card-icon {
    background-color: #0052d9;
}

.wms-review-card-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.wms-review-card.completed .wms-review-card-badge {
    background-color: #f6ffed;
    color: #52c41a;
}

.wms-review-card.pending .wms-review-card-badge {
    background-color: #f5f5f5;
    color: #999;
}

.wms-review-card.active .wms-review-card-badge {
    background-color: #e6f0ff;
    color: #0052d9;
}

.wms-review-card-body {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.wms-review-card-body::-webkit-scrollbar {
    width: 6px;
}

.wms-review-card-body::-webkit-scrollbar-thumb {
    background-color: #d9d9d9;
    border-radius: 3px;
}

.wms-review-card-body::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

/* 耗材复核样式 */
.wms-box-card-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.wms-box-display-item {
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    padding: 10px 12px;
    position: relative;
    margin-bottom: 6px;
}

.wms-box-display-item:last-child {
    margin-bottom: 0;
}

.wms-box-display-item.recommended {
    border-color: #0052d9;
    background-color: #f0f7ff;
}

.wms-box-display-item.alternate {
    border-color: #ed7b2f;
    background-color: #fff8f0;
}

.wms-box-display-item.recycled {
    border-color: #2ba471;
    background-color: #f0faf5;
}

.wms-box-display-badge {
    position: absolute;
    top: -6px;
    right: 8px;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
}

.wms-box-display-badge.badge-recommend {
    background-color: #0052d9;
    color: #fff;
}

.wms-box-display-badge.badge-alternate {
    background-color: #ed7b2f;
    color: #fff;
}

.wms-box-display-badge.badge-recycled {
    background-color: #2ba471;
    color: #fff;
}

.wms-box-display-code {
    font-size: 10px;
    color: #0052d9;
    margin-bottom: 2px;
}

.wms-box-display-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.wms-box-display-size {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 扫码区域 */
.wms-box-scan-wrapper {
    padding: 12px;
    border-top: 1px solid #e7e7e7;
    background-color: #fafafa;
}

.wms-box-card-scan {
    background-color: #fff;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    padding: 10px 12px;
    text-align: left;
    transition: all 0.2s;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.wms-box-card-scan.filled {
    border-style: solid;
    border-color: #52c41a;
    background-color: #f6ffed;
    cursor: pointer;
}

.wms-box-card-scan.filled:hover {
    background-color: #e6f7ff;
    border-color: #91d5ff;
}

.wms-box-card-scan.filled:active {
    background-color: #bae7ff;
}

.wms-scan-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
}

.wms-box-card-scan.filled .wms-scan-waiting {
    display: none;
}

.wms-scan-result {
    display: none;
    width: 100%;
}

.wms-box-card-scan.filled .wms-scan-result {
    display: block;
}

.wms-box-card-scan-icon {
    font-size: 12px;
    color: #999;
}

.wms-box-card-scan-text {
    font-size: 11px;
    color: #999;
}

/* 货品复核网格 */
.wms-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.wms-product-grid-item {
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    padding: 8px 6px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}

.wms-product-grid-item:hover {
    border-color: #0052d9;
    box-shadow: 0 2px 6px rgba(0, 82, 217, 0.1);
}

.wms-product-grid-item.checked {
    border-color: #b7eb8f;
    background-color: #f6ffed;
}

.wms-product-grid-item.checked::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background-color: #52c41a;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wms-product-grid-name {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wms-product-grid-qty-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
}

.wms-product-grid-qty-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.wms-product-grid-qty-label {
    font-size: 9px;
    color: #999;
}

.wms-product-grid-qty-value {
    font-weight: 600;
    color: #0052d9;
}

.wms-product-grid-qty-value.match {
    color: #52c41a;
}

.wms-product-grid-qty-value.mismatch {
    color: #ff4d4f;
}

.wms-product-grid-divider {
    color: #d9d9d9;
    font-weight: 300;
}

/* 重量复核样式 */
.wms-weight-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wms-weight-card-row:last-child {
    margin-bottom: 0;
}

.wms-weight-card-label {
    font-size: 12px;
    color: #999;
}

.wms-weight-card-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wms-weight-card-input {
    width: 80px;
    height: 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    outline: none;
}

.wms-weight-card-input:focus {
    border-color: #0052d9;
}

.wms-weight-card-diff {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background-color: #fff;
    border-radius: 4px;
    margin-top: 8px;
}

.wms-weight-diff-ok {
    color: #52c41a;
}

.wms-weight-diff-warn {
    color: #faad14;
}

.wms-weight-diff-error {
    color: #ff4d4f;
}

/* 打包操作按钮 */
.wms-packing-actions {
    padding: 12px;
    border-top: 1px solid #e7e7e7;
    background-color: #fafafa;
    flex-shrink: 0;
}

.wms-packing-actions-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wms-packing-action-btn {
    width: 100%;
    height: 40px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
}

.wms-packing-action-btn svg {
    width: 16px;
    height: 16px;
}

.wms-packing-action-btn.wms-btn-primary {
    background-color: #0052d9;
    color: #fff;
}

.wms-packing-action-btn.wms-btn-primary:hover {
    background-color: #0043a8;
}

.wms-packing-action-btn.wms-btn-primary:active {
    background-color: #003580;
}

.wms-packing-action-btn.wms-btn-secondary {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

.wms-packing-action-btn.wms-btn-secondary:hover {
    background-color: #e8e8e8;
    border-color: #bbb;
}

.wms-packing-action-btn.wms-btn-secondary:active {
    background-color: #d9d9d9;
}

/* ========================================
   打包操作区域 - 空状态提示
   ======================================== */
.wms-packing-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    padding: 40px 20px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

.wms-packing-empty-state .wms-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f5ff;
    border-radius: 50%;
    margin-bottom: 16px;
}

.wms-packing-empty-state .wms-empty-icon svg {
    color: #0052d9;
    opacity: 0.6;
}

.wms-packing-empty-state .wms-empty-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.wms-packing-empty-state .wms-empty-desc {
    font-size: 13px;
    color: #999;
}

/* 耗材扫描弹窗 */
.wms-consumable-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.wms-consumable-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 340px;
    padding: 0;
    animation: wms-modal-fadeIn 0.2s ease-out;
    user-select: none;
}

.wms-consumable-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e7e7e7;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.wms-consumable-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.wms-consumable-modal-close:hover {
    background: #f0f0f0;
}

.wms-consumable-modal-close svg {
    width: 18px;
    height: 18px;
    color: #999;
}

@keyframes wms-modal-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wms-consumable-modal-body {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wms-consumable-modal-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wms-consumable-modal-icon svg {
    width: 64px;
    height: 64px;
    color: #0052d9;
    opacity: 0.8;
}

.wms-consumable-modal-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.wms-consumable-modal-hint {
    font-size: 13px;
    color: #2ba471;
    margin-top: 8px;
    display: none;
}

.wms-consumable-modal-hint.error {
    color: #e34d59;
}

.recycled-type {
    color: #2ba471;
    font-weight: 600;
}


.wms-consumable-modal-input-area {
    width: 100%;
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
}

.wms-consumable-modal-input {
    flex: 1;
    height: 44px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

.wms-consumable-modal-input:focus {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.wms-consumable-modal-input::placeholder {
    color: #bbb;
}

.wms-consumable-modal-footer {
    padding: 0 20px 20px;
}

.wms-consumable-modal-skip-btn {
    width: 100%;
    padding: 10px;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    background: #fafafa;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.wms-consumable-modal-skip-btn:hover {
    border-color: #ff7875;
    color: #cf1322;
    background: #fff2f0;
}

.wms-consumable-modal-input.error {
    border-color: #e34d59;
    animation: wms-shake 0.3s ease-in-out;
}

.wms-consumable-modal-keyboard-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wms-consumable-modal-keyboard-btn svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.wms-consumable-modal-keyboard-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.wms-consumable-modal-keyboard-btn:active {
    background: #e8e8e8;
}

@keyframes wms-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 跳过原因弹窗 */
.wms-skip-reason-modal {
    background: #fff;
    border-radius: 8px;
    width: 320px;
    max-width: 90%;
    padding: 20px;
    animation: wms-modal-fade-in 0.2s ease;
    user-select: none;
}

.wms-skip-reason-header {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.wms-skip-reason-section {
    margin-bottom: 16px;
}

.wms-skip-reason-section-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    padding-left: 2px;
}

.wms-skip-reason-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wms-skip-reason-grid.single {
    grid-template-columns: 1fr;
}

.wms-skip-reason-btn {
    padding: 12px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.wms-skip-reason-btn:hover {
    border-color: #0052d9;
    color: #0052d9;
    background: #f0f7ff;
}

.wms-skip-reason-btn:active {
    background: #e6f0ff;
}

.wms-skip-reason-btn.abnormal {
    border-color: #ffccc7;
    background: #fff2f0;
}

.wms-skip-reason-btn.abnormal:hover {
    border-color: #ff7875;
    color: #cf1322;
    background: #ffccc7;
}

.wms-skip-reason-btn.normal {
    border-color: #b7eb8f;
    background: #f6ffed;
}

.wms-skip-reason-btn.normal:hover {
    border-color: #52c41a;
    color: #389e0d;
    background: #d9f7be;
}

.wms-skip-reason-cancel {
    width: 100%;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.wms-skip-reason-cancel:hover {
    border-color: #bbb;
    background: #fafafa;
}

/* 扫描新容器弹窗 */
.wms-scan-container-modal {
    background: #fff;
    border-radius: 8px;
    width: 340px;
    max-width: 90%;
    overflow: hidden;
    animation: wms-modal-fade-in 0.2s ease;
    user-select: none;
}

.wms-scan-container-body {
    padding: 32px 20px 24px;
    text-align: center;
}

.wms-scan-container-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #f0f7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wms-scan-container-icon svg {
    width: 36px;
    height: 36px;
    color: #0052d9;
}

.wms-scan-container-text {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.wms-scan-container-tip {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    padding: 0 10px;
}

.wms-scan-container-hint {
    font-size: 12px;
    color: #999;
    min-height: 18px;
}

.wms-scan-container-input-area {
    display: flex;
    gap: 8px;
    padding: 0 20px 20px;
}

.wms-scan-container-input {
    flex: 1;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.wms-scan-container-input:focus {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.wms-scan-container-input::placeholder {
    color: #bbb;
}

.wms-scan-container-keyboard-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wms-scan-container-keyboard-btn svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.wms-scan-container-keyboard-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.wms-scan-container-cancel {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.wms-scan-container-cancel:hover {
    border-color: #bbb;
    background: #fafafa;
}

/* 跳过成功提示 */
.wms-skip-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 10000;
    animation: wms-toast-fade 2s ease forwards;
}

@keyframes wms-toast-fade {
    0%, 80% { opacity: 1; }
    100% { opacity: 0; }
}
