/* 批次管理页面样式 - 独立样式，避免与其他页面冲突 */

/* 使用特定的命名空间前缀，避免样式冲突 */
.batch-mgmt-container {
    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;
}

.batch-mgmt-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

/* 搜索区域 */
.batch-mgmt-search-area {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.batch-mgmt-search-form {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.batch-mgmt-search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    flex: 1;
}

.batch-mgmt-search-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    white-space: nowrap;
    line-height: 1.2;
}

/* 组合搜索框样式 */
.batch-mgmt-search-item .search-combined {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e6eb;
    width: 100%;
    min-width: 200px;
}

.batch-mgmt-search-item .search-type {
    width: 100px;
    height: 36px;
    border: none;
    border-right: 1px solid #e5e6eb;
    border-radius: 0;
    padding: 0 12px;
    cursor: pointer;
    margin: 0;
}

.batch-mgmt-search-item .search-value {
    flex: 1;
    border: none;
    border-radius: 0;
    height: 36px;
    background: #ffffff;
    padding: 0 12px;
    margin: 0;
}

.batch-mgmt-search-input:not(.search-value),
.batch-mgmt-search-select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    vertical-align: middle;
}

.batch-mgmt-search-input:focus,
.batch-mgmt-search-select:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.batch-mgmt-search-input:hover,
.batch-mgmt-search-select:hover {
    border-color: #c9cdd4;
}

/* 日期范围容器样式 */
.batch-mgmt-date-range-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-mgmt-date-separator {
    color: #4b5563;
    font-size: 14px;
    white-space: nowrap;
}

.batch-mgmt-date-input {
    flex: 1;
    min-width: 120px;
}

/* 操作按钮区域 */
.batch-mgmt-action-area {

    justify-content: flex-end;
    margin-bottom: 10px;
}

.batch-mgmt-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #0052d9;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-mgmt-add-btn:hover {
    background-color: #0045b5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 82, 217, 0.3);
}

.batch-mgmt-add-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 82, 217, 0.3);
}

/* 列表区域 */
.batch-mgmt-table-container {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.batch-mgmt-table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    table-layout: fixed;
}

.batch-mgmt-table th,
.batch-mgmt-table td {
    padding: 8px 12px;
    text-align: left;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 80px;
    max-width: 200px;
}

/* 设置特定列的宽度 */
.batch-mgmt-table th:nth-child(1), /* 批次编码 */
.batch-mgmt-table td:nth-child(1) {
    width: 120px;
    min-width: 120px;
}

.batch-mgmt-table th:nth-child(2), /* 货品编码 */
.batch-mgmt-table td:nth-child(2) {
    width: 100px;
    min-width: 100px;
}

.batch-mgmt-table th:nth-child(3), /* 货品名称 */
.batch-mgmt-table td:nth-child(3) {
    width: 150px;
    min-width: 150px;
}

.batch-mgmt-table th:nth-child(4), /* 货主名称 */
.batch-mgmt-table td:nth-child(4) {
    width: 140px;
    min-width: 140px;
}

.batch-mgmt-table th:nth-child(5), /* 外部编码 */
.batch-mgmt-table td:nth-child(5) {
    width: 120px;
    min-width: 120px;
}

.batch-mgmt-table th:nth-child(6), /* 生产批号 */
.batch-mgmt-table td:nth-child(6) {
    width: 120px;
    min-width: 120px;
}

.batch-mgmt-table th:nth-child(7), /* 生产日期 */
.batch-mgmt-table td:nth-child(7) {
    width: 100px;
    min-width: 100px;
}

.batch-mgmt-table th:nth-child(8), /* 过期日期 */
.batch-mgmt-table td:nth-child(8) {
    width: 100px;
    min-width: 100px;
}

.batch-mgmt-table th:nth-child(9), /* 剩余天数 */
.batch-mgmt-table td:nth-child(9) {
    width: 90px;
    min-width: 90px;
}

.batch-mgmt-table th:nth-child(10), /* 库存数量 */
.batch-mgmt-table td:nth-child(10) {
    width: 90px;
    min-width: 90px;
}

.batch-mgmt-table th:nth-child(11), /* 重量(g) */
.batch-mgmt-table td:nth-child(11) {
    width: 80px;
    min-width: 80px;
}

.batch-mgmt-table th:nth-child(12), /* 长度(cm) */
.batch-mgmt-table td:nth-child(12) {
    width: 80px;
    min-width: 80px;
}

.batch-mgmt-table th:nth-child(13), /* 宽度(cm) */
.batch-mgmt-table td:nth-child(13) {
    width: 80px;
    min-width: 80px;
}

