/* 预包货品页面样式 */
.goods-pre-pack-card {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

/* 搜索区域样式 */
.goods-pre-pack-search-form {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.goods-pre-pack-search-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.goods-pre-pack-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.goods-pre-pack-search-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    min-width: 70px;
}

.goods-pre-pack-search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    vertical-align: middle;
    box-sizing: border-box;
}

.goods-pre-pack-search-input:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.goods-pre-pack-search-input:hover {
    border-color: #c9cdd4;
}

/* 搜索下拉框样式 */
.goods-pre-pack-search-select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    vertical-align: middle;
    box-sizing: border-box;
    background-color: #fff;
    cursor: pointer;
}

.goods-pre-pack-search-select:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.goods-pre-pack-search-select:hover {
    border-color: #c9cdd4;
}

/* 列表区域样式 */
.goods-pre-pack-list {
    height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.goods-pre-pack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.goods-pre-pack-title {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

.goods-pre-pack-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.goods-pre-pack-btn {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f5f5f5;
    color: #4e5969;
    border: 1px solid #d9d9d9;
}

.goods-pre-pack-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.goods-pre-pack-btn:hover {
    background-color: #e6e6e6;
}

.goods-pre-pack-btn.goods-pre-pack-btn-primary {
    background-color: #0052d9;
    color: #ffffff;
    border-color: #0052d9;
}

.goods-pre-pack-btn.goods-pre-pack-btn-primary:hover {
    background-color: #003bb3;
    border-color: #003bb3;
}

/* 表格样式 */
.goods-pre-pack-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}

.goods-pre-pack-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 1300px;
}

/* 操作列样式 */
.goods-pre-pack-table th:nth-child(12),
.goods-pre-pack-table td:nth-child(12) {
    width: 200px;
    text-align: center;
    white-space: nowrap;
}

/* 操作按钮样式 - 参考预包任务页面 */
.goods-pre-pack-action-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #1890ff;
    background-color: #fff;
    color: #1890ff;
    margin: 0 2px;
}

.goods-pre-pack-action-btn:hover {
    background-color: #1890ff;
    color: white;
}

/* 启用按钮样式（绿色） */
.goods-pre-pack-action-btn.goods-pre-pack-action-enable {
    border-color: #67c23a;
    color: #67c23a;
}

.goods-pre-pack-action-btn.goods-pre-pack-action-enable:hover {
    background-color: #67c23a;
    color: white;
}

/* 停用按钮样式（红色） */
.goods-pre-pack-action-btn.goods-pre-pack-action-disable {
    border-color: #f56c6c;
    color: #f56c6c;
}

.goods-pre-pack-action-btn.goods-pre-pack-action-disable:hover {
    background-color: #f56c6c;
    color: white;
}

/* 日志按钮样式 */
.goods-pre-pack-action-btn.goods-pre-pack-action-log {
    border-color: #909399;
    color: #909399;
}

.goods-pre-pack-action-btn.goods-pre-pack-action-log:hover {
    background-color: #909399;
    color: white;
}

/* 详情按钮样式 */
.goods-pre-pack-action-btn.goods-pre-pack-action-detail {
    border-color: #1890ff;
    color: #1890ff;
}

.goods-pre-pack-action-btn.goods-pre-pack-action-detail:hover {
    background-color: #1890ff;
    color: white;
}

.goods-pre-pack-table th,
.goods-pre-pack-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #ebeef5;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.goods-pre-pack-table th {
    background-color: #f5f7fa;
    font-weight: 500;
    color: #303133;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #ebeef5;
}

.goods-pre-pack-table tbody tr {
    cursor: pointer;
}

.goods-pre-pack-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 展开按钮列样式 */
.goods-pre-pack-table th:nth-child(1),
.goods-pre-pack-table td:nth-child(1) {
    width: 40px;
    text-align: center;
}

/* 预包编码列宽度 */
.goods-pre-pack-table th:nth-child(2),
.goods-pre-pack-table td:nth-child(2) {
    min-width: 120px;
}

