/*
 * ================================================================
 * core/ui-kit/col-width.css
 * ----------------------------------------------------------------
 * ★★★★★ 표 칸 폭 고정 · 손으로 조절 · '…' 칸 전체 글자 상자(사장님 지시 2026-11-24 · CLAUDE.md §10-395).
 * 계산·저장은 `col-widths.js`, 전체 글자 상자는 `cell-peek.js`. `ui-kit.css` 가 크기 문턱(80KB)에 닿아 따로 뗐다(§12).
 * 본창(index.html)·새 창(form.html) 둘 다 불러온다.
 * ================================================================
 */
/* ★★★★★ 칸 폭 고정 · 손으로 조절(사장님 지시 2026-11-24 · §10-395 · 계산은 `col-widths.js` 한 벌).
   표가 폭을 `<col>` 에 못박는다 — 스크롤로 다른 줄이 그려져도 칸 폭이 안 바뀐다. 폭보다 긴 글자는 '…'
   (마우스를 올리면 전체 — `cell-peek.js`). 손잡이는 머리칸 오른쪽 끝 7px(끌기 · 두 번 누르면 내용에 맞춤). */
.uik-table.uik-fixed { table-layout: fixed; }
.uik-table.uik-fixed th, .uik-table.uik-fixed td { overflow: hidden; text-overflow: ellipsis; }
/* 체크 · 펼침 · 끌기 · 관리 칸은 글자 칸이 아니다 — '…'를 붙이지 않는다(좁은 칸에 점이 끼어 보였다 · 실측) */
.uik-table.uik-fixed :is(th.uik-th-select, td.uik-td-select, th.uik-th-caret, td.uik-td-caret, th.uik-th-roworder, td.uik-td-roworder, th.uik-th-actions, td.uik-td-actions) { text-overflow: clip; }
.uik-col-grip { position: absolute; top: 0; right: 0; width: 7px; height: 100%; cursor: col-resize; z-index: 3; touch-action: none; }
.uik-col-grip::after { content: ''; position: absolute; top: 22%; bottom: 22%; right: 2px; width: 2px; border-radius: 1px; background: transparent; transition: background var(--transition); }
.uik-table thead th:hover .uik-col-grip::after { background: var(--border-strong); }
.uik-col-grip:hover::after, .uik-col-grip.uik-grip-on::after { background: var(--accent); }
body.uik-col-resizing, body.uik-col-resizing * { cursor: col-resize !important; user-select: none; }
/* 마우스를 올리면 보이는 전체 글자 — 끌어서 고르고 복사할 수 있다(사장님 확정 · `cell-peek.js`) */
.uik-peek { position: fixed; z-index: var(--z-modal); box-sizing: border-box; max-width: min(560px, 92vw); max-height: 50vh; overflow: auto;
  padding: 6px 10px; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px var(--shadow); font-size: var(--font-size-sm); line-height: 1.5; white-space: pre-wrap; word-break: break-all;
  user-select: text; -webkit-user-select: text; cursor: text; }

/* ★★★★ 공용 목록 표의 줄 강조 막(사장님 확정 2026-11-25 · §10-399 · `row-hover.js`).
   줄 배경을 바꾸면 표가 든 층 전체를 다시 칠한다 — 막 하나를 제 층에서 옮기면 다시 칠하지 않는다.
   z-index 3 = 관리 열 고정 칸과 같은 높이 · 뒤에 오므로 그 위 · 머리행과는 겹치지 않게 JS 가 자른다. 마우스는 받지 않는다. */
.uik-table-scroll.uik-hl { position: relative; }
.uik-row-hl { position: absolute; left: 0; top: 0; width: 0; height: 0; background: rgb(0 0 0 / .07); pointer-events: none; z-index: 3; will-change: transform; display: none; }
.uik-row-hl.on { display: block; }
/* ★★★★★ 칸 폭 끌기 안내선(엑셀처럼 · §10-399) — 끄는 동안 이것만 움직이고 손을 떼면 폭이 바뀐다(표를 다시 배치하지 않아 끊기지 않는다) */
.uik-col-guide { position: absolute; left: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 6; will-change: transform; }
/* ★★★★★ 공용 입력 폼은 **창을 줄인 만큼 칸도 준다**(사장님 지시 2026-11-29 · §10-401 — 손으로 줄인 창을 이제 지킨다).
   격자 칸은 `minmax(0, 1fr)`(ui-kit.css) · 칸 안 입력칸은 기본 크기(약 20글자) 밑으로도 줄 수 있게 `min-width: 0`.
   예전에는 창을 줄이면 오른쪽 칸이 카드 밖으로 밀려 나갔다(실측 760px 창). ui-kit.css 가 크기 문턱(80KB)에 닿아 여기 둔다. */
:is(.uik-form-grid, .uik-form-grid-auto) > label > :is(input, select, textarea, span) { min-width: 0; }

/* ★★★★★ 둥근 닫기(×) 단추 — 공용 한 벌(사장님 확정 2026-11-30 · §10-408 · `close-btn.js`).
   예전 세 벌(상품 제안서 32px · 사진 크게 보기 34px 바깥 모서리 · 직원 로그기록 30px 글자 ×)을 하나로. 바깥 모서리는 `-out`. */
.uik-x-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--bg-secondary); color: var(--text-primary); cursor: pointer; z-index: 2; }
.uik-x-close:hover { background: var(--st-danger); color: var(--on-accent); border-color: var(--st-danger); }
.uik-x-close-out { top: -16px; right: -16px; background: var(--bg-card); box-shadow: 0 2px 10px rgb(0 0 0 / .5); }
/* ★★★★★ 비밀번호 칸 + 눈 단추 — 공용 한 벌(§10-408 · `pw-eye.js` · 예전 설정 모듈의 `se-pwwrap`·`se-pw-eye` — 창마다 `ui-btn` 을 달기도 안 달기도 했다) */
.uik-pwwrap { position: relative; display: flex; align-items: center; }
.uik-pwwrap > input { flex: 1; width: 100%; padding-right: 36px; }
.uik-pw-eye { position: absolute; right: 8px; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.uik-pw-eye:hover { color: var(--accent); }
/* ★★★★★ 업로드 창 머리 — 제목 왼쪽 · [기존 정보 업데이트] 체크 오른쪽 위(§10-411 · `upload-dialog.js`) */
.uik-up-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin: 0 0 var(--space-3); }
.ui-card .uik-up-head > h3, .ui-modal .uik-up-head > h3 { margin: 0; }
.uik-up-update { display: inline-flex; align-items: center; gap: 6px; font-size: var(--font-size-sm); color: var(--text-primary); cursor: pointer; white-space: nowrap; }
.uik-up-update > input { margin: 0; }