.batch-mgmt-table th:nth-child(14), /* 高度(cm) */
.batch-mgmt-table td:nth-child(14) {
    width: 80px;
    min-width: 80px;
}

.batch-mgmt-table th:nth-child(15), /* 体积(cm³) */
.batch-mgmt-table td:nth-child(15) {
    width: 100px;
    min-width: 100px;
}

.batch-mgmt-table th:nth-child(16), /* 外箱条码 */
.batch-mgmt-table td:nth-child(16) {
    width: 120px;
    min-width: 120px;
}

.batch-mgmt-table th:nth-child(17), /* 整箱数量 */
.batch-mgmt-table td:nth-child(17) {
    width: 90px;
    min-width: 90px;
}

.batch-mgmt-table th:nth-child(18), /* 整箱重量 */
.batch-mgmt-table td:nth-child(18) {
    width: 90px;
    min-width: 90px;
}

.batch-mgmt-table th:nth-child(19), /* 整箱体积 */
.batch-mgmt-table td:nth-child(19) {
    width: 100px;
    min-width: 100px;
}

.batch-mgmt-table th:nth-child(20), /* 状态 */
.batch-mgmt-table td:nth-child(20) {
    width: 80px;
    min-width: 80px;
}

.batch-mgmt-table th:nth-child(21), /* 创建时间 */
.batch-mgmt-table td:nth-child(21) {
    width: 150px;
    min-width: 150px;
}

.batch-mgmt-table th:nth-child(22), /* 操作 */
.batch-mgmt-table td:nth-child(22) {
    width: 120px;
    min-width: 120px;
}

/* 特定字段居中对齐 */
.batch-mgmt-table th:nth-child(7), /* 生产日期 */
.batch-mgmt-table th:nth-child(8), /* 过期日期 */
.batch-mgmt-table th:nth-child(9), /* 剩余天数 */
.batch-mgmt-table th:nth-child(10), /* 库存数量 */
.batch-mgmt-table th:nth-child(16), /* 外箱条码 */
.batch-mgmt-table th:nth-child(17), /* 整箱数量 */
.batch-mgmt-table th:nth-child(18), /* 整箱重量 */
.batch-mgmt-table th:nth-child(19), /* 整箱体积 */
.batch-mgmt-table th:nth-child(20), /* 批次状态 */
.batch-mgmt-table td:nth-child(7),
.batch-mgmt-table td:nth-child(8),
.batch-mgmt-table td:nth-child(9),
.batch-mgmt-table td:nth-child(10),
.batch-mgmt-table td:nth-child(16),
.batch-mgmt-table td:nth-child(17),
.batch-mgmt-table td:nth-child(18),
.batch-mgmt-table td:nth-child(19),
.batch-mgmt-table td:nth-child(20) {
    text-align: center;
}

.batch-mgmt-table th {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    /* 移除 text-transform: uppercase; 不强制转换为大写 */
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-mgmt-table td {
    color: #4b5563;
    font-size: 14px;
}

.batch-mgmt-table tbody tr:hover {
    background-color: #f8fafc;
}

/* 状态标签 */
.batch-mgmt-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.batch-mgmt-status-active {
    background-color: #e8f5e8;
    color: #52c41a;
}

.batch-mgmt-status-warning {
    background-color: #fff7e6;
    color: #fa8c16;
}

.batch-mgmt-status-danger {
    background-color: #fff2f0;
    color: #ff4d4f;
}

.batch-mgmt-status-inactive {
    background-color: #f5f5f5;
    color: #666666;
    border: 1px solid #d9d9d9;
}

/* 操作按钮 */
.batch-mgmt-action-btn {
    padding: 4px 8px;
    margin-right: 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.batch-mgmt-action-detail {
    background-color: #e0f2fe;
    color: #0288d1;
}

.batch-mgmt-action-detail:hover {
    background-color: #b3e5fc;
}

.batch-mgmt-action-edit {
    background-color: #e0e7ff;
    color: #3730a3;
}

.batch-mgmt-action-edit:hover {
    background-color: #c7d2fe;
}

.batch-mgmt-action-delete {
    background-color: #fee2e2;
    color: #991b1b;
}

.batch-mgmt-action-delete:hover {
    background-color: #fecaca;
}

/* 分页区域 */
.batch-mgmt-pagination {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

.batch-mgmt-pagination-info {
    font-size: 14px;
    color: #4b5563;
}

.batch-mgmt-pagination-controls {
    display: flex;
    gap: 8px;
}

.batch-mgmt-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;
}

.batch-mgmt-pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.batch-mgmt-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.batch-mgmt-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4b5563;
}

.batch-mgmt-page-size-select {
    width: 60px;
    padding: 4px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* 空数据状态 */
.batch-mgmt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #6b7280;
}

.batch-mgmt-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.batch-mgmt-empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.batch-mgmt-empty-desc {
    font-size: 14px;
    color: #9ca3af;
}

/* TDesign风格日期范围选择器样式 */
.batch-mgmt-tdesign-date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.batch-mgmt-tdesign-date-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 1;
    min-width: 140px;
}