/* 预包名称、货主名称列宽度 */
.goods-pre-pack-table th:nth-child(3),
.goods-pre-pack-table td:nth-child(3),
.goods-pre-pack-table th:nth-child(4),
.goods-pre-pack-table td:nth-child(4) {
    min-width: 150px;
}

/* 数量列居中 */
.goods-pre-pack-table th:nth-child(5),
.goods-pre-pack-table td:nth-child(5),
.goods-pre-pack-table th:nth-child(6),
.goods-pre-pack-table td:nth-child(6),
.goods-pre-pack-table th:nth-child(7),
.goods-pre-pack-table td:nth-child(7),
.goods-pre-pack-table th:nth-child(8),
.goods-pre-pack-table td:nth-child(8) {
    text-align: center;
}

/* 预包状态列居中 */
.goods-pre-pack-table th:nth-child(9),
.goods-pre-pack-table td:nth-child(9) {
    text-align: center;
}

/* 创建人员列居中 */
.goods-pre-pack-table th:nth-child(10),
.goods-pre-pack-table td:nth-child(10) {
    text-align: center;
}

/* 状态标签样式 */
.goods-pre-pack-status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
}

.goods-pre-pack-status-enabled {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.goods-pre-pack-status-disabled {
    background-color: #f5f5f5;
    color: #999;
    border: 1px solid #d9d9d9;
}

/* 展开/折叠功能样式 */
.goods-pre-pack-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.goods-pre-pack-expand-btn:hover:not(.goods-pre-pack-disabled) {
    background-color: #f0f0f0;
}

.goods-pre-pack-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.goods-pre-pack-expand-btn.goods-pre-pack-expanded {
    background-color: #e6f7ff;
}

.goods-pre-pack-expand-btn svg {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: transform 0.3s ease;
}

.goods-pre-pack-expand-btn:hover svg {
    fill: #1890ff;
}

.goods-pre-pack-expand-btn.goods-pre-pack-expanded svg {
    fill: #1890ff;
    transform: rotate(90deg);
}

/* 主行样式 */
.goods-pre-pack-table .goods-pre-pack-main-row {
    cursor: pointer;
}

/* 展开行样式 */
.goods-pre-pack-table .goods-pre-pack-detail-row {
    background-color: #fafafa;
    border-left: 3px solid #1890ff;
    display: table-row;
}

.goods-pre-pack-table .goods-pre-pack-detail-row.goods-pre-pack-expanding {
    animation: goodsPrePackExpandAnimation 0.3s ease-out forwards;
    overflow: hidden;
    max-height: 500px;
    display: table-row !important;
}

.goods-pre-pack-table .goods-pre-pack-detail-row.goods-pre-pack-collapsing {
    animation: goodsPrePackCollapseAnimation 0.3s ease-out forwards;
    overflow: hidden;
    max-height: 500px;
}

@keyframes goodsPrePackExpandAnimation {
    0% {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes goodsPrePackCollapseAnimation {
    0% {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

.goods-pre-pack-table .goods-pre-pack-detail-cell {
    padding: 0;
    vertical-align: top;
}

/* 预包库存分布详情容器 */
.goods-pre-pack-stock-container {
    padding: 16px;
    background: white;
    margin: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.goods-pre-pack-stock-header {
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e6eb;
}

/* 库存分布表格样式 */
.goods-pre-pack-stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.goods-pre-pack-stock-table th {
    background-color: #f0f2f5;
    color: #1d2129;
    font-weight: 500;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
}

.goods-pre-pack-stock-table td {
    color: #4d5156;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 库区名称 - 20% */
.goods-pre-pack-stock-table th:nth-child(1),
.goods-pre-pack-stock-table td:nth-child(1) {
    width: 20%;
}

/* 库位编码 - 20% */
.goods-pre-pack-stock-table th:nth-child(2),
.goods-pre-pack-stock-table td:nth-child(2) {
    width: 20%;
}

/* 库区类型 - 12% 居中 */
.goods-pre-pack-stock-table th:nth-child(3),
.goods-pre-pack-stock-table td:nth-child(3) {
    width: 12%;
    text-align: center;
}

/* 批次编码 - 15% 居中 */
.goods-pre-pack-stock-table th:nth-child(4),
.goods-pre-pack-stock-table td:nth-child(4) {
    width: 15%;
    text-align: center;
}

/* 存储数量 - 13% 居中 */
.goods-pre-pack-stock-table th:nth-child(5),
.goods-pre-pack-stock-table td:nth-child(5) {
    width: 13%;
    text-align: center;
}

/* 货品过期日期 - 20% 居中 */
.goods-pre-pack-stock-table th:nth-child(6),
.goods-pre-pack-stock-table td:nth-child(6) {
    width: 20%;
    text-align: center;
}

.goods-pre-pack-stock-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* 分页样式 */
.goods-pre-pack-pagination {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

.goods-pre-pack-pagination-info {
    font-size: 14px;
    color: #4b5563;
}

.goods-pre-pack-pagination-controls {
    display: flex;
    gap: 8px;
}

.goods-pre-pack-pagination-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goods-pre-pack-pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.goods-pre-pack-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.goods-pre-pack-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4b5563;
}

.goods-pre-pack-page-size-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 13px;
}

/* 无数据提示样式 */
.goods-pre-pack-no-data {
    text-align: center;
    color: #86909c;
    padding: 20px;
}

/* 过期日期表头样式 */
.goods-pre-pack-expiry-header {
    position: static;
}

/* 工具提示图标样式 */
.goods-pre-pack-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #1890ff;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    position: relative;
    vertical-align: middle;
}

/* 工具提示气泡样式 - 使用固定定位避免被截断 */
.goods-pre-pack-tooltip-icon::after {
    content: attr(data-tooltip);
    position: fixed;
    top: var(--tooltip-top, auto);
    left: var(--tooltip-left, auto);
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    z-index: 99999;
    width: 280px;
    text-align: left;
    line-height: 1.6;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 工具提示小三角 */
.goods-pre-pack-tooltip-icon::before {
    content: '';
    position: fixed;
    top: var(--arrow-top, auto);
    left: var(--arrow-left, auto);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

/* 鼠标悬停时显示提示 */
.goods-pre-pack-tooltip-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.goods-pre-pack-tooltip-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ==================== 自定义确认对话框样式 ==================== */

/* 遮罩层 */
.goods-pre-pack-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.goods-pre-pack-confirm-overlay.goods-pre-pack-confirm-show {
    opacity: 1;
}

/* 对话框 */
.goods-pre-pack-confirm-dialog {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 420px;
    max-width: 90vw;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.goods-pre-pack-confirm-show .goods-pre-pack-confirm-dialog {
    transform: scale(1);
}

/* 对话框内容区 */
.goods-pre-pack-confirm-content {
    display: flex;
    align-items: flex-start;
    padding: 32px 32px 24px;
    gap: 16px;
}

/* 图标 */
.goods-pre-pack-confirm-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.goods-pre-pack-confirm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* 内容体 */
.goods-pre-pack-confirm-body {
    flex: 1;
}

/* 标题 */
.goods-pre-pack-confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 消息文本 */
.goods-pre-pack-confirm-message {
    font-size: 14px;
    color: #4e5969;
    line-height: 1.6;
}

/* 按钮区域 */
.goods-pre-pack-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 32px 24px;
    border-top: 1px solid #f0f0f0;
}

/* 按钮基础样式 */
.goods-pre-pack-confirm-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    outline: none;
}

/* 取消按钮 */
.goods-pre-pack-confirm-btn-cancel {
    background-color: #ffffff;
    border-color: #d9d9d9;
    color: #4e5969;
}

.goods-pre-pack-confirm-btn-cancel:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 确定按钮 - 默认 */
.goods-pre-pack-confirm-btn-confirm {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #ffffff;
}

.goods-pre-pack-confirm-btn-confirm:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 确定按钮 - 警告类型（停用） */
.goods-pre-pack-confirm-btn-warning {
    background-color: #faad14;
    border-color: #faad14;
}

.goods-pre-pack-confirm-btn-warning:hover {
    background-color: #ffc53d;
    border-color: #ffc53d;
}

/* ==================== 消息提示样式 ==================== */

.goods-pre-pack-message {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100001;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 200px;
}

.goods-pre-pack-message-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.goods-pre-pack-message-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.goods-pre-pack-message span {
    font-size: 14px;
    color: #1d2129;
}

/* 成功消息 */
.goods-pre-pack-message-success {
    border-left: 4px solid #52c41a;
}

.goods-pre-pack-message-success .goods-pre-pack-message-icon {
    color: #52c41a;
}

/* 信息消息 */
.goods-pre-pack-message-info {
    border-left: 4px solid #1890ff;
}

.goods-pre-pack-message-info .goods-pre-pack-message-icon {
    color: #1890ff;
}

/* ==================== 库存记录日志弹窗样式 ==================== */

/* 遮罩层 */
.goods-pre-pack-log-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.goods-pre-pack-log-overlay.goods-pre-pack-log-show {
    opacity: 1;
}

/* 弹窗 - 固定高度 */
.goods-pre-pack-log-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 700px;
    max-width: 90vw;
    height: 560px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.goods-pre-pack-log-show .goods-pre-pack-log-modal {
    transform: scale(1);
}

/* 弹窗头部 */
.goods-pre-pack-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.goods-pre-pack-log-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin: 0;
}

.goods-pre-pack-log-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8c8c8c;
    transition: all 0.2s ease;
}

.goods-pre-pack-log-close:hover {
    background-color: #f5f5f5;
    color: #1d2129;
}

.goods-pre-pack-log-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 副标题 */
.goods-pre-pack-log-subtitle {
    padding: 12px 24px;
    font-size: 13px;
    color: #666;
    background-color: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

/* 弹窗内容区外层 - 固定高度 */
.goods-pre-pack-log-content {
    flex: 1;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

/* 列表外层 - 可滚动 */
.goods-pre-pack-log-table-wrapper {
    height: 100%;
    overflow-y: auto;
}

/* 日志表格 */
.goods-pre-pack-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.goods-pre-pack-log-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.goods-pre-pack-log-table th {
    background-color: #f5f7fa;
    color: #303133;
    font-weight: 500;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #ebeef5;
    white-space: nowrap;
}

.goods-pre-pack-log-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #4e5969;
    white-space: nowrap;
}

.goods-pre-pack-log-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 时间列 */
.goods-pre-pack-log-table th:nth-child(1),
.goods-pre-pack-log-table td:nth-child(1) {
    width: 160px;
}

/* 变更数量列 */
.goods-pre-pack-log-table th:nth-child(2),
.goods-pre-pack-log-table td:nth-child(2) {
    width: 90px;
    text-align: center;
    font-weight: 500;
}

/* 业务类型列 */
.goods-pre-pack-log-table th:nth-child(3),
.goods-pre-pack-log-table td:nth-child(3) {
    width: 120px;
}

/* 业务单号列 */
.goods-pre-pack-log-table th:nth-child(4),
.goods-pre-pack-log-table td:nth-child(4) {
    min-width: 150px;
}

/* 正数（增加）样式 - 预包任务、调拨入库单 */
.goods-pre-pack-log-positive {
    color: #52c41a;
}

/* 负数（减少）样式 - 销售出库单、调拨出库单、其他出库单、预包拆卸 */
.goods-pre-pack-log-negative {
    color: #f5222d;
}

/* 业务单号样式 */
.goods-pre-pack-log-order-no {
    font-family: 'Courier New', monospace;
    color: #1890ff;
}

/* 空数据提示 */
.goods-pre-pack-log-empty {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

/* 弹窗分页 */
.goods-pre-pack-log-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.goods-pre-pack-log-page-info {
    font-size: 13px;
    color: #666;
}

.goods-pre-pack-log-page-controls {
    display: flex;
    gap: 8px;
}

.goods-pre-pack-log-page-btn {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #d9d9d9;
    background-color: #ffffff;
    color: #4e5969;
}

.goods-pre-pack-log-page-btn:hover:not(:disabled) {
    border-color: #1890ff;
    color: #1890ff;
}

.goods-pre-pack-log-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/* ==================== 详情弹窗样式 ==================== */

/* 遮罩层 */
.goods-pre-pack-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    animation: goodsPrePackDetailFadeIn 0.3s ease;
}

@keyframes goodsPrePackDetailFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗内容区 */
.goods-pre-pack-detail-modal {
    background-color: #fff;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: goodsPrePackDetailSlideDown 0.3s ease;
}

@keyframes goodsPrePackDetailSlideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 弹窗头部 */
.goods-pre-pack-detail-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e6eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background-color: #fff;
}

.goods-pre-pack-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2129;
    margin: 0;
}

.goods-pre-pack-detail-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #86909c;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.goods-pre-pack-detail-close:hover {
    background-color: #f2f3f5;
    color: #1d2129;
}

.goods-pre-pack-detail-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 弹窗内容 */
.goods-pre-pack-detail-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* 区块 */
.goods-pre-pack-detail-section {
    margin-bottom: 24px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e6eb;
}

.goods-pre-pack-detail-section:last-child {
    margin-bottom: 0;
}

.goods-pre-pack-detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #0052d9;
    display: flex;
    align-items: center;
}

.goods-pre-pack-detail-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background-color: #0052d9;
    margin-right: 10px;
    border-radius: 2px;
}

