.online-status{position:fixed;right:16px;bottom:12px;z-index:80;background:#fff;color:#166534;border:1px solid #bbf7d0;border-radius:8px;padding:7px 12px;font:13px/1.5 "Microsoft YaHei",sans-serif;box-shadow:0 2px 8px #0001;max-width:calc(100vw - 32px)}
.online-status button{color:#2563eb;text-decoration:underline;margin-left:12px}
.online-loading{padding:40px;text-align:center;color:#475569;font-family:"Microsoft YaHei",sans-serif}
.online-blocker{position:fixed;inset:0;z-index:9999;background:#0f172a99;display:flex;align-items:center;justify-content:center;padding:24px;font-family:"Microsoft YaHei",sans-serif}
.online-blocker>div{background:white;padding:28px;border-radius:12px;max-width:600px;color:#1f2937}
.online-blocker h2{font-size:22px;font-weight:bold;margin-bottom:12px}.online-blocker p{margin:12px 0;line-height:1.8}.online-blocker button{background:#2563eb;color:white;border:0;border-radius:6px;padding:10px 14px;margin:6px 8px 0 0;cursor:pointer}
.fabric-name-field{min-width:0;text-align:left}.fabric-name-combobox{position:relative}.fabric-name-combobox input{padding-right:40px}.fabric-name-toggle{position:absolute;right:1px;top:1px;bottom:1px;width:36px;border-radius:0 7px 7px 0;border:0;border-left:1px solid #e5e7eb;background:#f9fafb;color:#475569;font-size:18px;cursor:pointer}.fabric-name-toggle:hover{background:#eff6ff;color:#2563eb}.fabric-name-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60;border:1px solid #d1d5db;border-radius:8px;background:#fff;box-shadow:0 8px 20px #0f172a22;overflow:hidden}.fabric-name-menu ul{max-height:192px;overflow-y:auto;margin:0;padding:4px;list-style:none}.fabric-name-option{padding:8px 10px;border-radius:4px;cursor:pointer;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.fabric-name-option:hover,.fabric-name-option.active{background:#eff6ff;color:#1d4ed8}.fabric-name-empty{margin:0;padding:10px 12px;font-size:12px;color:#64748b;line-height:1.6}.fabric-supplier-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left}.fabric-supplier-heading h2{min-width:0;overflow-wrap:anywhere}.fabric-supplier-heading button{flex-shrink:0;white-space:nowrap}

.cost-details-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0 12px;font-size:12px;color:#64748b}
.cost-details-toolbar button,.cost-detail-toggle{border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:6px;padding:5px 9px;white-space:nowrap;cursor:pointer}
.cost-detail-toggle{display:block;margin-top:4px;font-size:12px}
.cost-detail-toggle:focus-visible,.cost-details-toolbar button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.cost-detail-row>td{padding:0 12px 14px;background:#f0f7ff;border-bottom:1px solid #dbeafe}
.cost-material-details{max-width:calc(100vw - 100px);padding:12px 0;color:#334155}
.cost-detail-heading{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:0 0 10px;color:#1e40af}
.cost-detail-heading span{font-size:12px;font-weight:normal;color:#64748b}
.cost-detail-scroll{overflow-x:auto;background:white;border:1px solid #dbeafe;border-radius:8px}
.cost-material-table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}
.cost-material-table th{background:#eaf2ff;color:#1e3a8a;padding:10px 8px;white-space:nowrap}
.cost-material-table td{padding:9px 8px;border-top:1px solid #e2e8f0;vertical-align:top}
.cost-material-table td strong{white-space:nowrap}
.cost-detail-totals{display:flex;flex-wrap:wrap;gap:10px 24px;margin-top:10px;font-size:12px}
.cost-detail-totals span{color:#64748b}
@media(max-width:800px){
  .cost-material-table,.cost-material-table tbody{display:block}
  .cost-material-table thead{display:none}
  .cost-material-table tbody tr{display:grid;grid-template-columns:1fr 1fr;padding:8px;border-bottom:2px solid #dbeafe;gap:6px 10px}
  .cost-material-table tbody tr:last-child{border-bottom:0}
  .cost-material-table td{display:flex;flex-direction:column;gap:3px;border:0;padding:3px;min-width:0;overflow-wrap:anywhere}
  .cost-material-table td::before{content:attr(data-label);color:#64748b;font-size:11px}
  .cost-material-table td:last-child{grid-column:1/-1}
}

.product-cost-overlay{position:fixed;inset:0;z-index:60;background:#0008;display:flex;align-items:center;justify-content:center;padding:20px;color:#243044;font:14px/1.5 system-ui,sans-serif}
.product-cost-report{background:#fff;border-radius:12px;width:100%;max-width:1800px;max-height:94vh;overflow:auto;padding:24px;box-shadow:0 15px 50px #0003}
.product-cost-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.product-cost-header h2{font-size:25px;font-weight:700;display:inline-block;margin-right:16px}.product-cost-header span{color:#697586}.product-cost-header>button{font-size:28px;padding:0 8px}
.product-cost-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:12px;background:#fffbeb;border:1px solid #fde3a7;border-radius:8px;padding:14px;margin-bottom:12px}.product-cost-toolbar label{font-size:12px;font-weight:600}.product-cost-toolbar label input{display:block;margin-top:4px}.product-cost-toolbar input,.product-cost-table input{background:#fff;border:1px solid #d2d7de;border-radius:5px;padding:7px 9px;min-width:0}.product-cost-toolbar button{border:1px solid #d9c99f;border-radius:5px;padding:8px 14px;background:white;white-space:nowrap}.product-cost-toolbar .cost-export-button{background:#16884b;border-color:#16884b;color:white}.cost-add-code{display:flex;gap:8px;margin-left:auto}.cost-add-code input{width:270px}.product-cost-report button:disabled{opacity:.5;cursor:not-allowed}.product-cost-report input:disabled{background:#f3f4f6;color:#4b5563}
.cost-rule-note{background:#eff6ff;border-left:3px solid #8ca9c9;border-radius:5px;padding:12px 15px;font-size:12px;margin:12px 0}.cost-rule-note p{margin-top:4px}.cost-warning,.cost-check-row td{background:#fff4e6;color:#9a4c0d;font-size:12px;padding:10px 12px}.product-cost-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.product-cost-stats>div{background:#f3f6f9;border:1px solid #e4e9ef;border-radius:8px;padding:14px}.product-cost-stats>div:last-child{background:#ecfdf5}.product-cost-stats span{display:block;font-size:12px;color:#58677a}.product-cost-stats strong{display:block;font-size:22px;margin-top:4px}
.product-cost-scroll{overflow-x:auto;border:1px solid #e3e7ec;border-radius:6px}.product-cost-table{min-width:1640px;width:100%;border-collapse:collapse;font-size:13px}.product-cost-table th{padding:12px 10px;background:#f4f6f8;text-align:left;min-width:105px;font-size:12px;vertical-align:bottom}.product-cost-table th:first-child{min-width:140px}.product-cost-table td{padding:12px 10px;border-top:1px solid #e3e7ec;vertical-align:top}.product-cost-table input{width:115px}.product-cost-table small{display:block;font-size:11px;color:#748094;margin-top:4px}.product-cost-table .cost-input-col{background:#fffbeb}.product-cost-table .cost-amber{color:#ae6518}.product-cost-table .cost-final{background:#f0fdf4;color:#17694d;font-weight:600}.product-cost-table tfoot{background:#f4f6f8;font-weight:700}.product-cost-table .cost-check-row td{padding:6px 12px;color:#945718;background:#fff8eb}.cost-code strong{overflow-wrap:anywhere}.cost-transfer-details{padding:10px;background:#f8fafc}.cost-transfer-details h3{font-weight:700;margin-bottom:8px}.cost-transfer-details>p{font-size:12px;margin-bottom:12px}.cost-transfer-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.cost-transfer-grid h4{font-weight:600;margin-bottom:5px}.cost-transfer-grid table{width:100%;background:white;font-size:12px}.cost-transfer-grid td,.cost-transfer-grid th{padding:7px;min-width:0}.cost-public-heading{font-size:16px;font-weight:700;margin:22px 0 5px}.cost-note{font-size:12px;margin:6px 0 12px;color:#6b7280}.cost-public-table{width:100%;min-width:1000px;background:#fffcec;font-size:12px}.cost-public-table th,.cost-public-table td{padding:9px 12px;text-align:left;border-bottom:1px solid #e8e7de}.cost-footer-note{margin-top:20px}
@media(max-width:800px){.product-cost-overlay{padding:5px}.product-cost-report{padding:14px;max-height:98vh}.product-cost-header span{display:block}.product-cost-stats{grid-template-columns:repeat(2,1fr)}.product-cost-stats strong{font-size:18px}.cost-add-code{margin-left:0;flex-wrap:wrap}.cost-add-code input{max-width:100%}}