.batch-mgmt-tdesign-date-input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 40px;
}

.batch-mgmt-tdesign-date-input:hover {
    border-color: #c0c4cc;
}

.batch-mgmt-tdesign-date-input:focus {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
    outline: none;
}

.batch-mgmt-tdesign-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c4cc;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* 滚动条样式 - 针对WebKit浏览器 */
.batch-mgmt-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.batch-mgmt-table-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.batch-mgmt-table-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.batch-mgmt-table-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.batch-mgmt-table-container::-webkit-scrollbar-track:hover {
    background: #e8e8e8;
}

/* 横向滚动条特殊样式 */
.batch-mgmt-table-container::-webkit-scrollbar:horizontal {
    height: 12px;
}

.batch-mgmt-table-container::-webkit-scrollbar-thumb:horizontal {
    min-width: 40px;
}

/* 支持Firefox的滚动条样式 */
.batch-mgmt-table-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) #f5f5f5;
}

.batch-mgmt-table-container:hover {
    scrollbar-color: rgba(0, 0, 0, 0.4) #e8e8e8;
}

/* 日期选择器面板样式 */
.batch-mgmt-tdesign-date-panel {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 1000;
    width: 280px;
    overflow: hidden;
}

/* 确保日期选择器在弹窗上方显示 */
.batch-add-overlay .batch-mgmt-tdesign-date-panel {
    z-index: 1001;
}

.batch-mgmt-tdesign-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e6eb;
}

.batch-mgmt-tdesign-date-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.batch-mgmt-tdesign-date-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s;
}

.batch-mgmt-tdesign-date-nav-btn:hover {
    background: #e5e6eb;
    color: #0052d9;
}

.batch-mgmt-tdesign-date-title {
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
    user-select: none;
}

.batch-mgmt-tdesign-date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 8px 0;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.batch-mgmt-tdesign-date-weekday {
    text-align: center;
    font-size: 12px;
    color: #666666;
    font-weight: 500;
    padding: 8px 0;
}

.batch-mgmt-tdesign-date-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 8px;
}

.batch-mgmt-tdesign-date-day {
    text-align: center;
    font-size: 14px;
    color: #1d2129;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    user-select: none;
}

.batch-mgmt-tdesign-date-day:hover {
    background: #f0f5ff;
    color: #0052d9;
}

.batch-mgmt-tdesign-date-day.empty {
    cursor: default;
    color: transparent;
}

.batch-mgmt-tdesign-date-day.today {
    font-weight: 600;
    color: #0052d9;
    background: #f0f5ff;
}

.batch-mgmt-tdesign-date-day.selected {
    background: #0052d9;
    color: #ffffff;
}

/* 日期分隔符样式 */
.batch-mgmt-tdesign-date-separator {
    color: #666666;
    font-size: 14px;
    margin: 0 8px;
    user-select: none;
}

/* 新增批次弹窗样式 */
.batch-add-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.batch-add-overlay.show {
    opacity: 1;
}

.batch-add-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 800px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.batch-add-overlay.show .batch-add-modal {
    transform: scale(1);
}

.batch-add-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e6eb;
    background: #ffffff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.batch-add-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
}

.batch-add-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666666;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.batch-add-modal-close:hover {
    background-color: #f2f3f5;
    color: #1d2129;
}

.batch-add-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.batch-add-form-group {
    margin-bottom: 20px;
}

/* 分组标题样式 */
.batch-add-form-group-title {
    display: block;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
}

/* 分组内容样式 */
.batch-add-form-group-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 24px;
}

.batch-add-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.batch-add-form-row .batch-add-form-group {
    flex: 1;
}

.batch-add-form-row:last-child {
    margin-bottom: 0;
}

.batch-add-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
}

.required {
    color: #e34d59;
}

.batch-add-form-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.batch-add-form-input:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.batch-add-form-input:hover {
    border-color: #a3a6ad;
}

.batch-add-form-input[readonly] {
    background-color: #f2f3f5;
    cursor: pointer;
}

/* 生产日期和过期日期输入框背景为白色 */
#batch-add-prod-date,
#batch-add-exp-date {
    background-color: #ffffff !important;
}

