/* Work registration only: don't affect quotation and edit-modal grids. */
#workForm .line-items{container-type:inline-size;min-width:0}
#workForm .line-head{display:none}
#lineItems{display:grid;gap:12px;min-width:0}
#lineItems .line-item{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px;
  grid-template-areas:"type quantity remove" "name name name" "unit labor labor" "part total total" "cost cost cost";
  align-items:end;gap:10px;padding:14px;margin:0;
  border:1px solid var(--line);border-radius:14px;background:#fff;
}
#lineItems .line-item>*{min-width:0;max-width:100%;margin:0}
#lineItems .item-type{grid-area:type}
#lineItems .name{grid-area:name}
#lineItems .quantity{grid-area:quantity;text-align:center}
#lineItems .unit-wrap{grid-area:unit}
#lineItems .labor-wrap{grid-area:labor}
#lineItems .cost-wrap{grid-area:cost}
#lineItems .part-total{grid-area:part}
#lineItems .line-total{grid-area:total}
#lineItems .remove-line{grid-area:remove;width:48px;height:48px;align-self:end}
#lineItems input,#lineItems select{width:100%;height:48px;font-size:14px}
#lineItems .money-input input{text-align:right;padding-right:29px}
#lineItems .money-input span{top:auto;bottom:16px;right:11px;line-height:16px}
#lineItems .money-input:before{display:block;margin:0 0 6px;font-size:11px;line-height:16px}
#lineItems .part-total,#lineItems .line-total{min-height:48px;gap:6px;flex-wrap:wrap;overflow-wrap:anywhere}
#lineItems .part-total:before,#lineItems .line-total:before{display:block}
#lineItems .part-total:before{content:"부품계"}
#lineItems .line-total:before{content:"총금액"}
#workForm #addLine{margin-top:12px;min-height:48px}
/* Use the actual form width: a wide screen may still have a narrow sidebar form. */
@container (min-width:940px){
  #workForm .line-head,#lineItems .line-item{grid-template-columns:82px minmax(180px,1fr) 62px repeat(5,minmax(88px,.55fr)) 48px;gap:8px}
  #workForm .line-head{display:grid;padding:0 10px 8px;align-items:center;font-size:11px}
  #lineItems{gap:8px}
  #lineItems .line-item{grid-template-areas:"type name quantity unit part labor total cost remove";align-items:center;padding:10px;background:#f9fbfe}
  #lineItems .money-input:before,#lineItems .part-total:before,#lineItems .line-total:before{display:none}
  #lineItems .part-total,#lineItems .line-total{flex-wrap:nowrap;padding:0 8px}
  #lineItems .cost-wrap input{background:#fff}
}
