/* 병원경영 mail 묶음의 모양. 클래스는 .mgm- 로 시작한다. 글자 12px, 줄 24px, 모서리 반경 0, 그림자 없음.
   모든 규칙은 .mg-mod-mail 아래로 한정한다(다른 묶음 css 의 `.mg-body > *` 규칙과 부딪히지 않게). */
.mg-mod-mail .mg-body { overflow: hidden; }
.mg-mod-mail .mg-body > .mgm-wrap { flex: 1 1 0; min-height: 0; }
.mgm-wrap { display: grid; grid-template-columns: 160px minmax(0, 1.15fr) minmax(0, 1fr); gap: 6px; min-height: 0; min-width: 0; }
.mgm-wrap > * { min-height: 0; min-width: 0; }
.mgm-left { display: flex; flex-direction: column; gap: 6px; }

/* 편지함 목록 */
.mgm-folder { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 24px; border: 1px solid transparent; background: none; padding: 0 6px; text-align: left; cursor: pointer; white-space: nowrap; }
.mgm-folder:hover { background: var(--hover); }
.mgm-folder.on { background: var(--blue-soft); border-color: #a9c0e6; font-weight: 700; }
.mgm-cnt { color: var(--muted); font-size: 11px; }
.mgm-cnt.new { color: var(--blue); font-weight: 700; }
.mgm-sep { border-top: 1px solid var(--line-soft); margin: 3px 0; }
.mgm-link { font-size: 11px; line-height: 1.4; padding: 2px 6px; color: var(--muted); }
.mgm-link b { color: var(--text); }

/* 표를 칸에 꽉 채우기 */
.mgm-wrap .panel-body { position: relative; }
.mgm-fill { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.mgm-fill > .grid-wrap { flex: 1 1 0; height: auto !important; min-height: 0; border: 0; }
.mgm-list table.grid td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; height: 24px; padding-top: 2px; padding-bottom: 2px; }
.mgm-list table.grid td.mgm-c { max-width: none; }
.mgm-list table.grid tr.mgm-unread td { font-weight: 700; background: #f7f9fd; }
.mgm-list table.grid tr.mgm-unread.sel td { background: var(--sel); }
.mgm-list input[type=checkbox] { margin: 0; vertical-align: middle; }
.mgm-bar { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.mgm-bar .inp { width: 160px; }

/* 읽기 */
.mgm-empty { color: var(--muted); text-align: center; padding: 40px 10px; }
.mgm-fill > .mgm-rpane { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.mgm-left > .panel { flex: 0 0 auto; }
.mgm-subject { font-weight: 700; font-size: 13px; padding: 6px 8px 4px; word-break: break-all; flex: 0 0 auto; }
.mgm-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--line-soft); flex: 0 0 auto; }
.mgm-meta > * { padding: 2px 8px; min-height: 24px; line-height: 20px; border-bottom: 1px solid var(--line-soft); word-break: break-all; }
.mgm-meta > .l { color: #3a4352; white-space: nowrap; background: #f6f8fb; border-right: 1px solid var(--line-soft); }
.mgm-note { font-size: 11px; color: var(--muted); }
.mgm-text { white-space: pre-wrap; word-break: break-all; font-size: 12px; line-height: 1.5; padding: 8px; flex: 1 1 0; min-height: 0; overflow: auto; }

/* 쓰기 */
.mgm-cf { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 4px 6px; padding: 6px; align-items: center; flex: 0 0 auto; }
.mgm-cf .lbl { white-space: nowrap; }
.mgm-cf .span2 { grid-column: span 2; }
.mgm-cbody { flex: 1 1 0; min-height: 0; display: flex; padding: 0 6px; }
.mgm-cbody textarea { width: 100%; height: 100%; resize: none; line-height: 1.5; }
.mgm-cfoot { display: flex; align-items: center; gap: 6px; padding: 6px; flex: 0 0 auto; border-top: 1px solid var(--line-soft); margin-top: 6px; }
.mgm-cfoot .grow { flex: 1 1 auto; }
.mgm-book { max-height: 360px; overflow: auto; }
