/* 加载动画样式 */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    display: none;
}

.loading-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e2231a;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.loading-subtext {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
}

/* 修改提示弹窗样式 */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.alert-message {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    min-width: 280px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.alert-message.success {
    border-left: 3px solid #4CAF50;
}

.alert-message.error {
    border-left: 3px solid #f44336;
}

.alert-message.warning {
    border-left: 3px solid #ff9800;
}

.alert-message.info {
    border-left: 3px solid #2196F3;
}

.alert-message h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.alert-message p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-message button {
    padding: 8px 20px;
    background: #e2231a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 5px;
}

.alert-message .btn-cancel {
    background: #666;
}

.alert-message .btn-confirm {
    background: #e2231a;
}

/* 修改编辑弹窗样式 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    display: none;
}

.edit-modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.edit-modal-title {
    font-weight: bold;
    font-size: 16px;
}

.edit-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.edit-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.edit-form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.edit-form-input:focus {
    border-color: #e2231a;
    outline: none;
    box-shadow: 0 0 5px rgba(226, 35, 26, 0.3);
}

.edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.edit-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.edit-modal-cancel {
    background: #f8f8f8;
    color: #666;
}

.edit-modal-cancel:hover {
    background: #e8e8e8;
}

.edit-modal-save {
    background: #e2231a;
    color: white;
}

.edit-modal-save:hover {
    background: #c41c15;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
    display: none;
}

.progress-fill {
    height: 100%;
    background: #e2231a;
    width: 0%;
    transition: width 0.3s ease;
}

/* 原有样式保持不变 */
.order-table .order-image-cell img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
}

.table-title {
    border: 2px dashed #e2231a;
    padding: 10px 15px;
    margin: 0;
    display: block;
    width: 100%;
    border-radius: 4px;
    background-color: #fff8f8;
    font-size: 13px;
    font-weight: bold;
    color: #e2231a;
    text-align: center;
    box-sizing: border-box;
}

.table-container {
    position: relative;
    max-height: 75vh;
    overflow-y: auto;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

.table-count {
    display: none;
}

.order-table tr {
    height: 45px;
}

.order-table td {
    padding: 2px 6px;
    vertical-align: middle;
}

.order-image-cell {
    width: 45px;
    min-width: 45px;
    text-align: center;
    padding: 1px !important;
}

.stats-container {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2231a;
    border-radius: 4px;
    padding: 6px 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    font-size: 11px;
}

.stats-item {
    display: flex;
    align-items: center;
    margin: 2px 0;
    font-weight: bold;
}

.stats-success {
    color: #4CAF50;
}

.stats-failure {
    color: #e2231a;
}

.stats-count {
    margin-left: 6px;
    background: #f8f8f8;
    padding: 1px 4px;
    border-radius: 2px;
    min-width: 16px;
    text-align: center;
    font-size: 10px;
}

.table-header {
    position: relative;
    border-bottom: none;
    padding-bottom: 0.5em;
    margin-bottom: 0.5em;
    min-height: 30px;
}

@media (max-width: 768px) {
    .order-table .order-image-cell img {
        width: 30px;
        height: 30px;
    }
    
    .order-table tr {
        height: 40px;
    }
    
    .stats-container {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 8px;
        font-size: 10px;
    }
    
    .table-title {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .edit-modal-content {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .alert-message {
        padding: 20px;
        margin: 20px;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: none;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    font-size: 13px;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px;
}

.header {
    background-color: #e2231a;
    color: white;
    text-align: center;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: bold;
    position: relative;
}

.header .my-upload-btn {
    position: absolute;
    right: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    padding: 5px 12px;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.header .my-upload-btn:hover {
    background: rgba(255,255,255,0.3);
}

.tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 13px;
}

.tab.active {
    background-color: #fff;
    color: #e2231a;
    border-bottom: 2px solid #e2231a;
}

.content {
    padding: 10px;
    display: none;
}

.content.active {
    display: block;
}

.upload-area {
    border: 2px dashed #e2231a;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-area:hover {
    background-color: #fff5f5;
}

.upload-area.disabled {
    border-color: #ccc;
    cursor: not-allowed;
}

.upload-area.disabled:hover {
    background-color: #f8f8f8;
}

#fileInput {
    display: none;
}

.important-tip {
    background-color: #fff8f8;
    border: 1px solid #ffe0e0;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 13px;
    color: #e2231a;
}

.important-tip h3 {
    color: #e2231a;
    margin-bottom: 8px;
    font-size: 14px;
}

.important-tip ul {
    padding-left: 20px;
}

.important-tip li {
    margin-bottom: 8px;
}

.upload-instructions-card {
    border: 1px dashed #e2231a;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    background-color: #fff8f8;
}

.upload-instructions-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #e2231a;
    font-weight: bold;
}

.upload-instructions-icon {
    width: 20px;
    height: 20px;
    background-color: #e2231a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 12px;
}

.upload-instructions-content {
    font-size: 12px;
    line-height: 1.4;
}

.upload-instructions-content ol {
    padding-left: 18px;
    margin-top: 6px;
}

.upload-instructions-content li {
    margin-bottom: 6px;
}

.red-keyword {
    color: #e2231a;
    font-weight: bold;
}

.image-preview {
    margin-top: 12px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.preview-item {
    position: relative;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
}

.preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 11px;
}

.scroll-hint {
    text-align: center;
    color: #666;
    margin: 15px 0;
    font-size: 11px;
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #666;
    margin-left: 4px;
}

.example-image {
    text-align: center;
    margin: 15px 0;
}

.example-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 11px;
    table-layout: fixed;
}

.order-table th {
    background: #f8f8f8;
    padding: 8px 4px;
    text-align: left;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-table td {
    padding: 4px 4px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.order-table tr:last-child td {
    border-bottom: none;
}

.order-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.order-table tr:hover {
    background-color: #f0f7ff;
}

.order-number-cell {
    width: 100px;
    min-width: 100px;
}

.order-date-cell {
    width: 100px;
    min-width: 100px;
}

.order-status-cell {
    width: 50px;
    min-width: 50px;
    text-align: center;
}

.status-success {
    color: #4CAF50;
    font-weight: bold;
    font-size: 10px;
}

.status-failure {
    color: #e2231a;
    font-weight: bold;
    font-size: 10px;
}

.empty-results {
    text-align: center;
    padding: 20px 15px;
    color: #999;
    font-size: 12px;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.footer-btn {
    padding: 6px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.cancel-btn {
    background: #f8f8f8;
    color: #666;
}

.confirm-btn {
    background: #e2231a;
    color: white;
}

.confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.upload-status {
    padding: 8px;
    border-radius: 3px;
    margin: 8px 0;
    text-align: center;
    font-size: 12px;
    display: none;
}

.upload-status.ready {
    background: #e8f5e8;
    color: #2e7d32;
}

.compact-info div {
    margin: 1px 0;
    line-height: 1.2;
    font-size: 10px;
}

#after {
    padding-bottom: 2em;
    position: relative;
}

.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.image-preview-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-preview-modal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
}

.modified-badge {
    background: #e2231a;
    color: white;
    border-radius: 2px;
    padding: 1px 4px;
    font-size: 9px;
    margin-left: 4px;
}


