/* bg.html 专用样式 - 不与其他页面共用 */

/* 公共基础样式 */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; }
body { background: #f5f5f5; padding-bottom: 70px; }

/* 加载状态 */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.loading p { margin-top: 15px; color: #999; }
.loading-more { display: flex; flex-direction: column; align-items: center; padding: 20px; }
.loading-more p { margin-top: 8px; color: #999; font-size: 12px; }
.loading-more .spinner { width: 24px; height: 24px; border: 3px solid #f5f5f5; border-top-color: #1890ff; border-radius: 50%; animation: spin 1s linear infinite; }
.no-more { text-align: center; padding: 15px; color: #999; font-size: 12px; }
.no-data { text-align: center; padding: 50px; color: #999; }

.spinner { border: 4px solid #f3f3f3; border-top-color: #2196F3; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin-bottom: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 弹窗 */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; border-radius: 8px; width: 90%; max-width: 400px; overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #e0e0e0; }
.close-btn { font-size: 24px; cursor: pointer; color: #999; }
.scan-result-input { width: 90%; margin: 15px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; background: #f5f5f5; }
.scan-status { text-align: center; padding: 15px; color: #666; font-size: 14px; }
#reader, #reader-find-goods { width: 100%; height: 300px; }

/* 运单卡片 */
.waybill-card { background: #fff; border-radius: 8px; padding: 8px;margin-bottom: 10px; overflow: hidden; border: 1px solid red; }
.waybill-header { padding: 15px; border-bottom: 1px solid #eee; }
.waybill-title { font-size: 16px; font-weight: bold; color: #1890ff; margin-bottom: 10px; }
.waybill-row { display: flex; padding: 6px 0; font-size: 13px; }
.waybill-row .label { width: 90px; color: #666; flex-shrink: 0; }
.waybill-row .value { flex: 1; word-break: break-all; color: #333; }

/* 快递订单 */
.express-section { border-top: 8px solid #f5f5f5; }
.express-item { padding: 15px; border-bottom: 1px solid #eee; }
.express-item:last-child { border-bottom: none; }
.express-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.express-title { font-size: 14px; font-weight: 500; color: #333; }
.express-number { font-size: 12px; color: #1890ff; background: #e6f7ff; padding: 2px 8px; border-radius: 4px; }

/* 商品信息 */
.goods-img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; margin-right: 10px; flex-shrink: 0; background: #f5f5f5; }
.goods-detail { flex: 1; min-width: 0; }
.goods-name-zh { font-size: 13px; font-weight: 500; color: #333; margin-bottom: 4px; line-height: 1.3; }
.goods-name-en { font-size: 11px; color: #999; margin-bottom: 4px; word-break: break-all; }
.goods-spec { font-size: 11px; color: #666; margin-bottom: 2px; }
.goods-price-num { display: flex; justify-content: space-between; margin-top: 4px; }
.goods-price { font-size: 12px; color: #ff4d4f; font-weight: 500; }
.goods-num { font-size: 12px; color: #666; }
.goods-section { border-top: 8px solid #f5f5f5; padding: 15px; }
.goods-item { display: flex; padding: 10px 0; border-bottom: 1px solid #f0f0f0; align-items: flex-start; }
.goods-item:last-child { border-bottom: none; }

/* 已找到的快递单号 */
.found-kdsn { color: #4CAF50; font-weight: 500; }
.found-tag { display: inline-block; background: #4CAF50; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }

/* 找货按钮 */
.find-goods-btn { width: 100%; padding: 10px; background: #ff9800; color: white; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; margin-top: 10px; }
.find-goods-btn:hover { background: #f57c00; }

/* 确认打包按钮 */
.confirm-pack-btn { width: 100%; padding: 10px; background: #4caf50; color: #fff; border: none; border-radius: 5px; font-size: 14px; margin-top: 10px; cursor: pointer; }
.confirm-pack-btn:hover { background: #388e3c; }

/* 找货弹窗 */
.find-goods-modal { max-width: 450px; }
.find-goods-scan-section { text-align: center; padding: 15px; }
.find-goods-tip { font-size: 14px; color: #333; margin-bottom: 10px; font-weight: 500; }
.find-goods-scan-status { text-align: center; padding: 15px; color: #666; font-size: 14px; }

/* 找到的快递信息 */
.found-express-info { padding: 15px; }
.found-express-header { display: flex; align-items: center; margin-bottom: 8px; }
.found-express-icon { font-size: 18px; color: #4caf50; margin-right: 6px; }
.found-express-title { font-size: 14px; font-weight: bold; color: #333; }
.found-express-number { font-size: 16px; font-weight: bold; color: #333; word-break: break-all; margin-bottom: 6px; }
.found-express-summary { font-size: 13px; color: #666; margin-bottom: 6px; }
.found-express-progress { font-size: 13px; color: #4caf50; font-weight: 500; margin-bottom: 10px; }
.found-express-goods { border-top: 1px solid #eee; padding-top: 10px; }
.found-express-goods-title { font-size: 12px; font-weight: 500; color: #666; margin-bottom: 10px; }
.found-express-goods-item { display: flex; padding: 8px 0; border-bottom: 1px solid #f0f0f0; align-items: center; }
.found-express-goods-item:last-child { border-bottom: none; }
.found-express-goods-item .goods-img { width: 45px; height: 45px; object-fit: cover; border-radius: 4px; margin-right: 10px; flex-shrink: 0; }
.found-express-goods-item .goods-detail { flex: 1; min-width: 0; }
.found-express-goods-item .goods-name-zh { font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.found-express-goods-item .goods-spec { font-size: 11px; color: #999; margin-top: 2px; }
.found-express-goods-item .goods-price-num { display: flex; justify-content: space-between; margin-top: 4px; }
.found-express-goods-item .goods-price { font-size: 13px; color: #f00; }
.found-express-goods-item .goods-num { font-size: 12px; color: #666; }
.found-express-actions { margin-top: 20px; padding-top: 15px; border-top: 1px solid #e0e0e0; }

/* 找货操作按钮 */
.confirm-btn { width: 100%; padding: 12px; background: #4caf50; color: white; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.3s; }
.confirm-btn:hover { background: #45a049; }

/* 找货完成提示 */
.find-goods-complete { text-align: center; padding: 30px 20px; }
.complete-icon { font-size: 48px; color: #4caf50; margin-bottom: 15px; }
.complete-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 10px; }
.complete-message { font-size: 14px; color: #666; margin-bottom: 20px; }
.close-btn-full { width: 100%; padding: 12px; background: #666; color: white; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: background 0.3s; }
.close-btn-full:hover { background: #555; }

/* 打包确认弹窗 */
.pack-confirm-modal { max-width: 400px; }
.pack-confirm-content { padding: 15px; }
.pack-confirm-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.pack-confirm-row:last-child { border-bottom: none; }
.pack-confirm-label { width: 100px; color: #666; flex-shrink: 0; }
.pack-confirm-value { flex: 1; color: #333; font-weight: 500; }
.pack-confirm-input { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.pack-confirm-actions { display: flex; gap: 10px; padding: 15px; border-top: 1px solid #e0e0e0; }
.pack-confirm-actions .cancel-btn { flex: 1; padding: 12px; background: #999; color: white; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; }
.pack-confirm-actions .confirm-btn { flex: 1; padding: 12px; background: #4caf50; color: white; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; }

/* ========================
   bg.html 页面头部专用样式
   ======================== */
.headersearch { position: fixed; top: 0; left: 0; right: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.search-row { display: flex; gap: 6px; align-items: center; }
.bg-status-select { padding: 10px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; min-width: 80px; height: 44px; }
.bg-express-input { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; height: 44px; box-sizing: border-box; }
.bg-scan-btn { padding: 0 15px; background: #4CAF50; color: #fff; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; height: 43px; }
.bg-query-btn { width: 100%; padding: 14px; background: #52c41a; color: #fff; border: none; border-radius: 6px; font-size: 16px; margin-top: 6px; }