/* 保质期基数输入框和单位选择框组合样式 */
.batch-add-shelf-life-combo {
    display: flex;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.batch-add-shelf-life-combo:hover {
    border-color: #a3a6ad;
}

.batch-add-shelf-life-combo:focus-within {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.batch-add-shelf-life-input {
    flex: 2;
    border: none;
    border-radius: 0;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
}

.batch-add-shelf-life-input:focus {
    outline: none;
    box-shadow: none;
}

.batch-add-shelf-life-unit {
    flex: 1;
    border: none;
    border-radius: 0;
    height: 36px;
    padding: 0 8px;
    font-size: 14px;
    background-color: #f8f9fa;
    border-left: 1px solid #e5e6eb;
}

.batch-add-shelf-life-unit:focus {
    outline: none;
    box-shadow: none;
}

.batch-add-goods-selection {
    display: flex;
    gap: 8px;
}

.batch-add-goods-input {
    flex: 1;
}

.batch-add-goods-select-btn {
    height: 36px;
    padding: 0 16px;
    background: #f2f3f5;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 14px;
    color: #1d2129;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.batch-add-goods-select-btn:hover {
    background: #e7e8eb;
    border-color: #a3a6ad;
}

.batch-add-goods-display {
    padding: 8px 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 14px;
    color: #1d2129;
    min-height: 36px;
    line-height: 36px;
}

/* 新增批次弹窗日期选择器样式 */
.batch-add-date-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.batch-add-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c4cc;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    z-index: 1;
}

.batch-add-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e6eb;
    background: #ffffff;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.batch-add-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.batch-add-btn-cancel {
    background: #f2f3f5;
    color: #1d2129;
}

.batch-add-btn-cancel:hover {
    background: #e7e8eb;
}

.batch-add-btn-primary {
    background: #0052d9;
    color: #ffffff;
}

.batch-add-btn-primary:hover {
    background: #0045b5;
}



/* 批次详情弹窗样式 */
.batch-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.batch-detail-overlay.show {
    opacity: 1;
}

.batch-detail-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 900px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.batch-detail-overlay.show .batch-detail-modal {
    transform: scale(1);
}

.batch-detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e6eb;
    background: #ffffff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.batch-detail-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
}

.batch-detail-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666666;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.batch-detail-modal-close:hover {
    background-color: #f2f3f5;
    color: #1d2129;
}

.batch-detail-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* 批次头部信息卡片 */
.batch-detail-header-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e5e6eb;
}

.batch-detail-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 批次编码 */
.batch-detail-code {
    font-size: 20px;
    font-weight: 600;
    color: #1d2129;
}

/* 批次状态 */
.batch-detail-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 状态标签 */
.batch-detail-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.batch-detail-status-badge.active {
    background-color: #e8f5e8;
    color: #52c41a;
}

/* 剩余天数 */
.batch-detail-remaining-days {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.batch-detail-remaining-days.active {
    background-color: #e8f5e8;
    color: #52c41a;
}

.batch-detail-remaining-days.warning {
    background-color: #fff7e6;
    color: #fa8c16;
}

.batch-detail-remaining-days.danger {
    background-color: #fff2f0;
    color: #ff4d4f;
}

/* 信息卡片 */
.batch-detail-info-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e5e6eb;
}

.batch-detail-info-card:last-child {
    margin-bottom: 0;
}

/* 分组标题 */
.batch-detail-group-title {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    padding-bottom: 8px;
    border-bottom: 2px solid #0052d9;
}

/* 信息网格 */
.batch-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* 信息项 */
.batch-detail-info-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px dashed #f0f2f5;
}

.batch-detail-info-item:last-child {
    border-bottom: none;
}

.batch-detail-info-item-label {
    font-size: 14px;
    color: #666666;
    margin-right: 16px;
    font-weight: 500;
}

.batch-detail-info-item-value {
    font-size: 14px;
    color: #1d2129;
    font-weight: 500;
    flex: 1;
}
.batch-detail-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e6eb;
    background: #ffffff;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.batch-detail-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.batch-detail-btn-close {
    background: #0052d9;
    color: #ffffff;
}

.batch-detail-btn-close:hover {
    background: #0045b5;
}
/* 响应式设计调整 */
@media (max-width: 768px) {
    .batch-mgmt-container {
        padding: 16px;
    }
    
    .batch-mgmt-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-mgmt-search-item {
        width: 100%;
        min-width: auto;
    }
    
    .batch-mgmt-table-container {
        overflow-x: auto;
    }
    
    .batch-mgmt-table {
        min-width: 800px;
    }
    
    .batch-add-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .batch-add-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .batch-add-form-row .batch-add-form-group {
        margin-bottom: 20px;
    }
    
    /* 详情弹窗响应式调整 */
    .batch-detail-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .batch-detail-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .batch-detail-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .batch-detail-info-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .batch-detail-info-item-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 4px;
    }
}