/* 基础信息网格 - 自适应列 */
.goods-pre-pack-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    background-color: #fff;
    padding: 16px;
    border-radius: 6px;
}

.goods-pre-pack-detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.goods-pre-pack-detail-info-item-full {
    grid-column: 1 / -1;
}

.goods-pre-pack-detail-label {
    font-size: 13px;
    color: #86909c;
    font-weight: 500;
}

.goods-pre-pack-detail-value {
    font-size: 14px;
    color: #1d2129;
    font-weight: 500;
}

/* 状态标签 */
.goods-pre-pack-detail-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
}

.goods-pre-pack-detail-status.status-enabled {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.goods-pre-pack-detail-status.status-disabled {
    background-color: #f5f5f5;
    color: #999;
    border: 1px solid #d9d9d9;
}

/* 货品表格 */
.goods-pre-pack-detail-table-wrapper {
    height: 350px;
    overflow-y: auto;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background-color: #fff;
}

.goods-pre-pack-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}

.goods-pre-pack-detail-table th,
.goods-pre-pack-detail-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goods-pre-pack-detail-table th {
    background-color: #f5f7fa;
    font-weight: 500;
    color: #303133;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05);
}

.goods-pre-pack-detail-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 序号列居中 */
.goods-pre-pack-detail-table th:first-child,
.goods-pre-pack-detail-table td:first-child {
    text-align: center;
    width: 60px;
}

