/* 자재 처리 기록만 적용. 기존 업무 표·인쇄 배치는 유지한다. */
@media screen{
  #dlgMaterialRecords{width:min(900px,calc(100vw - 24px));max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);padding:0;}
  #dlgMaterialRecords>.dlg{display:flex;flex-direction:column;max-height:inherit;}
  #dlgMaterialRecords .dlg-body{overflow:auto;min-height:0;}
  .mr-search{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);}
  .mr-search input{flex:1;min-width:0;}
  #mrList{max-height:220px;overflow:auto;border-block:1px solid var(--ui-border);}
  .mr-record{display:grid;grid-template-columns:1fr auto;gap:var(--space-1) var(--space-3);width:100%;text-align:left;padding:var(--space-2);background:var(--ui-surface);color:var(--ui-text);border:0;border-bottom:1px solid var(--ui-border);border-radius:0;white-space:normal;overflow-wrap:anywhere;}
  .mr-record:hover{background:var(--ui-hover);}
  .mr-record.is-selected{background:var(--ui-selected);}
  .mr-record:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px;}
  #mrEditor{margin-top:var(--space-4);}
  #mrOriginal div,#mrPreview div{padding-block:var(--space-1);overflow-wrap:anywhere;}
  .mr-fields{display:flex;gap:var(--space-3);align-items:end;flex-wrap:wrap;}
  .mr-fields label{display:flex;flex-direction:column;gap:var(--space-1);}
  .mr-fields label:last-child{flex:1;}
  #mrQty{width:140px;}
  .mr-actions{display:flex;gap:var(--space-2);flex-wrap:wrap;}
  #mrPreview{margin-top:var(--space-3);border-top:1px solid var(--ui-border);padding-top:var(--space-2);}
  #mrStatus{color:var(--ui-error);overflow-wrap:anywhere;}
  #issView>[data-material-records],#recvView>[data-material-records]{float:right;margin-bottom:var(--space-2);}
}
@media screen and (max-width:767px){
  #dlgMaterialRecords{width:calc(100vw - 16px);height:auto;max-width:none;max-height:calc(var(--mobile-viewport-height,100dvh) - 16px);margin:auto;}
  #dlgMaterialRecords input{font-size:var(--text-input-touch);min-height:var(--control-touch);}
  #dlgMaterialRecords button{min-height:var(--control-touch);}
  .mr-record{grid-template-columns:1fr;}
  .mr-fields{display:grid;grid-template-columns:1fr;}
  .mr-fields input,#mrQty{width:100%;box-sizing:border-box;}
}
