/* Scoped desktop layout; leave existing mobile media rules unchanged. */
@media (min-width: 901px) {
  body.factory-cost-page { overflow-y:auto; }
  body.factory-cost-page .app { height:auto; min-height:calc(100vh / var(--page-zoom)); overflow:visible; align-items:start; }
  body.factory-cost-page .workspace { height:auto; min-height:calc(100vh / var(--page-zoom)); overflow:visible; grid-template-rows:auto auto auto auto auto; }
  body.factory-cost-page #content.panel { display:block; overflow:visible; }
  body.factory-cost-page #content > .table-wrap { flex:none; height:auto; max-height:none; overflow-x:auto; }
}
.factory-cost-analysis { padding:16px; border-bottom:1px solid var(--line); }
.factory-cost-analysis h2 { font-size:17px; margin:0; }
.factory-cost-analysis h3 { font-size:14px; margin:0; }
.fca-heading,.fca-filters { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:0 0 12px; }
.fca-filters { justify-content:flex-start; }
.fca-filters label { display:flex; align-items:center; gap:6px; }
.fca-filters input { width:90px; }
.fca-filters select { width:auto; min-width:90px; }
.factory-cost-analysis button { cursor:pointer; padding:6px 10px; border:1px solid var(--line); background:var(--panel); color:var(--text); border-radius:5px; }
.factory-cost-analysis button:disabled { opacity:.5; cursor:default; }
.factory-cost-analysis .fca-amount { color:var(--primary); text-decoration:underline; text-underline-offset:3px; border:0; background:transparent; font-variant-numeric:tabular-nums; }
.factory-cost-analysis button:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.fca-table { overflow-x:auto; height:auto; max-height:none; }
.fca-table table { min-width:850px; }
.fca-table td { vertical-align:top; }
.fca-detail { margin-top:16px; border-top:2px solid var(--line); padding-top:16px; }
.fca-detail table { min-width:1200px; }
.fca-detail details { min-width:190px; overflow-wrap:anywhere; }
.fca-note { font-size:12px; color:var(--muted); margin:8px 0; }
.fca-disclaimer,.fca-legacy { background:var(--panel-soft); padding:10px; }
.fca-warning { padding:10px; background:var(--panel-soft); color:var(--red); border-left:3px solid var(--red); }
.factory-legacy-note { padding:8px 12px; color:var(--muted); background:var(--panel-soft); font-size:12px; }
.fca-pending-reminder{display:flex;align-items:center;justify-content:space-between;gap:12px}.fca-pending-price{color:#a35c00;font-weight:700}