/* 空数据提示 */
.goods-pre-pack-detail-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* 查看批次按钮 */
.goods-pre-pack-batch-btn {
    padding: 4px 12px;
    border: 1px solid #1890ff;
    background-color: #fff;
    color: #1890ff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.goods-pre-pack-batch-btn:hover {
    background-color: #1890ff;
    color: #fff;
}

/* ==================== 批次编码查看弹窗样式 ==================== */
.goods-pre-pack-batch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100001;
    animation: goodsPrePackBatchFadeIn 0.3s ease;
}

@keyframes goodsPrePackBatchFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.goods-pre-pack-batch-modal {
    background-color: #fff;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: goodsPrePackBatchSlideDown 0.3s ease;
}

@keyframes goodsPrePackBatchSlideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.goods-pre-pack-batch-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e6eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background-color: #fff;
}

.goods-pre-pack-batch-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2129;
    margin: 0;
}

.goods-pre-pack-batch-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #86909c;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.goods-pre-pack-batch-close:hover {
    background-color: #f2f3f5;
    color: #1d2129;
}

.goods-pre-pack-batch-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.goods-pre-pack-batch-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.goods-pre-pack-batch-section {
    margin-bottom: 24px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e5e6eb;
}

.goods-pre-pack-batch-section:last-child {
    margin-bottom: 0;
}

