/* 재료 주문서 탭: 원자재값 보기 안의 다른 영역에 영향이 없도록 모든 규칙을 #matSectionOrder 아래로 한정 */
#matSectionOrder *, #matSectionOrder *::before, #matSectionOrder *::after { box-sizing: border-box; }

#matSectionOrder .mo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; min-height: 40px; }
#matSectionOrder .mo-layout { display: grid; grid-template-columns: minmax(520px, 46%) minmax(0, 1fr); gap: 20px; align-items: start; }

#matSectionOrder .mo-form { padding: 20px; display: grid; gap: 14px; }
#matSectionOrder .mo-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#matSectionOrder .mo-form-head h3 { margin: 0; font-size: 18px; font-weight: 900; }
#matSectionOrder .mo-danger { border: 1px solid #ef4444; color: #ef4444; border-radius: 8px; padding: 6px 14px; font-size: 13px; background: #fff; cursor: pointer; font-weight: 700; }
#matSectionOrder .mo-danger:hover { background: #fef2f2; }

#matSectionOrder .mo-field { display: grid; gap: 6px; min-width: 0; }
#matSectionOrder .mo-field[hidden] { display: none; }
#matSectionOrder .mo-label { font-size: 12px; font-weight: 700; color: var(--muted); }
#matSectionOrder input[type="text"],
#matSectionOrder input[type="number"],
#matSectionOrder input[type="date"],
#matSectionOrder select,
#matSectionOrder textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-size: 14px;
}
#matSectionOrder textarea { resize: vertical; min-height: 76px; }
#matSectionOrder input:focus-visible, #matSectionOrder select:focus-visible, #matSectionOrder textarea:focus-visible,
#matSectionOrder button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

#matSectionOrder .mo-items-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
#matSectionOrder .mo-items-head h4 { margin: 0; font-size: 15px; font-weight: 800; }
#matSectionOrder .mo-items { display: grid; gap: 10px; }
#matSectionOrder .mo-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; background: #fafafa; }
#matSectionOrder .mo-item-head { display: flex; align-items: center; justify-content: space-between; }
#matSectionOrder .mo-item-head strong { font-size: 13px; }
#matSectionOrder .mo-item-actions { display: flex; gap: 6px; }
#matSectionOrder .mo-save { color: var(--primary); }

#matSectionOrder .mo-row { display: flex; gap: 8px; align-items: center; }
#matSectionOrder .mo-row input, #matSectionOrder .mo-row select { flex: 1 1 auto; min-width: 0; }
#matSectionOrder .mo-row .button { flex: none; white-space: nowrap; }
#matSectionOrder .mo-box { border: 1px solid var(--line); border-radius: 10px; background: #fafafa; }
#matSectionOrder .mo-box > summary { padding: 10px 12px; font-size: 13px; font-weight: 800; cursor: pointer; list-style-position: inside; }
#matSectionOrder .mo-box > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 10px; }
#matSectionOrder .mo-box-body { padding: 0 12px 12px; display: grid; gap: 10px; }
#matSectionOrder .mo-count { color: var(--muted); font-weight: 700; }
#matSectionOrder .mo-sender-custom { gap: 8px; }
#matSectionOrder .mo-item-remove[hidden] { display: none; }
#matSectionOrder .mo-hint { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
#matSectionOrder .mo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#matSectionOrder .mo-chips:empty { display: none; }
#matSectionOrder .mo-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
#matSectionOrder .mo-chip-name { border: 0; background: none; padding: 4px 4px 4px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
#matSectionOrder .mo-chip-name:hover { color: var(--primary); }
#matSectionOrder .mo-chip-remove { border: 0; background: none; padding: 4px 10px 4px 4px; font-size: 11px; color: var(--muted); cursor: pointer; }
#matSectionOrder .mo-chip-remove:hover { color: #ef4444; }
#matSectionOrder .mo-box button:disabled, #matSectionOrder .mo-row button:disabled { opacity: 0.45; cursor: not-allowed; }
#matSectionOrder .mo-item-remove { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #ef4444; cursor: pointer; white-space: nowrap; flex: none; }
#matSectionOrder .mo-item-remove:disabled { color: var(--muted); cursor: not-allowed; }
#matSectionOrder .mo-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#matSectionOrder .mo-input-wrap { position: relative; display: block; }
#matSectionOrder .mo-input-wrap input { padding-right: 32px; }
#matSectionOrder .mo-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--muted); pointer-events: none; }

#matSectionOrder .mo-preview-col { min-width: 0; }
#matSectionOrder .mo-preview { width: 100%; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); background: #ffffff; }
#matSectionOrder .mo-preview-host { transform-origin: top left; width: 794px; }
#matSectionOrder .mo-preview-host > div { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 18px rgba(0, 0, 0, 0.1); }
#matSectionOrder .mo-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
#matSectionOrder .mo-status { margin: 0; font-size: 13px; font-weight: 700; color: #ef4444; }
#matSectionOrder .mo-status.ok { color: #16a34a; }

@media (max-width: 1100px) {
  #matSectionOrder .mo-layout { grid-template-columns: 1fr; }
}
