/* 验收异常记录页面样式 */
.acceptance-exception-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;
}

/* 搜索区域样式 */
.acceptance-exception-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);
}

.acceptance-exception-search-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.acceptance-exception-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.acceptance-exception-search-label {
    font-size: 13px;
    font-weight: 500;
    color: #1d2129;
    min-width: 80px;
}

.acceptance-exception-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;
}

.acceptance-exception-search-input:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

.acceptance-exception-search-input:hover {
    border-color: #c9cdd4;
}

/* 输入框包装器样式 */
.acceptance-exception-input-wrapper {
    position: relative;
    width: 100%;
}

.acceptance-exception-clickable-input {
    cursor: pointer;
    background-color: #fff;
}

.acceptance-exception-clickable-input:hover {
    border-color: #0052d9;
}

.acceptance-exception-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background-color: #d9d9d9;
    transition: all 0.2s;
}

.acceptance-exception-clear-btn:hover {
    background-color: #999;
}

.acceptance-exception-clear-btn svg {
    width: 12px;
    height: 12px;
    fill: #fff;
}

/* 组合搜索框样式 */
.acceptance-exception-search-field .acceptance-exception-search-combined {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e6eb;
    width: 100%;
    min-width: 200px;
}

.acceptance-exception-search-field .acceptance-exception-search-type {
    width: 100px;
    height: 36px;
    border: none;
    border-right: 1px solid #e5e6eb;
    border-radius: 0;
    padding: 0 12px;
    cursor: pointer;
    margin: 0;
    background-color: #ffffff;
}

.acceptance-exception-search-field .acceptance-exception-search-value {
    flex: 1;
    border: none;
    border-radius: 0;
    height: 36px;
    background: #ffffff;
    padding: 0 12px;
    margin: 0;
}

.acceptance-exception-search-field .acceptance-exception-search-type:focus,
.acceptance-exception-search-field .acceptance-exception-search-value:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

/* 下拉多选样式 */
.acceptance-exception-tag-dropdown {
    position: relative;
    min-width: 180px;
}

.acceptance-exception-tag-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    min-height: 32px;
}

.acceptance-exception-tag-dropdown-header:hover {
    border-color: #0052d9;
}

.acceptance-exception-tag-dropdown-placeholder {
    font-size: 13px;
    color: #4e5969;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acceptance-exception-tag-dropdown-arrow {
    width: 16px;
    height: 16px;
    fill: #86909c;
    transition: transform 0.2s;
}

.acceptance-exception-tag-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    margin-top: 4px;
}

.acceptance-exception-tag-dropdown-options.show {
    display: block;
}

.acceptance-exception-tag-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #4e5969;
    transition: background-color 0.2s;
}

.acceptance-exception-tag-dropdown-option:hover {
    background-color: #f5f5f5;
}

.acceptance-exception-tag-dropdown-option.selected {
    background-color: #e6f7ff;
    color: #0052d9;
}

.acceptance-exception-tag-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acceptance-exception-tag-dropdown-option.selected .acceptance-exception-tag-checkbox {
    background-color: #0052d9;
    border-color: #0052d9;
}

.acceptance-exception-tag-dropdown-option.selected .acceptance-exception-tag-checkbox::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin-top: -2px;
}

/* 列表区域样式 */
.acceptance-exception-list {
    height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.acceptance-exception-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.acceptance-exception-title {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

.acceptance-exception-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.acceptance-exception-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;
}

.acceptance-exception-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.acceptance-exception-btn:hover {
    background-color: #e6e6e6;
}

/* 表格样式 */
.acceptance-exception-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}

.acceptance-exception-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 1500px;
}

.acceptance-exception-table th,
.acceptance-exception-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;
}

.acceptance-exception-table th {
    background-color: #f5f7fa;
    font-weight: 500;
    color: #303133;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #ebeef5;
}

.acceptance-exception-table tbody tr {
    cursor: pointer;
}

.acceptance-exception-table tbody tr:hover {
    background-color: #f5f7fa;
}


/* 展开按钮列样式 */
.acceptance-exception-table th:nth-child(1),
.acceptance-exception-table td:nth-child(1) {
    width: 40px;
    text-align: center;
}

/* 退货单号、任务编码列宽度 */
.acceptance-exception-table th:nth-child(2),
.acceptance-exception-table td:nth-child(2),
.acceptance-exception-table th:nth-child(3),
.acceptance-exception-table td:nth-child(3) {
    min-width: 120px;
}

/* 来源单号、平台单号列宽度 */
.acceptance-exception-table th:nth-child(4),
.acceptance-exception-table td:nth-child(4),
.acceptance-exception-table th:nth-child(5),
.acceptance-exception-table td:nth-child(5) {
    min-width: 120px;
}