.goods-pre-pack-batch-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #0052d9;
    display: flex;
    align-items: center;
}

.goods-pre-pack-batch-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background-color: #0052d9;
    margin-right: 10px;
    border-radius: 2px;
}

.goods-pre-pack-batch-table-wrapper {
    height: 350px;
    overflow-y: auto;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background-color: #fff;
}

.goods-pre-pack-batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}

.goods-pre-pack-batch-table th,
.goods-pre-pack-batch-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goods-pre-pack-batch-table th {
    background-color: #f5f7fa;
    font-weight: 500;
    color: #303133;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05);
}

.goods-pre-pack-batch-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 序号列居中 */
.goods-pre-pack-batch-table th:first-child,
.goods-pre-pack-batch-table td:first-child {
    text-align: center;
    width: 60px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .goods-pre-pack-detail-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .goods-pre-pack-detail-modal {
        width: 98%;
        max-height: 95vh;
    }
    
    .goods-pre-pack-detail-content {
        padding: 16px;
    }
    
    .goods-pre-pack-detail-section {
        padding: 16px;
    }
    
    .goods-pre-pack-detail-info {
        grid-template-columns: 1fr;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .goods-pre-pack-card {
        padding: 16px;
    }
    
    .goods-pre-pack-table {
        font-size: 12px;
    }
    
    .goods-pre-pack-table th,
    .goods-pre-pack-table td {
        padding: 8px;
    }
    
    .goods-pre-pack-confirm-dialog {
        min-width: auto;
        width: calc(100vw - 32px);
        margin: 0 16px;
    }
    
    .goods-pre-pack-confirm-content {
        padding: 24px 20px 16px;
    }
    
    .goods-pre-pack-confirm-actions {
        padding: 12px 20px 20px;
    }
    
    .goods-pre-pack-log-modal {
        width: calc(100vw - 32px);
        max-height: 70vh;
    }
    
    .goods-pre-pack-log-header,
    .goods-pre-pack-log-pagination {
        padding-left: 16px;
        padding-right: 16px;
    }

    .goods-pre-pack-log-modal {
        height: 70vh;
        max-height: 500px;
    }
    
    .goods-pre-pack-log-table th,
    .goods-pre-pack-log-table td {
        padding: 10px 12px;
    }
    
    .goods-pre-pack-detail-modal {
        width: calc(100vw - 32px);
        height: 70vh;
        max-height: 500px;
    }

    .goods-pre-pack-detail-content {
        padding: 16px;
    }

    .goods-pre-pack-detail-info {
        grid-template-columns: 1fr;
    }

    .goods-pre-pack-detail-header {
        padding: 16px 20px;
    }

    .goods-pre-pack-detail-table-wrapper {
        max-height: 200px;
    }

    .goods-pre-pack-detail-table {
        font-size: 12px;
    }

    .goods-pre-pack-detail-table th,
    .goods-pre-pack-detail-table td {
        padding: 8px;
    }

    .goods-pre-pack-batch-modal {
        width: calc(100vw - 32px);
        height: 70vh;
        max-height: 500px;
    }

    .goods-pre-pack-batch-content {
        padding: 16px;
    }

    .goods-pre-pack-batch-section {
        padding: 16px;
    }

    .goods-pre-pack-batch-header {
        padding: 16px 20px;
    }

    .goods-pre-pack-batch-table-wrapper {
        max-height: 200px;
    }

    .goods-pre-pack-batch-table {
        font-size: 12px;
    }

    .goods-pre-pack-batch-table th,
    .goods-pre-pack-batch-table td {
        padding: 8px;
    }
}

/* ==================== 新增预包货品弹窗样式 ==================== */

/* 遮罩层 */
.goods-pre-pack-add-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.goods-pre-pack-add-overlay.goods-pre-pack-add-show {
    opacity: 1;
}

/* 弹窗 */
.goods-pre-pack-add-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 800px;
    max-width: 90vw;
    height: 650px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.goods-pre-pack-add-show .goods-pre-pack-add-modal {
    transform: scale(1);
}

/* 弹窗头部 */
.goods-pre-pack-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.goods-pre-pack-add-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin: 0;
}

