/* =============================================================================
   협력업체 관리(ct-admin) 화면 스타일 (2026-10-10) — 화면 전용(출력물 없음). 클래스는 모두 cta- 접두. 색·간격은 hs.css / theme-apple 토큰을 따른다.
   모바일: 터치 ≥ 40px, 입력 글자 16px(iOS 확대 방지).
   ========================================================================== */

/* ---- 목록(협력업체 Master): 줄 전체가 링크 ---- */
.cta-tbl a.hs-tr { color: inherit; text-decoration: none; min-height: 52px; }
.cta-tbl a.hs-tr:hover, .cta-tbl a.hs-tr:focus-visible { background: var(--surface-2, #f5f5f7); outline: none; }
.cta-tbl .hs-th { cursor: default; }
.cta-tbl .hs-tr small { font-size: 12px; }
.cta-unk { color: #b45309; font-weight: 700; }
.cta-src { font-size: 11.5px; padding: 2px 8px; }
.cta-src-manual { background: #f1f1f4; color: #3a3a3c; }
.cta-src-employees { background: #e8f3ff; color: #0b5cad; border-color: #7db4ee; }

/* ---- 상세 ---- */
.cta-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; margin: 8px 0 0; }
.cta-dl > div { min-width: 0; }
.cta-dl dt { font-size: 12.5px; color: var(--ink-2, #6e6e73); margin: 0 0 2px; }
.cta-dl dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.cta-hc { font-size: 28px; line-height: 1.2; margin: 4px 0; }
.cta-hc b { font-size: 30px; }
.cta-cost { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cta-mini .hs-row { padding: 10px 0; }
.cta-person code, .cta-dl code, .cta-atbl code, .cta-secret code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-2, #f5f5f7); padding: 1px 6px; border-radius: 6px; }

/* ---- 등록·수정 창 ---- */
.cta-form .field { margin-bottom: 12px; }
.cta-form .field input[type="number"], .cta-form .field input[type="date"] { width: 100%; }
.cta-fs { border: 1px solid var(--line, #d2d2d7); border-radius: var(--radius, 12px); padding: 10px 12px 2px; margin: 0 0 12px; min-width: 0; }
.cta-fs legend { font-size: 13px; font-weight: 700; padding: 0 6px; }
.cta-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 10px; }
.cta-radios .opt, .cta-flags .opt, .cta-chk .opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; font-size: 15px; }
.cta-radios input, .cta-flags input, .cta-chk input { width: 18px; height: 18px; flex: 0 0 auto; }
.cta-off { opacity: .5; }
.cta-flags { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 4px 0 10px; }

/* ---- 사용자·담당자 ---- */
.cta-people { display: grid; gap: 10px; }
.cta-person { display: flex; gap: 10px 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; background: #fff; border: 1px solid var(--line, #d2d2d7); border-radius: var(--radius, 12px); padding: 12px; }
.cta-person-main { flex: 1 1 280px; min-width: 0; display: grid; gap: 6px; }
.cta-person-name b { font-size: 16px; }
.cta-person-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cta-person-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cta-secret .cta-dl { grid-template-columns: 1fr; }
.cta-pw { display: inline-block; font-size: 22px; letter-spacing: .06em; padding: 6px 12px; user-select: all; }

/* ---- 양식 설정 틀 ---- */
.cta-chain { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cta-chain li { position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 120px; padding: 8px 12px; border: 1px solid var(--line-strong, #c7c7cc); border-radius: 10px; background: var(--surface-2, #f5f5f7); font-size: 14px; }
.cta-chain li + li::before { content: '→'; position: absolute; left: -15px; top: 50%; transform: translateY(-50%); color: var(--ink-2, #6e6e73); }
.cta-chain li b { margin-right: 4px; }
.cta-chain li small { color: var(--ink-2, #6e6e73); font-size: 12px; }
.cta-ln-row { display: grid; grid-template-columns: 28px minmax(150px, 1.2fr) minmax(120px, 1fr) auto auto; gap: 6px 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line, #e1e1e6); }
.cta-ln-no { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2, #f0f0f2); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.cta-ln-row select, .cta-ln-row input[type="text"], .cta-ln-row input:not([type]) { width: 100%; min-height: 44px; border: 1px solid var(--line-strong, #c7c7cc); border-radius: 10px; padding: 0 10px; background: #fff; color: var(--ink, #1d1d1f); font: inherit; font-size: 16px; box-sizing: border-box; }
.cta-ln-req { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; white-space: nowrap; }
.cta-ln-req input { width: 18px; height: 18px; }
.cta-ln-btns { display: inline-flex; gap: 6px; }
.cta-ln-help, .cta-ln-emp { grid-column: 2 / -1; }
.cta-json { margin: 0; max-height: 380px; overflow: auto; background: #fafafa; border: 1px solid var(--line, #e1e1e6); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.cta-jsonin { width: 100%; min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; border: 1px solid var(--line-strong, #c7c7cc); border-radius: 10px; padding: 10px; box-sizing: border-box; }
.cta-adv { margin-top: 12px; }
.cta-adv summary { cursor: pointer; color: var(--ink-2, #6e6e73); font-size: 14px; min-height: 40px; display: flex; align-items: center; }
.cta-vtbl .hs-tr { min-height: 48px; }
.cta-vbtn { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- 권한관리 ---- */
.cta-role { border-top: 1px solid var(--line, #e1e1e6); padding: 12px 0; }
.cta-role:first-of-type { border-top: 0; }
.cta-role-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cta-role-it { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; margin: 0 0 6px; border: 1px solid var(--line, #e1e1e6); border-radius: 10px; background: #fff; }
.cta-warn { color: #b45309; }
.cta-guide { display: grid; gap: 8px; font-size: 14px; line-height: 1.55; }
.cta-guide b { color: var(--ink, #1d1d1f); }

/* ---- 좁은 화면 ---- */
@media (max-width: 720px) {
  .cta-ln-row { grid-template-columns: 28px minmax(0, 1fr); }
  .cta-ln-row .cta-ln-role { grid-column: 2; }
  .cta-ln-row .cta-ln-label { grid-column: 2; }
  .cta-ln-row .cta-ln-req, .cta-ln-row .cta-ln-btns { grid-column: 2; }
  .cta-chain li { min-width: 0; flex: 1 1 100%; }
  .cta-chain li + li::before { content: '↓'; left: 12px; top: -14px; transform: none; }
  .cta-hc { font-size: 24px; }
  .cta-person-btns .btn { flex: 1 1 auto; min-height: 40px; }
  .cta-vbtn { justify-content: flex-start; }
  .cta-pw { font-size: 19px; }
}
@media (max-width: 768px) {
  body.hs-mod-ct-admin .btn { min-height: 44px; }
  body.hs-mod-ct-admin .cta-form input, body.hs-mod-ct-admin .cta-form select, body.hs-mod-ct-admin .cta-form textarea { font-size: 16px; min-height: 44px; }
  body.hs-mod-ct-admin .hs-filters input, body.hs-mod-ct-admin .hs-filters select { font-size: 16px; min-height: 44px; }
  body.hs-mod-ct-admin .cta-jsonin, body.hs-mod-ct-admin .cta-ln-row select, body.hs-mod-ct-admin .cta-ln-row input { font-size: 16px; }
}
