.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.order-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 1500px;
    max-height: 80vh;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: scale(0.95);
    opacity: 0;
    display: flex;
    flex-direction: column;
}

.order-modal.active {
    transform: scale(1);
    opacity: 1;
}

.order-modal.maximized {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
}

.order-modal.ps-maximized {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
}

.order-modal.ps-maximized .modal-body {
    overflow-y: auto;
}

.order-modal.ps-maximized .data-table {
    font-size: 14px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    flex-shrink: 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 8px;
}

.modal-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: background 0.2s;
}

.modal-btn:hover {
    background: #eee;
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.order-modal.maximized .modal-body {
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* 收件地址：只读无框，长地址自适应 */
.address-readonly {
    width: 100%;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 8px 0 !important;
    font-size: 14px;
    color: #374151;
    cursor: default;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}
.address-readonly:focus {
    outline: none;
    border: none;
    box-shadow: none;
    background: transparent;
}
.address-readonly::-webkit-scrollbar {
    height: 4px;
}
.address-readonly::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .form-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .form-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 报价列表分页按钮 ==================== */
.qs-page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.qs-page-btn:hover:not(:disabled):not(.active) {
    background: rgba(22, 93, 255, 0.08);
    border-color: #165DFF;
    color: #1d4ed8;
}
.qs-page-btn.active {
    background: #a5c8ff !important;
    border-color: #4a6fa5;
    color: #2c3e50;
    border-left: 3px solid #4a6fa5;
    font-weight: 500;
}
.qs-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.qs-page-ellipsis {
    color: #9ca3af;
    font-size: 12px;
    padding: 0 2px;
}

/* ==================== 以销定购列表分页按钮（与报价列表共用样式） ==================== */
.ss-page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ss-page-btn:hover:not(:disabled):not(.active) {
    background: rgba(22, 93, 255, 0.08);
    border-color: #165DFF;
    color: #1d4ed8;
}
.ss-page-btn.active {
    background: #a5c8ff !important;
    border-color: #4a6fa5;
    color: #2c3e50;
    border-left: 3px solid #4a6fa5;
    font-weight: 500;
}
.ss-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ss-page-ellipsis {
    color: #9ca3af;
    font-size: 12px;
    padding: 0 2px;
}