/* 동쪽구름 ERP — 공용 창(winmgr) + 표 열폭 조정(tablecol) 전용 스타일 · 2026-07-29
   ※ 새 파일로 둔 이유: 기존 css 를 건드리지 않아 다른 작업과 충돌하지 않게. 로드 순서상 맨 뒤라 우선한다. */

/* ── 떠 있는 창 ─────────────────────────────────────────────────────────── */
.wm-win{ background:#fff; display:flex; flex-direction:column; }
/* ★닫기(hidden)가 항상 이겨야 한다 — 안 그러면 X 를 눌러도 창이 안 사라진다(260729) */
.wm-win[hidden]{ display:none !important; }
/* 우측 드로어였던 창도 가운데 떠 있는 창이 된다(대표 260729). 헤더 고정 + 본문만 스크롤. */
.wm-win > .dw-head, .wm-win > .ed-head{ position:static; flex:none; }
.wm-win > .dw-body, .wm-win > .ed-body, .wm-win > .modal-body{ flex:1 1 auto; overflow:auto; min-height:0; }
/* 드로어는 원래 창 전체가 스크롤됐다 — 떠 있는 창에서는 본문만 스크롤돼야 헤더가 안 사라진다 */
.wm-win#drawer{ overflow:hidden; }

/* 헤더 버튼(⧉ 새창 · ⤢ 최대화) — 기존 ✕ 왼쪽에 붙는다 */
.wm-btns{ display:inline-flex; gap:2px; margin-left:auto; }
.wm-btns + .x, .wm-btns + .close{ margin-left:4px !important; }
.wm-b{
  width:26px; height:26px; padding:0; line-height:1;
  border:1px solid var(--line); background:#fff; color:#64748b;
  border-radius:7px; cursor:pointer; font-size:13px;
  display:inline-grid; place-items:center;
}
.wm-b:hover{ border-color:var(--blue); color:var(--blue); background:#f3f7ff; }

/* 우하단 크기조절 손잡이 — 18px가 작아 못 찾던 문제(대표 260730): 키우고 진하게 + 호버 강조 */
.wm-grip{
  position:absolute; right:0; bottom:0; width:24px; height:24px;
  cursor:nwse-resize; z-index:7; border-bottom-right-radius:14px;
  background:
    linear-gradient(135deg,transparent 0 40%,#b6c2d4 40% 47%,transparent 47% 100%),
    linear-gradient(135deg,transparent 0 58%,#b6c2d4 58% 65%,transparent 65% 100%),
    linear-gradient(135deg,transparent 0 76%,#b6c2d4 76% 83%,transparent 83% 100%);
}
.wm-grip:hover{
  background:
    linear-gradient(135deg,transparent 0 40%,var(--blue) 40% 47%,transparent 47% 100%),
    linear-gradient(135deg,transparent 0 58%,var(--blue) 58% 65%,transparent 65% 100%),
    linear-gradient(135deg,transparent 0 76%,var(--blue) 76% 83%,transparent 83% 100%);
}
/* 4변(상하좌우) + 4모서리 어디서나 끌어서 크기조절 — 잡으면 파란 표시(대표 260730)
   상단 변은 4px만 써서 헤더 '잡고 이동'과 겹치지 않게, 모서리는 12px 히트존 */
.wm-edge{ position:absolute; z-index:6; }
.wm-edge-e{ top:44px; right:0; width:5px; height:calc(100% - 68px); cursor:ew-resize; }
.wm-edge-w{ top:44px; left:0;  width:5px; height:calc(100% - 68px); cursor:ew-resize; }
.wm-edge-s{ left:14px; bottom:0; height:5px; width:calc(100% - 40px); cursor:ns-resize; }
.wm-edge-n{ left:14px; top:0;    height:4px; width:calc(100% - 40px); cursor:ns-resize; }
.wm-edge-nw{ left:0;  top:0;    width:12px; height:12px; cursor:nwse-resize; }
.wm-edge-ne{ right:0; top:0;    width:12px; height:12px; cursor:nesw-resize; }
.wm-edge-sw{ left:0;  bottom:0; width:12px; height:12px; cursor:nesw-resize; }
.wm-edge:hover{ background:var(--blue); opacity:.35; border-radius:3px; }

/* 새 창(⧉)으로 열렸을 때 — 그 건 하나만 보이게: 목록·본문·사이드바 전부 숨기고 상세가 창 전체(대표 260730) */
body.wm-popup .sidebar{ display:none; }
body.wm-popup #app{ grid-template-columns:1fr !important; }
body.wm-popup .mbar{ display:none; }
body.wm-popup .main{ display:none !important; }
body.wm-popup .scrim, body.wm-popup .msscrim{ display:none !important; }
body.wm-popup #drawer{
  position:fixed !important; inset:0 !important;
  width:auto !important; max-width:none !important; height:auto !important;
  border-radius:0 !important; box-shadow:none !important; border:none !important;
  display:flex; flex-direction:column; overflow:hidden;
}
body.wm-popup #drawer[hidden]{ display:none !important; }
body.wm-popup #drawer > .dw-head{ position:static; flex:none; }
body.wm-popup #drawer > .dw-body{ flex:1 1 auto; overflow:auto; min-height:0; }

/* ── 표 열폭 조정 (엑셀처럼 머리글 경계를 끌어서) ──────────────────────── */
.tc-on{ table-layout:fixed; }                  /* 폭을 사람이 정하면 브라우저 자동배분을 끈다 */
.tc-on th, .tc-on td{ overflow:hidden; text-overflow:ellipsis; }
.tc-on th{ position:relative; }
.tc-grip{
  position:absolute; top:0; right:-3px; width:7px; height:100%;
  cursor:col-resize; z-index:6; user-select:none;
}
.tc-grip::after{ content:""; position:absolute; left:3px; top:20%; height:60%; width:1px; background:transparent; }
.tc-grip:hover::after, .tc-grip.tc-act::after{ background:var(--blue); }
.tc-on th.tc-drag{ background:#eef4fd; }

@media (max-width:900px){
  /* 폰에서는 창·열폭 조정을 쓰지 않는다 — 기존 전체화면·카드 동작 그대로 */
  .wm-grip, .wm-edge, .wm-btns{ display:none !important; }
  .tc-grip{ display:none !important; }
  .tc-on{ table-layout:auto; }
}
