* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100vh; overflow: hidden; }
body { font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif; background: #F5F6FA; color: #2D3436; }

/* ========== Login ========== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #2D3436 0%, #6C5CE7 100%); }
.login-box { background: #fff; border-radius: 16px; padding: 48px 40px; width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center; }
.login-box h1 { font-size: 28px; color: #6C5CE7; margin-bottom: 4px; }
.login-subtitle { font-size: 14px; color: #b2bec3; margin-bottom: 32px; }
.login-box input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; margin-bottom: 16px; outline: none; }
.login-box input:focus { border-color: #6C5CE7; }
.btn-login { width: 100%; padding: 12px; background: #6C5CE7; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; }
.btn-login:hover { background: #5A4BD1; }
.login-error { color: #D63031; font-size: 13px; margin-top: 12px; min-height: 20px; }

/* ========== Navbar ========== */
.navbar { background: #2D3436; color: #fff; height: 50px; display: flex; align-items: center; padding: 0 24px; position: sticky; top: 0; z-index: 100; }
.navbar .logo { font-size: 18px; font-weight: bold; color: #6C5CE7; }
.navbar .nav-items { display: flex; gap: 28px; margin-left: 40px; }
.navbar .nav-items a { color: #b2bec3; text-decoration: none; font-size: 14px; padding: 14px 0; }
.navbar .nav-items a.active { color: #fff; border-bottom: 2px solid #6C5CE7; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.last-update { font-size: 12px; color: #636e72; }
.refresh-btn { background: none; border: none; color: #6C5CE7; font-size: 16px; cursor: pointer; padding: 4px; }
.refresh-btn:hover { opacity: 0.7; }
.user-info { font-size: 13px; color: #b2bec3; }
.btn-logout { background: none; border: 1px solid #636e72; color: #b2bec3; padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.btn-logout:hover { border-color: #6C5CE7; color: #6C5CE7; }

/* ========== Layout ========== */
.main { display: flex; height: calc(100vh - 50px); }

/* ========== Sidebar ========== */
.sidebar { width: 200px; background: #fff; border-right: 1px solid #E8E8E8; padding: 16px 0; flex-shrink: 0; position: sticky; top: 50px; height: calc(100vh - 50px); overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .section-title { font-size: 13px; color: #636e72; padding: 8px 20px; font-weight: bold; }
.sidebar .menu-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; cursor: pointer; font-size: 14px; color: #2D3436; transition: all 0.15s; }
.sidebar .menu-item:hover { background: #F0EDFF; }
.sidebar .menu-item.active { background: #F0EDFF; color: #6C5CE7; font-weight: bold; border-left: 3px solid #6C5CE7; }
.sidebar .badge { background: #E8E8E8; color: #636e72; border-radius: 10px; padding: 2px 8px; font-size: 12px; min-width: 32px; text-align: center; }
.sidebar .menu-item.active .badge { background: #6C5CE7; color: #fff; }
.sidebar-bottom { margin-top: auto; padding: 10px 16px; position: sticky; bottom: 0; background: #fff; border-top: 1px solid #f0f0f0; z-index: 1; }
.sidebar-bottom .btn-add-order { width: 100%; padding: 10px; background: #6C5CE7; color: #fff; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; font-weight: bold; }
.sidebar-bottom .btn-add-order:hover { background: #5A4BD1; }
.btn-add-order { width: 100%; padding: 10px; background: #6C5CE7; color: #fff; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; font-weight: bold; }
.btn-add-order:hover { background: #5A4BD1; }

/* ========== Content ========== */
.content { flex: 1; padding: 20px 24px; overflow: hidden; min-width: 0; display: flex; flex-direction: column; }

/* ========== Filters ========== */
.filters { background: #fff; border-radius: 8px; padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); flex-shrink: 0; }
.filter-row { display: flex; align-items: center; margin-bottom: 10px; gap: 12px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: 13px; color: #636e72; min-width: 80px; text-align: right; }
.filter-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tag { padding: 4px 14px; border-radius: 4px; font-size: 13px; cursor: pointer; border: 1px solid #ddd; background: #fff; color: #636e72; transition: all 0.15s; }
.filter-tag.active { background: #6C5CE7; color: #fff; border-color: #6C5CE7; }
.filter-tag:hover { border-color: #6C5CE7; color: #6C5CE7; }
.filter-tag.active:hover { color: #fff; }

/* ========== Search ========== */
.search-bar { display: flex; align-items: flex-start; gap: 0; margin-bottom: 16px; flex-shrink: 0; }
.search-bar select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px 0 0 4px; font-size: 13px; border-right: none; height: 36px; outline: none; background: #fff; }
.search-bar textarea { flex: 1; padding: 8px 14px; border: 1px solid #ddd; font-size: 13px; min-height: 36px; max-height: 100px; outline: none; resize: vertical; font-family: inherit; line-height: 1.5; }
.search-bar textarea:focus { border-color: #6C5CE7; }
.search-bar textarea.expanded { min-height: 72px; }
.search-mode { padding: 8px 12px; border: 1px solid #ddd; border-left: none; font-size: 12px; color: #636e72; height: 36px; background: #fafafa; cursor: pointer; white-space: nowrap; display: flex; align-items: center; }
.search-mode:hover { color: #6C5CE7; }
.btn-search { background: #6C5CE7; color: #fff; border: none; padding: 0 20px; height: 36px; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 16px; }
.btn-search:hover { background: #5A4BD1; }

/* ========== Toolbar ========== */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.toolbar .actions { display: flex; gap: 8px; align-items: center; }
.btn { padding: 6px 16px; border-radius: 4px; font-size: 13px; cursor: pointer; border: 1px solid #ddd; background: #fff; }
.btn-primary { background: #6C5CE7; color: #fff; border-color: #6C5CE7; }
.btn-primary:hover { background: #5A4BD1; }
.btn-print { background: #6C5CE7; color: #fff; border-color: #6C5CE7; display: flex; align-items: center; gap: 6px; }
.btn-print:hover { background: #5A4BD1; }
.btn-print .count { background: rgba(255,255,255,0.3); padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.btn-confirm-arrival { background: #00B894; color: #fff; border-color: #00B894; }
.btn-confirm-arrival:hover { background: #00A381; }
.selected-info { font-size: 13px; color: #6C5CE7; font-weight: 500; }
.pagination { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #636e72; }
.pagination .page-info { margin-right: 8px; }
.pagination button { background: #fff; border: 1px solid #ddd; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.pagination button:hover { border-color: #6C5CE7; color: #6C5CE7; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; }

/* ========== Table ========== */
.table-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow: auto; flex: 1; min-height: 0; }
table { width: 100%; border-collapse: collapse; min-width: 1300px; }
thead th { background: #FAFAFA; padding: 12px 14px; text-align: left; font-size: 13px; color: #636e72; font-weight: 600; border-bottom: 1px solid #E8E8E8; white-space: nowrap; position: sticky; top: 0; z-index: 10; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: #6C5CE7; }
tbody td { padding: 14px; border-bottom: 1px solid #F0F0F0; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #FAFBFF; }
tbody tr.selected { background: #F0EDFF; }

/* Checkbox */
.cb-col { width: 40px; text-align: center; }
input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #6C5CE7; }

/* Product info */
.product-info { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.product-img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; border: 1px solid #eee; background: #f5f5f5; flex-shrink: 0; cursor: pointer; }
.product-img-placeholder { width: 56px; height: 56px; border-radius: 6px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 10px; flex-shrink: 0; }
.product-detail { flex: 1; min-width: 0; }
.product-sku { font-size: 13px; font-weight: bold; color: #2D3436; margin-bottom: 2px; }
.product-name { font-size: 12px; color: #636e72; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.product-spec { font-size: 11px; color: #b2bec3; }
.product-qty { font-size: 11px; color: #6C5CE7; margin-top: 2px; }

/* Tags */
.tag { display: inline-block; padding: 2px 10px; border-radius: 3px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-arrived { background: #E8F8F0; color: #00B894; }
.tag-failed { background: #FFE8E8; color: #D63031; }
.tag-pending { background: #F0F0F0; color: #999; }
.tag-inspect { background: #FFF3E0; color: #E17055; }
.tag-ok { background: #E8F8F0; color: #00B894; }
.tag-abnormal { background: #FFE8E8; color: #D63031; cursor: help; }
.tag-label { background: #E8F0FF; color: #0984E3; }
.tag-shipping { background: #FFF3CD; color: #856404; }
.tag-receiving { background: #D1ECF1; color: #0C5460; }
.tag-payment { background: #FFE0B2; color: #E65100; }

/* Copyable */
.copyable { cursor: pointer; color: #0984E3; }
.copyable:hover { text-decoration: underline; }

/* Tracking number - truncated */
.tracking-cell { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Remark */
.remark-cell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #636e72; }
.remark-cell-full { font-size: 12px; color: #636e72; white-space: normal; word-break: break-word; max-width: 360px; min-width: 200px; line-height: 1.4; }
.tag-measure { background: #FFEAA7; color: #856404; border: 1px solid #F9CA24; }

/* Time */
.time-cell { font-size: 12px; color: #999; white-space: nowrap; }

/* Editable box qty */
.box-qty-input { width: 60px; padding: 2px 6px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; text-align: center; outline: none; }
.box-qty-input:focus { border-color: #6C5CE7; }
.box-qty-input:hover { border-color: #b2bec3; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #b2bec3; font-size: 14px; }

/* ========== Modals ========== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.image-modal { position: relative; max-width: 90vw; max-height: 90vh; }
.image-modal img { max-width: 100%; max-height: 85vh; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.image-modal-close { position: absolute; top: -12px; right: -12px; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: none; font-size: 20px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.modal { background: #fff; border-radius: 12px; padding: 24px; width: 480px; max-height: 80vh; overflow-y: auto; box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.modal-lg { width: 600px; }
.modal h3 { font-size: 16px; margin-bottom: 16px; color: #2D3436; }
.modal .file-list { background: #F5F6FA; border-radius: 6px; padding: 12px 16px; margin-bottom: 20px; max-height: 300px; overflow-y: auto; }
.modal .file-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: #2D3436; border-bottom: 1px solid #E8E8E8; }
.modal .file-item:last-child { border-bottom: none; }
.modal .file-item .check { color: #6C5CE7; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal .btn-cancel { padding: 8px 24px; border: 1px solid #ddd; background: #fff; border-radius: 6px; cursor: pointer; font-size: 14px; }
.modal .btn-confirm { padding: 8px 24px; background: #6C5CE7; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.modal .btn-confirm:hover { background: #5A4BD1; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 12px; color: #636e72; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; outline: none; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #6C5CE7; }

/* ========== Toast ========== */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #2D3436; color: #fff; padding: 10px 24px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 2000; }
.toast.show { opacity: 1; }

/* Sync Status */
.sync-status {
  margin-top: 10px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.4;
  overflow: hidden;
}
.sync-status .sync-title {
  font-weight: 600;
  font-size: 10px;
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  border-radius: 5px;
}
.sync-status.has-error .sync-title {
  background: #fff5f5;
  color: #c62828;
  border: 1px solid #ffcdd2;
}
.sync-status.all-ok .sync-title {
  background: #f1f8e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.sync-status .sync-detail {
  padding: 4px 8px 6px;
  border: 1px solid #eee;
  border-top: none;
  border-radius: 0 0 5px 5px;
  background: #fafafa;
}
.sync-status .sync-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}
.sync-status .sync-name { color: #666; }
.sync-status .sync-badge {
  font-size: 9px;
  padding: 0 4px;
  border-radius: 2px;
  white-space: nowrap;
}
.sync-status .sync-badge.ok { background: #e8f5e9; color: #2e7d32; }
.sync-status .sync-badge.warn { background: #fff3e0; color: #e65100; }
.sync-status .sync-badge.error { background: #ffebee; color: #c62828; }
.sync-status .sync-badge.idle { background: #f5f5f5; color: #aaa; }
.sync-status .sync-errs {
  display: none;
  padding: 2px 0 2px 8px;
}
.sync-status .sync-errs.open { display: block; }
.sync-status .sync-err {
  font-size: 9px;
  color: #b71c1c;
  line-height: 1.3;
  word-break: break-all;
  padding: 1px 0;
}
.sync-status .sync-row.clickable { cursor: pointer; }
.sync-status .sync-row.clickable:hover .sync-name { color: #333; }
.sync-status .sync-hint {
  font-size: 9px;
  padding: 2px 5px;
  margin: 2px 0;
  border-radius: 2px;
  line-height: 1.4;
  word-break: break-all;
  color: #1565c0;
  background: #e3f2fd;
}
.sync-status .sync-hint.recovered {
  color: #2e7d32;
  background: #e8f5e9;
}
.sync-status .sync-hint.retry {
  color: #e65100;
  background: #fff3e0;
}
.sync-status .sync-sep {
  border-top: 1px solid #f0f0f0;
  margin: 2px 0;
}
.sync-status .sync-time {
  font-size: 9px;
  color: #bbb;
  text-align: right;
  padding-top: 3px;
}

/* PO Match */
.btn-match { padding: 6px 12px; background: #6C5CE7; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.btn-match:hover { background: #5A4BD1; }
.btn-match:disabled { background: #ccc; cursor: not-allowed; }
#matchResult { margin-top: 6px; font-size: 12px; }
#matchResult .match-info { color: #2e7d32; padding: 4px 0; }
#matchResult .match-err { color: #c62828; padding: 4px 0; }
#matchResult .match-list { max-height: 200px; overflow-y: auto; }
#matchResult .match-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border: 1px solid #eee; border-radius: 4px; margin: 3px 0; cursor: pointer; font-size: 11px; }
#matchResult .match-item:hover { background: #F0EDFF; border-color: #6C5CE7; }
#matchResult .match-item .sku-code { font-weight: 600; color: #333; }
#matchResult .match-item .sku-name { color: #666; flex: 1; margin: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#matchResult .match-item .sku-qty { color: #6C5CE7; white-space: nowrap; }

/* ========== Task 3.7: Inspection 三態 tag ==========*/
.tag-new-product { background:#F3E8FF; color:#7C3AED; border:1px solid #DDD6FE; }
.tag-inspect-urgent { background:#FEE2E2; color:#DC2626; border:1px solid #FECACA; font-weight:600; }
tr.needs-report { background:#FFF5F5 !important; }
tr.needs-report:hover { background:#FEE2E2 !important; }
.report-icon { cursor:pointer; margin-left:4px; font-size:14px; }

/* ========== Task 4.2: PO 彈窗 + 多物流單號 Modal ==========*/
/* Note: .modal-overlay base styles already defined above; new modals use inline style for display */
.modal-content { background:#fff; border-radius:8px; max-height:80vh; overflow-y:auto; box-shadow:0 4px 24px rgba(0,0,0,0.15); }
.modal-wide { width:90vw; max-width:1200px; }
.modal-small { width:400px; max-width:90vw; }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #eee; }
.modal-header h3 { margin:0; font-size:16px; }
.modal-close { font-size:24px; cursor:pointer; color:#999; }
.modal-close:hover { color:#333; }
.modal-body { padding:16px 20px; }
.po-link { color:#6C5CE7; cursor:pointer; text-decoration:underline; }
.po-link:hover { color:#5A4BD1; }
.po-detail-table { width:100%; border-collapse:collapse; font-size:13px; }
.po-detail-table th, .po-detail-table td { padding:8px; border-bottom:1px solid #eee; text-align:left; }
.po-detail-table th { background:#F8F9FA; font-weight:600; }
.add-tracking-btn { display:inline-block; width:20px; height:20px; line-height:20px; text-align:center; background:#F0EDFF; color:#6C5CE7; border-radius:4px; cursor:pointer; font-weight:bold; margin-left:4px; }
.add-tracking-btn:hover { background:#6C5CE7; color:#fff; }
.tracking-cell-editable { display:flex; align-items:center; gap:4px; }
.remove-tracking-btn { display:inline-block; width:16px; height:16px; line-height:14px; text-align:center; background:#FFF0F0; color:#E53935; border-radius:50%; cursor:pointer; font-size:12px; font-weight:bold; opacity:0.85; transition:opacity 0.15s; }
.tracking-cell-editable:hover .remove-tracking-btn { opacity:1; }
.remove-tracking-btn:hover { background:#E53935; color:#fff; }

/* ========== Task 6.2: 驗貨回報 Modal ==========*/
.report-modal { width:500px; max-width:95vw; }
.report-info { background:#F8F9FA; padding:12px; border-radius:6px; margin-bottom:16px; font-size:13px; }
.report-info strong { display:block; font-size:15px; margin-bottom:4px; }
.report-section { margin-bottom:16px; }
.report-section label { display:block; font-weight:600; margin-bottom:6px; font-size:13px; color:#555; }
.report-photos { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:8px; }
.report-photo-item { position:relative; aspect-ratio:1; border-radius:6px; overflow:hidden; border:1px solid #eee; }
.report-photo-item img { width:100%; height:100%; object-fit:cover; }
.report-photo-item .remove-photo { position:absolute; top:2px; right:2px; background:rgba(0,0,0,0.5); color:#fff; width:20px; height:20px; border-radius:50%; text-align:center; line-height:20px; cursor:pointer; font-size:12px; }
.report-add-photo { display:block; padding:12px; text-align:center; border:2px dashed #DDD; border-radius:6px; cursor:pointer; color:#6C5CE7; font-weight:600; }
.report-add-photo:hover { border-color:#6C5CE7; background:#F8F7FF; }
.report-textarea { width:100%; padding:10px; border:1px solid #DDD; border-radius:6px; font-size:14px; resize:vertical; font-family:inherit; box-sizing:border-box; }
.report-error { color:#DC2626; font-size:13px; margin-bottom:12px; }
.report-submit { width:100%; padding:12px; font-size:15px; font-weight:600; background:#6C5CE7; color:#fff; border:none; border-radius:6px; cursor:pointer; }
.report-submit:hover { background:#5A4BD1; }
.report-submit:disabled { background:#CCC; cursor:not-allowed; }
@media (max-width:768px) {
  .report-modal { width:95vw; }
  .report-photos { grid-template-columns:repeat(2,1fr); }
  .report-textarea { font-size:16px; }
  .report-submit { height:48px; font-size:16px; }
  .report-add-photo { padding:16px; font-size:16px; }
}
/* v6.0: Report toggle */
.toggle-label { font-size:12px; color:#666; margin-right:4px; }
.toggle-btn { display:inline-block; padding:2px 10px; border-radius:12px; font-size:12px; font-weight:600; cursor:pointer; user-select:none; }
.toggle-on { background:#10B981; color:#fff; }
.toggle-off { background:#EF4444; color:#fff; }
.toggle-btn:hover { opacity:0.85; }

/* ===== Shipping Report + Manual Tracking (2026-04-24) ===== */
th.extra-col { text-align: right; font-size: 13px; }
#sr_summary b { color: #0984E3; font-size: 14px; }
#manualTrackingModal.show { display: flex !important; }
#manualTrackingModal .form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
#manualTrackingModal .btn-confirm:hover { background: #00a383 !important; }
#shippingReportContent thead th {
  background: #f1f3f5;
  font-weight: 600;
  font-size: 13px;
}
#shippingReportContent tbody tr:hover { background: #f8f9fa; }

.tag-sea { background: #E0F4FF; color: #0277BD; }
.tag-container { background: #FFF3E0; color: #E65100; }
.tag-express { background: #E8F8F0; color: #00B894; }
.tag-bs { background: #F0F0F0; color: #636e72; }
.tag-manual { background: #FFE0B2; color: #E65100; }

#shippingReportContent table {
  table-layout: fixed;
  width: 100%;
  min-width: unset !important;
}
#shippingReportContent th, #shippingReportContent td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 14 欄：華通月/採購月/物流/新竹/採購單/負責/運送/來源/重量/運費/狀態/地址/品名/數量 */
#shippingReportContent th:nth-child(1), #shippingReportContent td:nth-child(1)  { width: 100px; }
#shippingReportContent th:nth-child(2), #shippingReportContent td:nth-child(2)  { width: 100px; }
#shippingReportContent th:nth-child(3), #shippingReportContent td:nth-child(3)  { width: 150px; white-space: normal; word-break: break-all; }
#shippingReportContent th:nth-child(4), #shippingReportContent td:nth-child(4)  { width: 120px; white-space: normal; word-break: break-all; }
#shippingReportContent th:nth-child(5), #shippingReportContent td:nth-child(5)  { width: 130px; }
#shippingReportContent th:nth-child(6), #shippingReportContent td:nth-child(6)  { width: 70px; }
#shippingReportContent th:nth-child(7), #shippingReportContent td:nth-child(7)  { width: 75px; }
#shippingReportContent th:nth-child(8), #shippingReportContent td:nth-child(8)  { width: 60px; }
#shippingReportContent th:nth-child(9), #shippingReportContent td:nth-child(9)  { width: 75px; }
#shippingReportContent th:nth-child(10), #shippingReportContent td:nth-child(10) { width: 85px; }
#shippingReportContent th:nth-child(11), #shippingReportContent td:nth-child(11) { width: 170px; white-space: normal; word-break: break-all; }
#shippingReportContent th:nth-child(12), #shippingReportContent td:nth-child(12) { width: 200px; white-space: normal; word-break: break-all; }
#shippingReportContent th:nth-child(13), #shippingReportContent td:nth-child(13) { width: 130px; }
#shippingReportContent th:nth-child(14), #shippingReportContent td:nth-child(14) { width: 55px; }
#shippingReportContent tbody td { padding: 10px 8px; }
#shippingReportContent thead th { padding: 10px 8px; }

/* ===== Shipping Report 15 欄寬 v3 (加 SKU 欄, 2026-04-25) ===== */
/* 華通月/採購月/物流/新竹/採購單/負責/運送/來源/重量/運費/狀態/地址/SKU/品名/數量 */
#shippingReportContent th:nth-child(13), #shippingReportContent td:nth-child(13) { width: 110px; white-space: nowrap; font-weight: 600; }
#shippingReportContent th:nth-child(14), #shippingReportContent td:nth-child(14) { width: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#shippingReportContent th:nth-child(15), #shippingReportContent td:nth-child(15) { width: 55px; }
.time-cell { font-size: 12px; max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #636e72; }