/* 货主名称、店铺名称列宽度 */
.acceptance-exception-table th:nth-child(6),
.acceptance-exception-table td:nth-child(6),
.acceptance-exception-table th:nth-child(7),
.acceptance-exception-table td:nth-child(7) {
    min-width: 150px;
}

/* 物流公司、物流单号列宽度 */
.acceptance-exception-table th:nth-child(8),
.acceptance-exception-table td:nth-child(8),
.acceptance-exception-table th:nth-child(9),
.acceptance-exception-table td:nth-child(9) {
    min-width: 120px;
}

/* 验收人员居中对齐 */
.acceptance-exception-table th:nth-child(10),
.acceptance-exception-table td:nth-child(10) {
    text-align: center;
}

/* 验收时间列 */
.acceptance-exception-table th:nth-child(12),
.acceptance-exception-table td:nth-child(12) {
    min-width: 150px;
    text-align: center;
}


/* 展开按钮样式 */
.acceptance-exception-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;
}

.acceptance-exception-expand-btn:hover:not(.acceptance-exception-disabled) {
    background-color: #f0f0f0;
}

.acceptance-exception-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.acceptance-exception-expand-btn.acceptance-exception-expanded {
    background-color: #e6f7ff;
}

.acceptance-exception-expand-btn svg {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: transform 0.3s ease;
}

.acceptance-exception-expand-btn:hover svg {
    fill: #1890ff;
}

.acceptance-exception-expand-btn.acceptance-exception-expanded svg {
    fill: #1890ff;
    transform: rotate(90deg);
}

/* 主行样式 */
.acceptance-exception-table .acceptance-exception-main-row {
    cursor: pointer;
}

/* 展开行样式 */
.acceptance-exception-table .acceptance-exception-detail-row {
    background-color: #fafafa;
    border-left: 3px solid #1890ff;
    display: table-row;
}

.acceptance-exception-table .acceptance-exception-detail-row.acceptance-exception-expanding {
    animation: acceptanceExceptionExpandAnimation 0.3s ease-out forwards;
    overflow: hidden;
    max-height: 500px;
    display: table-row !important;
}

.acceptance-exception-table .acceptance-exception-detail-row.acceptance-exception-collapsing {
    animation: acceptanceExceptionCollapseAnimation 0.3s ease-out forwards;
    overflow: hidden;
    max-height: 500px;
}

@keyframes acceptanceExceptionExpandAnimation {
    0% {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes acceptanceExceptionCollapseAnimation {
    0% {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
}

.acceptance-exception-table .acceptance-exception-detail-cell {
    padding: 0;
    vertical-align: top;
}

.acceptance-exception-goods-container {
    padding: 16px;
    background: white;
    margin: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.acceptance-exception-goods-header {
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e6eb;
}

.acceptance-exception-goods-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}

.acceptance-exception-goods-table th {
    background-color: #f0f2f5;
    color: #1d2129;
    font-weight: 500;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
}

.acceptance-exception-goods-table th:nth-child(5),
.acceptance-exception-goods-table td:nth-child(5),
.acceptance-exception-goods-table th:nth-child(6),
.acceptance-exception-goods-table td:nth-child(6),
.acceptance-exception-goods-table th:nth-child(8),
.acceptance-exception-goods-table td:nth-child(8),
.acceptance-exception-goods-table th:nth-child(9),
.acceptance-exception-goods-table td:nth-child(9),
.acceptance-exception-goods-table th:nth-child(10),
.acceptance-exception-goods-table td:nth-child(10) {
    text-align: center;
}

.acceptance-exception-goods-table td {
    color: #4d5156;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.acceptance-exception-goods-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* 分页样式 */
.acceptance-exception-pagination {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

.acceptance-exception-pagination-info {
    font-size: 14px;
    color: #4b5563;
}

.acceptance-exception-pagination-controls {
    display: flex;
    gap: 8px;
}

.acceptance-exception-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;
}

.acceptance-exception-pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.acceptance-exception-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.acceptance-exception-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4b5563;
}

.acceptance-exception-page-size-select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 13px;
}

/* 无数据提示样式 */
.acceptance-exception-no-data {
    text-align: center;
    color: #86909c;
    padding: 20px;
}

/* 异常类型标签样式 */
.acceptance-exception-type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    margin-right: 4px;
    margin-bottom: 2px;
}

.acceptance-exception-type-tag:last-child {
    margin-right: 0;
}

.acceptance-exception-type-批次不符 {
    background-color: #e6f7ff;
    color: #1890ff;
}

.acceptance-exception-type-数量差异 {
    background-color: #fff7e6;
    color: #fa8c16;
}

.acceptance-exception-type-货品破损 {
    background-color: #fff1f0;
    color: #f5222d;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .acceptance-exception-card {
        padding: 16px;
    }
    
    .acceptance-exception-table {
        font-size: 12px;
    }
    
    .acceptance-exception-table th,
    .acceptance-exception-table td {
        padding: 8px;
    }
}
