.modal-wide { width:92vw; max-width:1100px; }
.import-drop { border:2px dashed #cbd5e1; border-radius:10px; padding:24px; text-align:center; color:var(--muted); font-size:13px; cursor:pointer; transition:border-color .2s; margin-bottom:12px; }
.import-drop:hover, .import-drop.drag-over { border-color:var(--accent); color:var(--accent); }
.import-summary { font-size:12px; color:var(--muted); margin-bottom:10px; display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.import-summary strong { color:var(--text); }
.imp-new  { color:#10b981; font-weight:600; }
.imp-upd  { color:#3b82f6; font-weight:600; }
.imp-err  { color:#ef4444; font-weight:600; }
.import-grid { width:100%; border-collapse:collapse; font-size:12px; }
.import-grid th { background:#f8fafc; color:#334155; font-weight:600; padding:6px 7px; border-bottom:1px solid var(--border); text-align:left; white-space:nowrap; }
.import-grid td { padding:5px 7px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.import-grid tr.row-new td { background:#f0fdf4; }
.import-grid tr.row-update td { background:#eff6ff; }
.import-grid tr.row-error td { background:#fff7f7; }
.imp-icon-new  { color:#10b981; font-size:15px; font-weight:700; }
.imp-icon-upd  { color:#3b82f6; font-size:15px; }
.imp-icon-err  { color:#ef4444; font-size:15px; }
.import-progress { margin-top:10px; font-size:13px; color:var(--muted); }
.progress-bar-wrap { height:6px; background:#e2e8f0; border-radius:4px; margin-top:6px; overflow:hidden; }
.progress-bar-fill { height:100%; background:var(--accent); border-radius:4px; transition:width .2s; }
.type-filter { border:1px solid #cbd5e1; border-radius:8px; padding:7px 10px; font-size:13px; width:140px; }
.type-group-header { background:#f1f5f9; font-weight:600; color:#475569; }
.row-type-0 td { background:#f0fdf4; }
.row-type-1 td { background:#eff6ff; }
.row-type-2 td { background:#fff7ed; }
.row-type-3 td { background:#f5f3ff; }
.row-type-4 td { background:#fef9c3; }
.row-type-5 td { background:#fce7f3; }
.row-type-6 td { background:#e0f2fe; }
.row-type-7 td { background:#f3f4f6; }
tr.row-reorder-alert td { background:#fca5a5 !important; }
tr.row-reorder-alert td strong { color:#7f1d1d; }
.btn-order,.btn-reorder,.btn-build,.btn-wo,.btn-push-inv,.btn-assembly { display:inline-flex; align-items:center; gap:3px; padding:3px 7px; font-size:11px; border-radius:6px; border:none; color:#fff; cursor:pointer; white-space:nowrap; font-weight:600; line-height:1.4; }
.btn-order    { background:#2563eb; }
.btn-order:hover { background:#1d4ed8; }
.btn-reorder  { background:#dc2626; }
.btn-reorder:hover { background:#b91c1c; }
.btn-build    { background:#94a3b8; cursor:default; opacity:0.85; }
.btn-assembly { background:#94a3b8; cursor:default; opacity:0.85; }
.btn-wo       { background:#d97706; }
.btn-wo:hover { background:#b45309; }
.btn-push-inv { background:#0891b2; }
.btn-push-inv:hover { background:#0e7490; }
td.col-order { width:96px; padding:4px 5px; }
td.col-id { white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 120px; }
.on-order-note { font-size:10px; color:#64748b; white-space:nowrap; margin-top:1px; }
.po-section { margin-bottom:14px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.po-section:last-child { border-bottom:none; margin-bottom:0; }
.po-section h4 { margin:0 0 8px; font-size:13px; font-weight:600; color:#334155; }
.po-calc { background:#f8fafc; border:1px solid var(--border); border-radius:8px; padding:10px 12px; font-size:13px; }
.po-calc-row { display:flex; justify-content:space-between; padding:3px 0; }
.po-calc-row.total { font-weight:700; font-size:14px; border-top:1px solid var(--border); margin-top:4px; padding-top:6px; }
.check-row { display:flex; align-items:center; gap:8px; font-size:13px; }
.po-readonly { background:#f8fafc; border:1px solid var(--border); border-radius:7px; padding:6px 8px; font-size:13px; color:var(--text); width:100%; }
.reorder-alert-item { display:flex; align-items:center; gap:6px; padding:3px 8px; font-size:11px; color:#7f1d1d; font-weight:600; }
.reorder-alert-item::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:#ef4444; flex:0 0 6px; }
#sidebarReorderList .none-msg { padding:3px 8px; font-size:11px; color:var(--muted); }
.reorder-alert-item { cursor:pointer; border-radius:5px; transition:background .15s; }
.reorder-alert-item:hover { background:#fee2e2; }
@keyframes row-flash { 0%,100%{background:inherit} 30%,70%{background:#fde68a !important;} }
tr.row-flash td { animation:row-flash 1.2s ease; }
.bom-expand-btn { cursor:pointer; display:inline-flex; align-items:center; background:none; border:none; padding:0 4px 0 0; color:#64748b; font-size:9px; line-height:1; transition:transform .15s; vertical-align:middle; }
.bom-expand-btn.open { transform:rotate(90deg); }
.bom-child-row td { background:#f0f9ff !important; border-bottom:1px solid #bae6fd; font-size:12px; color:#334155; padding:5px 7px; }
.bom-child-row:hover td { background:#e0f2fe !important; }
.bom-jump-link { background:none; border:none; padding:0; font:inherit; color:#2563eb; cursor:pointer; text-align:left; }
.bom-jump-link:hover { text-decoration:underline; }
.bom-jump-link:focus-visible { outline:2px solid #2563eb; outline-offset:2px; border-radius:2px; }
.dispatch-jump-link { font:inherit; color:#2563eb; cursor:pointer; text-decoration:none; }
.dispatch-jump-link:hover { text-decoration:underline; }
.dispatch-jump-link:focus-visible { outline:2px solid #2563eb; outline-offset:2px; border-radius:2px; }
.bom-child-row.hidden { display:none; }
.dispatch-child-row td { background:#fffbeb !important; border-bottom:1px solid #fcd34d; font-size:12px; color:#334155; padding:5px 7px; }
.dispatch-child-row:hover td { background:#fef3c7 !important; }
.dispatch-child-row.hidden { display:none; }
.dispatch-badge { display:inline-block; padding:1px 7px; border-radius:20px; font-size:11px; font-weight:600; background:#f1f5f9; color:#64748b; }
.registry-link-hint { margin:0 0 10px; font-size:12px; color:var(--muted); line-height:1.45; }
.registry-link-toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:10px; }
.registry-link-toolbar .search-input { flex:1; min-width:180px; }
.registry-select-new { font-size:12px; color:#334155; display:flex; align-items:center; gap:6px; cursor:pointer; white-space:nowrap; }
.registry-link-panels { display:grid; grid-template-columns:1fr 150px 1fr; gap:10px; min-height:320px; max-height:55vh; }
.registry-panel { border:1px solid var(--border); border-radius:8px; display:flex; flex-direction:column; min-height:0; overflow:hidden; background:#fff; }
.registry-panel-title { padding:6px 10px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:#64748b; background:#f8fafc; border-bottom:1px solid var(--border); }
.registry-link-list { overflow-y:auto; flex:1; }
.registry-link-row { display:flex; align-items:flex-start; gap:8px; padding:7px 10px; border-bottom:1px solid #f1f5f9; cursor:pointer; font-size:12px; }
.registry-link-row:hover { background:#f8fafc; }
.registry-link-row.selected { background:#eff6ff; }
.registry-link-row input[type=checkbox] { margin-top:2px; flex:0 0 auto; }
.registry-link-row-main { flex:1; min-width:0; }
.registry-link-sku { font-weight:700; color:#1d4ed8; }
.registry-link-name { color:#64748b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.registry-link-status, .registry-link-preview { padding:10px; font-size:12px; overflow-y:auto; flex:1; color:#334155; line-height:1.5; }
.registry-link-preview dl { margin:0; }
.registry-link-preview dt { font-weight:600; color:#64748b; font-size:11px; margin-top:8px; }
.registry-link-preview dt:first-child { margin-top:0; }
.registry-link-preview dd { margin:2px 0 0; }
.registry-badge { display:inline-block; padding:2px 8px; border-radius:12px; font-size:11px; font-weight:700; }
.registry-badge-new { background:#d1fae5; color:#065f46; }
.registry-badge-linked { background:#dbeafe; color:#1e40af; }
.registry-badge-blocked { background:#fee2e2; color:#991b1b; }
.registry-link-summary { flex:1; font-size:12px; color:var(--muted); text-align:left; }
.registry-jump-btn { margin-top:8px; }
@media (max-width:900px) { .registry-link-panels { grid-template-columns:1fr; max-height:none; } }
