/* 병원경영 hr 묶음의 모양. 클래스는 .mgh- 로 시작한다. 글자 12px, 줄 24px 안팎, 모서리 반경 0, 그림자 없음 */
.mgh-body { overflow: auto; }
/* manage_biz.css 의 `.mg-body > * { flex: 0 0 auto }` 가 모든 묶음 화면에 걸리므로, 몸통 바로 아래 칸은 .mgh-body > 로 더 구체적으로 쓴다 */
.mgh-body > .mgh-split { flex: 1 1 0; min-height: 0; }
.mgh-body > .panel.grow, .mgh-body > .mgh-bottom { flex: 1 1 0; min-height: 0; }
.mgh-body > .panel.mgh-top { flex: 0 0 42%; min-height: 150px; }
.mgh-body > .mgh-host { flex: 1 1 0; min-height: 0; }
.mgh-host { position: relative; }
.mgh-split { min-height: 0; min-width: 0; display: flex; gap: 6px; }
.mgh-col { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; flex: 1 1 0; }
.mgh-left { flex: 1 1 0; }
.mgh-right { flex: 0 0 640px; }
.mgh-narrow { flex: 0 0 390px; }
.mgh-small { font-size: 11px; line-height: 1.3; }
.mgh-mid { flex: 0 0 600px; }
.mgh-wide { flex: 1 1 0; }
.mgh-bottom { position: relative; display: flex; flex-direction: column; }
.mgh-recruit { flex: 0 0 150px; }
.mgh-body .panel.flush > .panel-body { position: relative; }

/* 표를 묶음 안에 꽉 채우는 자리: 묶음 몸통 안에서는 몸통을 채우고, 열 안에서는 남은 높이를 채운다 */
.mgh-fill { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: absolute; inset: 0; }
.mgh-col > .mgh-fill { position: relative; inset: auto; flex: 1 1 0; }
.mgh-fill > .grid-wrap { flex: 1 1 0; height: auto !important; min-height: 0; border: 0; }
.mgh-fill > .mgh-split { flex: 1 1 0; padding: 0; }
.mgh-fill > .tabs { flex: 1 1 0; min-height: 0; }
.mgh-fill > .mgh-card { flex: 1 1 0; min-height: 0; }
.mgh-body table.grid td { white-space: nowrap; }
.mgh-body table.grid tr.mgh-late td { background: #fdf3f1; }
.mgh-body .mgh-wrap table.grid td { white-space: normal; }

.mgh-tabs .tabs-body { display: flex; flex-direction: column; padding: 0; }
.mgh-tabs .tabs-body > * { flex: 1 1 0; min-height: 0; }
.mgh-card { overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.mgh-card > * { flex: 0 0 auto; }
.mgh-sub { font-weight: 700; padding: 3px 6px; background: #f1f4f8; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.mgh-basis { color: var(--muted); font-size: 11px; line-height: 1.45; padding: 2px 6px; flex: 0 0 auto; }
.mgh-pad { padding: 8px; }
.mgh-bar { padding: 4px 6px; flex: 0 0 auto; border-bottom: 1px solid var(--line-soft); }
.mgh-actions { padding-top: 2px; }
.mgh-sign { height: 56px; border: 1px solid var(--line-soft); background: #fff; }
.mgh-kv { width: 100%; }
.mgh-kv th { width: 38%; text-align: left; }
.mgh-valrow { flex: 0 0 auto; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 6px; }
.mgh-values { max-height: 210px; }
.mgh-values .panel-body { padding: 0; overflow: auto; }
.mgh-att { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 10px; max-height: 150px; overflow: auto; border: 1px solid var(--line-soft); padding: 4px 6px; }
.mgh-doc { max-height: 66vh; overflow: auto; padding: 6px 10px; line-height: 1.6; }
.mgh-doc h1 { font-size: 18px; text-align: center; letter-spacing: 6px; margin: 4px 0 12px; }
.mgh-doc table { border-collapse: collapse; width: 100%; }
.mgh-doc th, .mgh-doc td { border: 1px solid var(--line); padding: 3px 7px; vertical-align: top; }
.mgh-doc th { background: #f1f4f8; font-weight: 400; white-space: nowrap; text-align: center; }
.mgh-doc .sign { margin-top: 18px; text-align: right; line-height: 2; }
.mgh-doc .small { font-size: 11px; color: var(--muted); }

/* 의무 달력(달별 보기) */
.mgh-calwrap { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; }
.mgh-cal { flex: 1 1 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 22px repeat(6, minmax(0, 1fr)); border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); background: #fff; min-height: 0; }
.mgh-cal-dow { text-align: center; background: #eef1f6; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); line-height: 21px; }
.mgh-cal-dow.sun, .mgh-cal-day.sun .mgh-cal-num { color: var(--red); }
.mgh-cal-dow.sat { color: var(--blue); }
.mgh-cal-day { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 1px 3px; overflow: hidden; cursor: pointer; min-width: 0; min-height: 0; }
.mgh-cal-day:hover { background: var(--hover); }
.mgh-cal-day.out { background: #f7f8fa; color: #a9b0bc; }
.mgh-cal-day.today { outline: 2px solid var(--blue); outline-offset: -2px; }
.mgh-cal-day.on { background: var(--sel); }
.mgh-cal-num { font-weight: 700; line-height: 16px; }
.mgh-chip { font-size: 11px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgh-chip.more { color: var(--muted); }
.mgh-s-지남 { color: var(--red); font-weight: 700; }
.mgh-s-임박 { color: var(--orange); font-weight: 700; }
.mgh-s-예정 { color: var(--text); }
.mgh-s-끝냄 { color: var(--green); }
.mgh-s-해당없음 { color: var(--muted); text-decoration: line-through; }
.mgh-sidepane { flex: 0 0 430px; }

/* 내 서류: 한 화면에 여섯 묶음 */
.mgh-mygrid { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mgh-mygrid > .panel { min-height: 0; }
