/* 한방 메인 창(TF_MAIN) + 계약관리 목록(TFRAME_CONT) 재현. 배치는 한방 화면(2026-10-18 확인)과 DFM 기준, 색은 녹색 계열로 살짝 바꿈. */
#mwin { height: 100vh; display: flex; flex-direction: column; background: var(--face); min-width: 1150px; }
/* ── 위 큰 메뉴(pnl3) ── */
#mtop { flex: none; height: 62px; display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: linear-gradient(#1f3a33, #14261f); }
.mtile { height: 50px; min-width: 128px; padding: 0 14px; border: 1px solid #0d1a15; border-radius: 6px; cursor: pointer;
  background: linear-gradient(#3c6a5c, #23473c); color: #fff; font: 800 21px var(--nanumx); letter-spacing: -.5px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.mtile:hover { filter: brightness(1.12); }
.mtile.on { background: linear-gradient(#f5a04a, #e07a1c); border-color: #9a4d00; }
.mtile.etc { min-width: 128px; font-size: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 3px; padding: 4px 8px; align-content: center; }
.mtile.etc b { grid-column: 1 / 3; font: 800 16px var(--nanumx); }
.mtile.etc span { background: #1a3a30; border-radius: 2px; font: bold 10px var(--dotum); padding: 1px 0; }
.mtile.manual { font-size: 15px; line-height: 1.15; }
.mtile.gray { background: linear-gradient(#6f7f79, #4a5853); min-width: 74px; }
.mtile.sh { min-width: 80px; background: linear-gradient(#8fd06a, #5aa23c); color: #123; font-size: 14px; line-height: 1.15; }
#mtop .msp { flex: 1; }
#mtop .mclock { color: #cfe8dc; font: bold 13px var(--nanum); text-align: right; white-space: nowrap; }
/* ── 두 번째 줄 링크 단추(pnl2) ── */
#mlinks { flex: none; height: 26px; display: flex; align-items: center; gap: 4px; padding: 0 6px; background: #2f3b37; overflow: hidden; }
.mlink { height: 20px; padding: 0 7px; border: 1px solid transparent; border-radius: 2px; background: none; color: #fff; font: bold 12px var(--nanum); cursor: pointer; white-space: nowrap; }
.mlink:hover { border-color: #9fc7b5; }
.mlink.c-purple { background: #7b3fb5; } .mlink.c-blue { background: #2a62c9; } .mlink.c-red { background: #c42c2c; } .mlink.c-pink { background: #c43d9a; }
.mlink.c-yellow { background: #f7d43c; color: #111; } .mlink.c-sky { background: #2f9ad8; }
.mlink .dd { font-size: 9px; margin-left: 2px; }
.mdrop { position: fixed; z-index: 40; background: #fff; border: 1px solid #7a8c84; box-shadow: 2px 3px 8px rgba(0,0,0,.3); padding: 3px 0; max-height: 70vh; overflow-y: auto; min-width: 280px; }
.mdrop div { padding: 4px 14px; font: 13px var(--nanum); cursor: pointer; white-space: nowrap; }
.mdrop div:hover { background: #e3f2ea; }
.mdrop .sub { padding-left: 26px; color: #333; font-size: 12px; }
/* ── 본문 ── */
#mbody { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; }
#mbody > iframe { flex: 1; border: 0; width: 100%; }
/* 계약관리: 위 검색·단추(DFM 139px) / 표 / 아래 조회건수 */
#clist-top { position: relative; flex: none; height: 139px; overflow: hidden; }
#clist-top .dfm-btn { white-space: nowrap; font: bold 12px var(--nanum); }
.cb-blue { background: #2a62c9 !important; color: #fff; border-color: #1b4592 !important; }
.cb-dark { background: #3c4a46 !important; color: #fff; border-color: #222 !important; }
.cb-red { background: #c42c2c !important; color: #fff; border-color: #8c1a1a !important; }
.cb-orange { background: linear-gradient(#f5a04a, #e07a1c) !important; color: #fff; border-color: #9a4d00 !important; font-size: 14px !important; }
.cb-hub { background: #bff5d7 !important; border: 2px solid #18a659 !important; color: #0b6a35; font: 800 15px/1.15 var(--nanumx) !important; white-space: normal !important; border-radius: 6px !important; }
.cb-link { background: none !important; border: 0 !important; color: #222; font-size: 11px !important; text-decoration: underline; }
#clist-grid { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid #8aa; }
/* 목록 글자: 나이 드신 분들도 잘 보이게 한방보다 조금 크고 두껍게(2026-10-18 요청) */
#clist-grid table { border-collapse: collapse; font: 600 14px 'Malgun Gothic', var(--nanum); color: #111; white-space: nowrap; }
#clist-grid th { position: sticky; top: 0; z-index: 1; background: #2e6fae; color: #fff; font: bold 13px 'Malgun Gothic', var(--nanum); padding: 6px 8px; border: 1px solid #5b8fc4; }
#clist-grid td { padding: 4px 8px; border: 1px solid #dde3e0; height: 31px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
#clist-grid tbody tr { cursor: default; }
#clist-grid tbody tr:nth-child(even) { background: #f4f9f6; }
#clist-grid tbody tr.done { background: #fff1f1; }
#clist-grid tbody tr.sel { background: #cfe6ff !important; }
#clist-grid td.g-date { color: #d01010; text-align: center; }
#clist-grid td.g-num { text-align: right; }
#clist-grid td.g-c { text-align: center; }
#clist-grid th.sorted::after { content: ' ▲'; font-size: 9px; }
#clist-grid th.sorted.desc::after { content: ' ▼'; }
#clist-grid .empty td { text-align: center; color: #666; padding: 30px; }
#clist-bottom { flex: none; height: 28px; display: flex; align-items: center; gap: 12px; padding: 0 8px; background: #e7efeb; border-top: 1px solid #a9bdb3; font: bold 13px var(--nanum); }
#clist-bottom .sp { flex: 1; }
#clist-bottom .sw { display: inline-block; width: 36px; height: 18px; border: 1px solid #999; vertical-align: middle; margin-left: 4px; }
#clist-bottom button { height: 23px; border: 1px solid #c42c2c; color: #c42c2c; background: #fff0f0; font: bold 12px var(--nanum); cursor: pointer; padding: 0 10px; }
/* 선택보기설정(열 고르기) */
.colpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px; padding: 14px 18px; background: #fff; font: 13px var(--nanum); }
.colpick label { display: flex; gap: 5px; align-items: center; }
/* 일괄 완료/미완료(pnl_comp) */
.comp-box { padding: 16px 20px; background: #fff; font: bold 14px var(--nanum); display: flex; gap: 22px; justify-content: center; }

/* ── 매물관리(TFrame_Mamul)·고객관리(TFrame_Custom) 공통 ── */
.ml { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; font: 13px var(--nanum); }
.ml-tabs { flex: none; display: flex; gap: 8px; padding: 6px 8px; background: #e2ebe6; border-bottom: 1px solid #b9cdc2; }
.ml-tabs button { min-width: 120px; height: 30px; border: 1px solid #9ab; border-radius: 4px; background: #fff; font: bold 15px var(--nanum); cursor: pointer; }
.ml-tabs button.on { background: linear-gradient(#3c6a5c, #23473c); color: #fff; border-color: #14261f; }
.ml-sch { flex: none; position: relative; padding: 6px 300px 6px 8px; background: #f3f8f5; border-bottom: 1px solid #b9cdc2; min-height: 110px; }
.ml-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; }
.ml-row select, .ml-row input[type=text] { height: 24px; border: 1px solid #8aa; font: 13px var(--nanum); padding: 0 3px; background: #fff; }
.ml-row .lab { font: bold 13px var(--nanum); color: #123; }
/* 공동중개망(전국망·지역망) 안내 줄 */
.ml-net { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: #eef4fb; border-bottom: 1px solid #b7c9e2; font: 12px var(--nanum); color: #234; }
.ml-net b { color: #1b4592; font-size: 13px; white-space: nowrap; }
.ml-net span { flex: 1; min-width: 0; }
.ml-net .warn { flex: none; color: #a33; }
.ml-net .mb { flex: none; }
/* 말로 찾기(HBNLQ) — 검색 줄 맨 위. 단추·지우기는 줄어들지 않고, 알아들은 조건 글만 줄임표로 */
.ml-row.ml-ai { margin-bottom: 3px; padding-bottom: 4px; border-bottom: 1px dashed #b9cdc2; flex-wrap: nowrap; }
.ml-row.ml-ai > .lab { flex: none; white-space: nowrap; }
.ml-row.ml-ai input[type=text] { flex: 0 1 360px; min-width: 160px; height: 26px; border-color: #3a8a5f; }
.ml-row.ml-ai .ai-go { flex: none; width: auto; white-space: nowrap; height: 26px; padding: 0 14px; background: linear-gradient(#5fc07f, #2e8d52); color: #fff; border: 1px solid #1f6b3a; font: bold 13px var(--nanum); cursor: pointer; }
.ml-row.ml-ai .ai-out { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 5px; font: 12px var(--nanum); color: #234; }
.ml-row.ml-ai .ai-out .ai-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-row.ml-ai .ai-src { flex: none; padding: 0 6px; border-radius: 8px; background: #2f62c0; color: #fff; font-size: 11px; line-height: 17px; }
.ml-row.ml-ai .ai-note { color: #a33; }
.ml-row.ml-ai .ai-out .mini { flex: none; white-space: nowrap; width: auto; height: 22px; padding: 0 8px; font: 12px var(--nanum); }
.ml-row .ck { display: inline-flex; gap: 3px; align-items: center; font: 13px var(--nanum); white-space: nowrap; }
.ml-row .note { font: 12px var(--nanum); color: #333; margin-left: 6px; }
.ml-row fieldset { display: inline-flex; gap: 8px; border: 1px solid #9ab; padding: 0 6px 2px; margin: 0; }
.ml-row legend { font: 11px var(--nanum); color: #1f6b4a; padding: 0 2px; }
.ml-row .mini { width: 22px; height: 22px; border: 1px solid #8aa; background: #fff; cursor: pointer; }
.ml-right { position: absolute; right: 8px; top: 6px; display: grid; grid-template-columns: repeat(3, 90px); gap: 5px; }
.ml-right .big { height: 46px; border: 1px solid #333; border-radius: 4px; font: bold 13px/1.2 var(--nanum); white-space: pre-line; cursor: pointer; color: #fff; }
.ml-right .orange { background: linear-gradient(#f5a04a, #e07a1c); } .ml-right .dark { background: #3c4a46; }
.ml-right .hub { background: #bff5d7; color: #0b6a35; border: 2px solid #18a659; } .ml-right .white { background: #fff; color: #234; } .ml-right .purple { background: #6b5cf0; }
.ml-btns { flex: none; display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: #fff; border-bottom: 1px solid #dde; }
.ml-btns.small { background: #f3f3f3; }
.ml-btns .sp { flex: 1; }
.ml-btns .mb { height: 28px; padding: 0 12px; border: 1px solid #556; border-radius: 3px; background: linear-gradient(#fff, #e3e9e6); font: bold 13px var(--nanum); cursor: pointer; white-space: nowrap; }
.ml-btns.small .mb { height: 24px; font-size: 12px; padding: 0 9px; }
.ml-btns .mb.green { background: linear-gradient(#5fc07f, #2e8d52); color: #fff; border-color: #1f6b3a; }
.ml-btns .mb.blue { background: linear-gradient(#5b8fe0, #2f62c0); color: #fff; border-color: #1b4592; }
.ml-btns .mb.orange { background: linear-gradient(#f5a04a, #e07a1c); color: #fff; border-color: #9a4d00; }
.ml-btns .mb.red { background: linear-gradient(#e65a5a, #b82a2a); color: #fff; border-color: #7a1a1a; }
.ml-btns .mb.dark { background: #3c4a46; color: #fff; }
#ml-grid, #mc-grid { flex: 1; min-height: 0; overflow: auto; }
#ml-grid table, #mc-grid table { border-collapse: collapse; font: 600 14px 'Malgun Gothic', var(--nanum); color: #111; white-space: nowrap; }
#ml-grid th, #mc-grid th { position: sticky; top: 0; z-index: 1; background: #2e6fae; color: #fff; font: bold 13px 'Malgun Gothic', var(--nanum); padding: 6px 8px; border: 1px solid #5b8fc4; cursor: pointer; }
#ml-grid td, #mc-grid td { padding: 4px 8px; border: 1px solid #dde3e0; height: 31px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
#ml-grid tbody tr:nth-child(even), #mc-grid tbody tr:nth-child(even) { background: #f4f9f6; }
#ml-grid tbody tr.done { background: #fff1f1; }
#ml-grid tbody tr.sel, #mc-grid tbody tr.sel { background: #cfe6ff !important; }
#ml-grid td.g-num, #mc-grid td.g-num { text-align: right; } #ml-grid td.g-c, #mc-grid td.g-c { text-align: center; }
#ml-grid td.g-red { color: #d01010; }
#ml-grid th.sorted::after, #mc-grid th.sorted::after { content: ' ▲'; font-size: 9px; }
#ml-grid th.sorted.desc::after, #mc-grid th.sorted.desc::after { content: ' ▼'; }
#ml-grid .empty td, #mc-grid .empty td { text-align: center; color: #666; padding: 30px; }
.badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font: bold 11px var(--nanum); color: #fff; }
.b-open { background: #2e8d52; } .b-done { background: #c42c2c; } .b-close { background: #5b8a3a; }
.ml-foot { flex: none; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: #e7efeb; border-top: 1px solid #a9bdb3; font: bold 13px var(--nanum); }
.ml-foot .mb { height: 22px; padding: 0 8px; border: 1px solid #556; border-radius: 2px; background: #fff; font: bold 12px var(--nanum); cursor: pointer; }
.ml-foot .mb.blue { background: #2f62c0; color: #fff; }
.ml-foot .ck { display: inline-flex; gap: 3px; align-items: center; }
/* 고객관리: 초성 탭, 아래 메모·거래내역 */
.mc-chosung { flex: none; display: flex; gap: 2px; padding: 4px 8px 0; background: #fff; border-bottom: 2px solid #2e8d52; }
.mc-chosung button { min-width: 44px; height: 24px; border: 1px solid #9ab; border-bottom: 0; border-radius: 4px 4px 0 0; background: #f0f4f2; font: bold 13px var(--nanum); cursor: pointer; }
.mc-chosung button.on { background: #2e8d52; color: #fff; }
.mc-info { flex: none; height: 115px; display: flex; border-top: 1px solid #a9bdb3; background: #f3f8f5; }
.mc-info .memo { width: 322px; padding: 4px 6px; }
.mc-info .memo b { font: bold 10px var(--dotum); color: #fff; background: #2e6fae; padding: 1px 4px; }
.mc-info textarea { width: 306px; height: 86px; min-height: 86px; margin-top: 3px; border: 1px solid #8aa; font: 13px var(--nanum); resize: vertical; }
.mc-info .deals { flex: 1; display: flex; flex-direction: column; border-left: 1px solid #a9bdb3; }
.mc-info .deals > b { height: 18px; background: #2e6fae; color: #fff; text-align: center; font: bold 12px var(--nanum); }
.mc-info .deals > div { flex: 1; overflow: auto; font: 13px var(--nanum); padding: 2px 6px; white-space: normal; text-align: left; }

/* 열 너비 끌기(엑셀처럼) */
#clist-grid th, #ml-grid th, #mc-grid th { box-sizing: border-box; }
.col-rz { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 3; }
.col-rz:hover { background: rgba(255,255,255,.35); }
table.rz-fixed { table-layout: fixed; }
table.rz-fixed th, table.rz-fixed td { max-width: none !important; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
/* 계약관리 위 날짜칸: 한방(TAdvDateEdit)처럼 ▦ 단추를 칸 폭 안에 둔다 — 밖으로 나가면 '~'·'조회조건' 글자를 덮는다 */
#clist-top .dfm-date .dfm-ed { width: calc(100% - 20px); }
#clist-top .dfm-date button { left: calc(100% - 20px); }
/* 계약관리 위 버튼 가독성: 어두운 바탕(진회색·파랑·빨강)엔 흰 글씨, 글씨는 조금 크고 굵게(나이 드신 사용자 기준) */
#clist-top .dfm-btn { font-weight: 700 !important; font-size: 12.5px !important; letter-spacing: -0.3px; }
.dfm-btn.cb-dark, .dfm-btn.cb-blue, .dfm-btn.cb-red { color: #fff !important; } /* 한방 원본 글자색(검정)이 어두운 바탕에서 안 보임 */
.dfm-btn.cb-orange { color: #fff !important; font-size: 15px !important; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
#clist-top .dfm-btn.cb-link { font-size: 12px !important; color: #123 !important; }