.goods-pre-pack-add-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8c8c8c;
    transition: all 0.2s ease;
}

.goods-pre-pack-add-close:hover {
    background-color: #f5f5f5;
    color: #1d2129;
}

.goods-pre-pack-add-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 弹窗内容区 */
.goods-pre-pack-add-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* 区块样式 */
.goods-pre-pack-add-section {
    margin-bottom: 24px;
}

.goods-pre-pack-add-section:last-child {
    margin-bottom: 0;
}

.goods-pre-pack-add-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.goods-pre-pack-add-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d2129;
}

.goods-pre-pack-add-section-subtitle {
    font-size: 13px;
    color: #8c8c8c;
}

/* 表格区域 */
.goods-pre-pack-add-table-wrapper {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.goods-pre-pack-add-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.goods-pre-pack-add-table thead {
    background-color: #f5f7fa;
}

.goods-pre-pack-add-table th {
    color: #303133;
    font-weight: 500;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #ebeef5;
    white-space: nowrap;
}

.goods-pre-pack-add-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #4e5969;
}

.goods-pre-pack-add-table tbody tr:last-child td {
    border-bottom: none;
}

.goods-pre-pack-add-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* 预包数量输入框 */
.goods-pre-pack-add-quantity-input {
    width: 80px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.goods-pre-pack-add-quantity-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 删除按钮 */
.goods-pre-pack-add-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4d4f;
    transition: all 0.2s ease;
}

