/* 병원경영 fin 묶음의 모양. 클래스는 .mgf- 로 시작한다 */
.mg-mod-fin .mg-view table.grid td { white-space: nowrap; }
.mgf-wrap table.grid td, .mgf-wrap table.grid th { white-space: normal; }
table.grid tr.mgf-total td { background: #f1f4f8; font-weight: 700; border-top: 1px solid var(--line); position: sticky; bottom: 0; }
table.grid tr.mgf-warn td { background: #fdf3f1; }
table.grid tr.mgf-next td { background: var(--yellow); }
table.grid tr.mgf-past td { color: var(--muted); }
.mgf-note { flex: 0 0 auto; font-size: 11px; color: var(--muted); padding: 2px 6px; line-height: 1.4; }
.mgf-empty { padding: 12px; }
.mgf-src { font-size: 11px; line-height: 1.6; word-break: break-all; }
.mgf-src a, .mgf-wrap a { color: var(--blue); }
.mgf-kv { table-layout: auto; }
.mgf-kv th { text-align: left; font-weight: 400; }
.mgf-numinp { width: 104px; text-align: right; min-height: 20px; padding: 0 4px; }

/* 묶음 배치: 내용이 모자라면 .mg-body 안에서만 스크롤 */
.mgf-fill { height: 100%; min-height: 0; }
.mgf-grow { flex: 1 1 0; min-height: 200px; }
.mgf-top { flex: 0 0 auto; }
.mgf-top2 { flex: 0 0 auto; max-height: 300px; }
.mgf-cols { display: grid; gap: 6px; min-height: 0; flex: 1 1 auto; }
.mgf-cols-cost { grid-template-columns: minmax(0, 1fr) 480px; min-height: 420px; }
.mgf-cols-one { grid-template-columns: minmax(0, 1fr); min-height: 240px; }
.mgf-cols-vat { grid-template-columns: 500px minmax(0, 1fr); min-height: 240px; }
.mgf-cols-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; flex: 0 0 auto; }
.mgf-cols-two .mgf-grow { flex: 0 0 auto; min-height: 0; }
.mgf-side { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.mgf-cols-cost .mgf-side > .panel { flex: 1 1 0; min-height: 120px; }
.mgf-cols-two .mgf-side > .panel { flex: 0 0 auto; }

/* 가로 막대: 높이 14px, 색 두 가지(파랑, 주황) */
.mgf-barcell { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.mgf-barcell > span { flex: 0 0 auto; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.mgf-bar { flex: 1 1 auto; height: 14px; display: flex; background: #eef1f5; min-width: 40px; }
.mgf-bar i { display: block; height: 14px; background: var(--blue); }
.mgf-bar i.b2 { background: var(--orange); }

/* 구매 화면의 탭 */
.mgf-tabwrap { flex: 1 1 0; min-height: 320px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); }
.mgf-tabs { flex: 1 1 auto; min-height: 0; }
.mgf-tabs > .tabs-body { padding: 0; display: flex; flex-direction: column; }
.mgf-tabpane { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.mgf-toolrow { flex: 0 0 auto; flex-wrap: wrap; padding: 4px 6px; border-bottom: 1px solid var(--line-soft); }
.mgf-tabpane > .mgf-fill { flex: 1 1 0; height: auto; overflow: auto; }
.mgf-tabpane .grid-wrap { border: 0; }
.mgf-cols .grid-wrap, .mgf-top .grid-wrap, .mgf-grow .grid-wrap { border: 0; }
.modal .row > span:first-child { white-space: nowrap; }
