.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标签样式 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    position: relative;
}

.tab-btn.active {
    color: #0066cc;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #0066cc;
}

/* 内容区域样式 */
.tab-content {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

/* 表单信息样式 */
.form-info {
    margin-bottom: 30px;
}

.info-box {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.info-header {
    padding: 15px;
    background-color: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #333;
}

.info-header:hover {
    background-color: #f0f0f0;
}

.info-content {
    padding: 15px;
    display: none;
    background-color: white;
    font-size: 13px;
    color: #666;
}

.info-content.show {
    display: block;
}

.info-content p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #666;
    font-size: 13px;
    white-space: pre-line;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.info-content p::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #999;
}

.info-header::after {
    content: '▼';
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

.info-header.active::after {
    transform: rotate(180deg);
}

/* 表单样式 */
.form-section {
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,102,204,0.1);
}

/* 表格���式 */
.items-section {
    margin: 30px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.currency-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.currency-selector label {
    font-weight: 500;
    color: #333;
}

.currency-selector select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.items-table th,
.items-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}

.items-table th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.items-table input,
.items-table select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.items-table input[type="file"] {
    width: auto;
}

.product-image-preview {
    max-width: 50px;
    max-height: 50px;
    display: none;
}

.grand-total-row {
    background-color: #f8f9fa;
    font-weight: bold;
}

.grand-total-row td {
    text-align: right;
}

.grand-total-row input {
    font-weight: bold;
    background-color: #f8f9fa;
    text-align: right;
}

.remove-row {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.remove-row:hover {
    color: #c82333;
}

.add-row-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.add-row-btn:hover {
    background-color: #218838;
}

/* 操作按钮样式 */
.form-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.form-actions button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.form-actions button:hover {
    background-color: #0052a3;
}

.save-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.save-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 历史记录样式 */
.history-list {
    display: grid;
    gap: 15px;
}

.history-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.history-info {
    flex: 1;
}

.history-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.history-details {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 20px;
}

.history-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-detail-icon {
    opacity: 0.5;
}

.history-actions {
    display: flex;
    gap: 10px;
}

.history-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.view-btn {
    background-color: #0066cc;
    color: white;
}

.view-btn:hover {
    background-color: #0052a3;
}

.download-btn {
    background-color: #28a745;
    color: white;
}

.download-btn:hover {
    background-color: #218838;
}

.empty-history {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-history-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-history-text {
    font-size: 16px;
    margin-bottom: 10px;
}

.empty-history-subtext {
    font-size: 14px;
    opacity: 0.7;
}

/* 响应式设 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .items-section {
        margin: 0 -20px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
} 

/* 表格列宽样式 */
.items-table th,
.items-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}

/* 设置各列宽度 */
.items-table th:nth-child(1),  /* FBA编号 */
.items-table td:nth-child(1) {
    width: 9%;
}

.items-table th:nth-child(2),  /* Reference ID */
.items-table td:nth-child(2) {
    width: 9%;
    white-space: normal;
    word-break: break-word;
    min-width: 100px;
}

.items-table th:nth-child(3),  /* 运输方式 */
.items-table td:nth-child(3) {
    width: 8%;
}

.items-table th:nth-child(4),  /* 物流单号 */
.items-table td:nth-child(4) {
    width: 8%;
}

.items-table th:nth-child(5),  /* 海关编码 */
.items-table td:nth-child(5) {
    width: 8%;
}

.items-table th:nth-child(6),  /* 产品称 */
.items-table td:nth-child(6) {
    width: 15%;
    white-space: normal;
    word-break: break-word;
}

.items-table th:nth-child(7),  /* 产品图片 */
.items-table td:nth-child(7) {
    width: 12%;
    text-align: center;
}

.items-table th:nth-child(8),  /* 数量 */
.items-table td:nth-child(8) {
    width: 9%;
    text-align: right;
}

.items-table th:nth-child(9),  /* 单价 */
.items-table td:nth-child(9) {
    width: 9%;
    text-align: right;
}

.items-table th:nth-child(10),  /* 总价 */
.items-table td:nth-child(10) {
    width: 9%;
    text-align: right;
}

.items-table th:nth-child(11),  /* 删除操作 */
.items-table td:nth-child(11) {
    width: 4%;
    text-align: center;
}

/* 确保表格不会因为内容过长而变形 */
.items-table {
    table-layout: fixed;
    width: 100%;
}

/* 处理内容溢出 */
.items-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 产品名称列允许换行 */
.items-table td:nth-child(6) {
    white-space: normal;
    word-break: break-word;
}

/* 产品图片列居中显示 */
.items-table td:nth-child(7) {
    text-align: center;
}

/* 数字列右对齐 */
.items-table td:nth-child(8),
.items-table td:nth-child(9),
.items-table td:nth-child(10) {
    text-align: right;
}

/* 文件上传按钮容器 */
.image-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* 产品图片上传按钮样式 */
.product-image-input {
    width: 80px !important;
    font-size: 12px !important;
} 

/* 表头样式优化 */
.items-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    font-size: 12px;  /* 缩小表头字号 */
    padding: 8px;     /* 减小表头内边距 */
    white-space: nowrap;  /* 确保一行显示 */
    text-align: center;   /* 表头文字居中 */
    vertical-align: middle;
}

/* 表格列宽样式 */
.items-table th,
.items-table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

/* 设置各列宽度 */
.items-table th:nth-child(1),  /* FBA编号 */
.items-table td:nth-child(1) {
    width: 9%;
}

.items-table th:nth-child(2),  /* Reference ID */
.items-table td:nth-child(2) {
    width: 9%;
    white-space: normal;
    word-break: break-word;
    min-width: 100px;
}

.items-table th:nth-child(3),  /* 运输方式 */
.items-table td:nth-child(3) {
    width: 8%;
}

.items-table th:nth-child(4),  /* 物流单号 */
.items-table td:nth-child(4) {
    width: 8%;
}

.items-table th:nth-child(5),  /* 海关编码 */
.items-table td:nth-child(5) {
    width: 8%;
}

.items-table th:nth-child(6),  /* 产品名称 */
.items-table td:nth-child(6) {
    width: 15%;
    white-space: normal;
    word-break: break-word;
}

.items-table th:nth-child(7),  /* 产品图片 */
.items-table td:nth-child(7) {
    width: 12%;
    text-align: center;
}

.items-table th:nth-child(8),  /* 数量 */
.items-table td:nth-child(8) {
    width: 9%;
    text-align: right;
}

.items-table th:nth-child(9),  /* 单价 */
.items-table td:nth-child(9) {
    width: 9%;
    text-align: right;
}

.items-table th:nth-child(10),  /* 总价 */
.items-table td:nth-child(10) {
    width: 9%;
    text-align: right;
}

.items-table th:nth-child(11),  /* 删除操作 */
.items-table td:nth-child(11) {
    width: 4%;
    text-align: center;
}

/* 提示信息样式 */
.alert {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: #e8f4fd;
    border: 1px solid #b3d7f5;
}

.alert-info {
    background-color: #e8f4fd;
    border-color: #b3d7f5;
}

.alert-icon {
    font-size: 20px;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-title {
    color: #0066cc;
    font-weight: 500;
    margin-bottom: 5px;
}

.alert-description {
    color: #666;
    font-size: 14px;
}

/* 保存按钮样式 */
.save-btn {
    background-color: #28a745;  /* 绿色按钮 */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.save-btn:hover {
    background-color: #218838;
}

.save-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 调整按钮间距 */
.form-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
} 

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.page-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.page-btn.active {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.page-ellipsis {
    padding: 8px 12px;
    color: #666;
}

/* 编辑和删除按钮样式 */
.edit-btn {
    background-color: #28a745;
    color: white;
}

.edit-btn:hover {
    background-color: #218838;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 修改输入错误提示样式 */
.input-error {
    display: none;
    position: fixed;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 100000;
    animation: fadeInDown 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    left: 50%;
    top: 20%;
    transform: translateX(-50%);
}

.input-error::before {
    display: none;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 确保输入框的父元素是相对定位 */
.form-group {
    position: relative;
}

/* 表格单元格也需要相对定位 */
.items-table td {
    position: relative;
} 