.goods-pre-pack-add-delete-btn:hover {
    background-color: #fff1f0;
}

.goods-pre-pack-add-delete-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* 空数据提示 */
.goods-pre-pack-add-empty {
    text-align: center;
    padding: 40px !important;
}

.goods-pre-pack-add-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #8c8c8c;
}

.goods-pre-pack-add-empty-content svg {
    width: 48px;
    height: 48px;
    fill: #d9d9d9;
}

/* 添加货品按钮 */
.goods-pre-pack-add-goods-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    background: #fafafa;
    color: #595959;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goods-pre-pack-add-goods-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
    background: #f0f5ff;
}

.goods-pre-pack-add-goods-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* 备注输入框 */
.goods-pre-pack-add-remark {
    width: 100%;
    height: 80px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.goods-pre-pack-add-remark:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.goods-pre-pack-add-remark::placeholder {
    color: #bfbfbf;
}

/* 弹窗底部 */
.goods-pre-pack-add-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.goods-pre-pack-add-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.goods-pre-pack-add-btn-cancel {
    background-color: #ffffff;
    border-color: #d9d9d9;
    color: #595959;
}

.goods-pre-pack-add-btn-cancel:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.goods-pre-pack-add-btn-confirm {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #ffffff;
}

.goods-pre-pack-add-btn-confirm:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 基础信息区域 */
.goods-pre-pack-add-basic-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}

.goods-pre-pack-add-form-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.goods-pre-pack-add-form-label {
    font-size: 13px;
    color: #4e5969;
    min-width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.goods-pre-pack-add-required {
    color: #f5222d;
    margin-right: 4px;
}

.goods-pre-pack-add-form-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.goods-pre-pack-add-form-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.goods-pre-pack-add-form-input::placeholder {
    color: #bfbfbf;
}

/* 货主选择输入框 */
.goods-pre-pack-add-owner-input {
    cursor: pointer;
    background-color: #fafafa;
}

.goods-pre-pack-add-owner-input:hover {
    border-color: #1890ff;
    background-color: #f0f5ff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .goods-pre-pack-add-modal {
        width: calc(100vw - 32px);
        height: 70vh;
        max-height: 600px;
    }
    
    .goods-pre-pack-add-content {
        padding: 16px;
    }
    
    .goods-pre-pack-add-header,
    .goods-pre-pack-add-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .goods-pre-pack-add-table th,
    .goods-pre-pack-add-table td {
        padding: 10px 12px;
    }
    
    .goods-pre-pack-add-basic-info {
        grid-template-columns: 1fr;
    }
    
    .goods-pre-pack-add-form-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .goods-pre-pack-add-form-input {
        width: 100%;
    }
}
