/* =============================================================================
   협력업체 안전관리수준 평가(ct-eval) — 화면 + 출력물 스타일 (2026-10-10)   js/ct-eval-*.js 와 한 쌍
   - 화면: .cev-*  (색·크기는 앱 토큰 var(--mint) 등을 따른다. 모바일 우선 — 터치 ≥ 44px, 입력 16px)
   - 출력물: 모든 선택자가 #hsPrintHost 로 시작한다(화면에 영향 없음). 맑은 고딕 · 흑백 표 · 전역 @page 없음(hsPortrait · hsLandscape 만 사용).
   ========================================================================== */

/* ───────── 반기 현황 ───────── */
.cev-home .cev-filter select { min-height: 44px; font-size: 16px; }
.cev-camp-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cev-camp-h h3 { margin: 0; font-size: 17px; }
.cev-camp-sub { margin: 4px 0 8px; }
.cev-camp .banner { margin: 8px 0; }
.hs-stats.cev-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.cev-note { margin: 4px 2px 10px; }
.cev-tbl th, .cev-tbl td { vertical-align: middle; }
.cev-tbl th small { display: block; font-weight: 400; color: var(--ink-2); font-size: 11.5px; }
.cev-tbl td small { display: block; color: var(--ink-2); font-size: 11.5px; line-height: 1.3; }
.cev-tbl .cev-c-rank { width: 52px; text-align: center; }
.cev-tbl .cev-c-name { min-width: 120px; }
.cev-tbl .cev-c-tot b { font-size: 16px; }
.cev-row { cursor: pointer; }
.cev-row:hover, .cev-row:focus-visible { background: var(--surface-2); outline: none; }
.cev-avg td { background: var(--surface-2); font-weight: 700; }
.cev-d { font-weight: 700; font-size: 13px; white-space: nowrap; }
.cev-up { color: #17653a; }
.cev-dn { color: #b42318; }
.cev-d0 { color: var(--ink-2); font-weight: 400; }
.cev-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cev-grid2 > .hs-card { min-width: 0; }
.cev-gap { margin-top: 16px; }
.cev-pickbox { max-height: 34vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 2px 12px; margin-bottom: 8px; }
.cev-pick { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cev-pick:last-child { border-bottom: 0; }
.cev-pick input { width: 20px; height: 20px; flex: 0 0 auto; }
.cev-pick small { color: var(--ink-2); margin-left: auto; font-size: 12px; }
@media (max-width: 900px) { .cev-grid2 { grid-template-columns: 1fr; } }
/* 휴대폰: 표를 카드로 */
@media (max-width: 720px) {
  .cev-tbl thead { display: none; }
  .cev-tbl, .cev-tbl tbody { display: block; }
  .cev-tscroll-reset { overflow: visible; }
  .cev-tbl .cev-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; padding: 12px; border-bottom: 1px solid var(--line); }
  .cev-tbl .cev-row td { display: block; border: 0; padding: 0; font-size: 14px; text-align: left; }
  .cev-tbl .cev-row td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--ink-2); }
  .cev-tbl .cev-row td.cev-c-name { grid-column: 1 / -1; }
  .cev-tbl .cev-row td.cev-c-name::before { display: none; }
  .cev-tbl .cev-row td.cev-c-name b { font-size: 16px; }
  .cev-tbl .cev-row td.cev-c-rank { width: auto; grid-column: 1 / -1; order: -1; text-align: left; }
  .cev-tbl .cev-row td.cev-c-rank::before { display: inline; margin-right: 4px; }
  .cev-tbl .cev-row td.cev-c-rank::after { content: '위'; }
  .cev-tbl tr.cev-avg { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .cev-tbl tr.cev-avg td { padding: 0; border: 0; }
  .cev-tbl tr.cev-avg td:empty { display: none; }
  .cev-tbl tr.cev-avg td[colspan] { flex: 1 1 100%; }
}

.cev-cf { margin: 0 0 10px; padding: 9px 12px; background: var(--mint-tint); border-radius: 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ───────── 평가표 작성 ───────── */
.cev-form { padding-bottom: 96px; }
.cev-top { position: sticky; top: calc(var(--hdr-h, 0px) + 4px); z-index: 20; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; margin: 0 0 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.cev-who { flex: 1 1 auto; min-width: 0; }
.cev-who b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev-who small { color: var(--ink-2); font-size: 12px; }
.cev-live { display: flex; align-items: baseline; gap: 4px; flex: 0 0 auto; }
.cev-total { font-size: 32px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cev-unit { font-size: 13px; color: var(--ink-2); margin-right: 4px; }
.cev-subbar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 2px 10px; font-size: 13px; }
.cev-save { color: var(--ink-2); }
.cev-save.is-err { color: #b42318; font-weight: 700; }
.cev-meta .field { margin-bottom: 10px; }
.cev-meta input { width: 100%; min-height: 46px; font-size: 16px; box-sizing: border-box; }
.cev-tools { margin: 0 0 8px; }
.cev-cat { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.cev-cat > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px; font-weight: 800; font-size: 16px; cursor: pointer; background: var(--surface-2); list-style: none; min-height: 48px; }
.cev-cat > summary::-webkit-details-marker { display: none; }
.cev-cat > summary::after { content: '▾'; margin-left: 6px; color: var(--ink-2); }
.cev-cat:not([open]) > summary::after { content: '▸'; }
.cev-cat-n { flex: 1 1 auto; }
.cev-cat-s { font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.cev-cat-s b { color: var(--ink); font-size: 17px; }
.cev-item { padding: 14px; border-top: 1px solid var(--line); }
.cev-item.is-miss { background: #fff4f2; box-shadow: inset 4px 0 0 #d4467e; }
.cev-ih { display: flex; gap: 10px; align-items: flex-start; }
.cev-no { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--mint-tint); color: var(--mint-ink); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.cev-q { flex: 1 1 auto; min-width: 0; font-weight: 700; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.cev-mx { flex: 0 0 auto; font-size: 12px; color: var(--ink-2); padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.cev-crit { margin: 8px 0 10px; }
.cev-crit > summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); min-height: 32px; display: flex; align-items: center; }
.cev-crit-t { white-space: pre-line; line-height: 1.55; font-size: 13.5px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; overflow-wrap: anywhere; }
.cev-ch { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.cev-chb { min-height: 56px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; cursor: pointer; padding: 6px 8px; }
.cev-chb b { font-size: 16px; }
.cev-chb i { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.cev-chb.is-on { background: var(--mint); border-color: var(--mint); color: #fff; }
.cev-chb.is-on i { color: #fff; }
.cev-chb:disabled { opacity: .55; cursor: default; }
.cev-chb.is-on:disabled { opacity: 1; }
.cev-un { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.cev-un-l { min-width: 0; font-weight: 600; }
.cev-un-l small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 400; }
.cev-step { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.cev-sb { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.cev-sb:disabled { opacity: .5; cursor: default; }
.cev-n { width: 62px; height: 46px; text-align: center; font-size: 18px; font-weight: 700; border: 1.5px solid var(--line-strong); border-radius: 12px; box-sizing: border-box; padding: 0; -moz-appearance: textfield; }
.cev-sub-t { text-align: right; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.cev-sub-t b { color: #b42318; font-size: 17px; }
.cev-ev { margin-top: 8px; }
.cev-ev > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--mint-ink); min-height: 44px; display: flex; align-items: center; gap: 6px; }
.cev-fc { font-weight: 600; color: var(--ink-2); }
.cev-has { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--mint-tint); color: var(--mint-ink); }
.cev-ol { display: block; font-size: 13px; font-weight: 700; margin: 2px 0 6px; }
.cev-ol small { font-weight: 400; color: var(--ink-2); }
.cev-op, .cev-tech textarea { width: 100%; font-size: 16px; line-height: 1.5; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px; box-sizing: border-box; font-family: inherit; resize: vertical; }
.cev-fbs { display: grid; gap: 12px; margin-top: 12px; }
.cev-hints { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.cev-ht { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
.cev-ht span { display: block; font-size: 12px; color: var(--ink-2); }
.cev-ht b { display: block; font-size: 18px; margin: 2px 0; }
.cev-ht small { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.cev-hint > summary { cursor: pointer; font-weight: 800; min-height: 40px; display: flex; align-items: center; gap: 6px; }
.cev-nav { justify-content: center; margin: 12px 0 0; }
.cev-nav .btn { min-height: 46px; flex: 1 1 140px; max-width: 220px; }
.cev-actions { position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); margin: 14px -4px 0; }
.cev-actions .btn { min-height: 46px; }
@media (max-width: 480px) {
  .cev-actions .btn { flex: 1 1 calc(50% - 8px); padding-left: 8px; padding-right: 8px; }
  .cev-nav .btn { flex: 1 1 100%; max-width: none; }
  .cev-total { font-size: 28px; }
  .cev-chb { min-height: 58px; }
}

/* ───────── 출력: 업체별 평가표 (원본 '양식' 시트, A1:N29) ─────────
   화면용 .cev-* 와 이름이 겹치지 않게 인쇄 전용 접두 .cev-p* 를 쓴다. 글자·줄 높이는 JS(fit)가 한 쪽에 들어가도록 --ev-k/--ev-f/--ev-fc 를 연속으로 줄인다. */
#hsPrintHost .cev-pg { font-family: 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif; color: #000; }
#hsPrintHost .cev-box { position: relative; overflow: hidden; }
#hsPrintHost .cev-port .cev-box { height: 280mm; }
#hsPrintHost .cev-land .cev-box { height: 193mm; }
#hsPrintHost .cev-port { --ev-k: .84; --ev-f: 8pt; --ev-fc: 6.8pt; }
#hsPrintHost .cev-land { --ev-k: .56; --ev-f: 7.6pt; --ev-fc: 6.8pt; }
#hsPrintHost .cev-pt { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--ev-f); }
#hsPrintHost .cev-pt td, #hsPrintHost .cev-pt th { border: .25mm solid #000; padding: .5mm 1.1mm; line-height: 1.28; overflow-wrap: anywhere; word-break: keep-all; vertical-align: middle; text-align: center; font-weight: 400; background: transparent; border-radius: 0; margin: 0; width: auto; height: auto; display: table-cell; color: #000; }
#hsPrintHost .cev-pt th { background: #f2f2f2; }
#hsPrintHost .cev-pt .cev-r1 td { height: calc(19.3mm * var(--ev-k)); }
#hsPrintHost .cev-pt .cev-title { font-size: calc(var(--ev-f) * 2.5); font-weight: 700; letter-spacing: .4mm; }
#hsPrintHost .cev-pt .cev-type { font-size: var(--ev-f); line-height: 1.6; white-space: nowrap; padding-left: 0; padding-right: 0; }
#hsPrintHost .cev-pt .cev-r2 td { height: calc(8.7mm * var(--ev-k)); font-size: calc(var(--ev-f) * 1.2); }
#hsPrintHost .cev-pt .cev-hd { text-align: left; }
#hsPrintHost .cev-pt .cev-th th { height: calc(16.7mm * var(--ev-k)); }
#hsPrintHost .cev-pt .cev-ir td { height: calc(11.6mm * var(--ev-k)); }
#hsPrintHost .cev-pt .cev-pc, #hsPrintHost .cev-pt .cev-pn { background: #f2f2f2; }
#hsPrintHost .cev-pt .cev-pc { font-weight: 700; }
#hsPrintHost .cev-pt .cev-pq { text-align: center; font-weight: 400; white-space: normal; flex: none; }
#hsPrintHost .cev-pt .cev-cr { text-align: left; font-size: var(--ev-fc); }
#hsPrintHost .cev-pt .cev-memo { display: block; font-weight: 700; }
#hsPrintHost .cev-pt .cev-sc, #hsPrintHost .cev-pt .cev-sum { font-weight: 700; font-size: calc(var(--ev-f) * 1.15); }
#hsPrintHost .cev-pt .cev-pm { font-size: var(--ev-f); color: #000; }
#hsPrintHost .cev-pt .cev-pte td, #hsPrintHost .cev-pt .cev-pte th { height: calc(20.4mm * var(--ev-k)); }
#hsPrintHost .cev-pt .cev-tech-t { text-align: left; vertical-align: top; }
#hsPrintHost .cev-pt .cev-tot td, #hsPrintHost .cev-pt .cev-tot th, #hsPrintHost .cev-pt .cev-gb td, #hsPrintHost .cev-pt .cev-gb th { height: calc(10.8mm * var(--ev-k)); }
#hsPrintHost .cev-pt .cev-totv, #hsPrintHost .cev-pt .cev-gr { font-weight: 700; font-size: calc(var(--ev-f) * 1.5); }
#hsPrintHost .cev-foot { margin-top: 1.2mm; font-size: calc(var(--ev-f) * .9); color: #333; text-align: left; }
#hsPrintHost .cev-draft { color: #666; }
#hsPrintHost .cev-pg[data-fit="over"] .cev-foot { display: none; }

/* ───────── 출력: 반기 종합현황 (원본 '종합현황' 시트, A4 가로) ───────── */
#hsPrintHost .cev-smbox { height: 192mm; font-size: 10pt; }
#hsPrintHost .cev-sm-title { font-size: 16pt; font-weight: 700; margin: 2mm 0 5mm; }
#hsPrintHost .cev-sm-cont { font-size: 10pt; margin: 1mm 0 4mm; color: #333; }
#hsPrintHost .cev-sm-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; }
#hsPrintHost .cev-kpi { border-collapse: collapse; table-layout: fixed; width: 175mm; }
#hsPrintHost .cev-kpi th, #hsPrintHost .cev-kpi td { border: .25mm solid #000; text-align: center; padding: 1.2mm 2mm; }
#hsPrintHost .cev-kpi th { background: #9fb9c7; font-size: 10pt; font-weight: 700; }
#hsPrintHost .cev-kpi td { background: #f4f7f6; font-size: 14pt; height: 11mm; }
#hsPrintHost .cev-stamp { border-collapse: collapse; margin-left: auto; }
#hsPrintHost .cev-stamp th, #hsPrintHost .cev-stamp td { border: .25mm solid #000; text-align: center; padding: 1mm 2mm; font-size: 9pt; min-width: 28mm; }
#hsPrintHost .cev-stamp th { background: #f2f2f2; font-weight: 700; }
#hsPrintHost .cev-stamp .cev-sv { min-width: 8mm; width: 8mm; padding: 1mm; }
#hsPrintHost .cev-stamp td { height: 20mm; vertical-align: middle; }
#hsPrintHost .cev-stamp td small { display: block; font-size: 8pt; line-height: 1.25; }
#hsPrintHost .cev-stamp td small.cev-pu { color: #666; }
#hsPrintHost .cev-stamp img.ct-sig { display: block; margin: 0 auto 1mm; height: 11mm; max-width: 24mm; object-fit: contain; }
#hsPrintHost .cev-sm-h { font-size: 11pt; font-weight: 700; margin: 6mm 0 2mm; }
#hsPrintHost .cev-smt { width: 100%; border-collapse: collapse; table-layout: fixed; }
#hsPrintHost .cev-smt th, #hsPrintHost .cev-smt td { border: .25mm solid #000; padding: 1mm 2mm; text-align: center; font-size: 10pt; height: 8.4mm; line-height: 1.25; }
#hsPrintHost .cev-smt th { background: #1b365d; color: #fff; font-weight: 700; height: 11mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
#hsPrintHost .cev-smt .cev-w1 { width: 12mm; }
#hsPrintHost .cev-smt td:nth-child(n+4) { text-align: right; }
#hsPrintHost .cev-smt td:last-child { text-align: center; }
#hsPrintHost .cev-smt .cev-nm { text-align: left; }
#hsPrintHost .cev-smt .cev-avgr td { background: #f4f7f6; font-weight: 700; border-bottom: .8mm double #000; }
#hsPrintHost .cev-smt .cev-avgr td:first-child { text-align: center; }
#hsPrintHost .cev-sm-foot { margin-top: 3mm; font-size: 8.5pt; color: #333; }

/* ───────── 양식 편집기 (관리자 · SHS.ctAdmin 틀 안) ───────── */
.te-wrap .field { margin-bottom: 10px; }
.te-wrap .field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.te-wrap input[type="text"], .te-wrap input[type="number"], .te-wrap textarea, .te-wrap select { width: 100%; box-sizing: border-box; min-height: 44px; font-size: 16px; font-family: inherit; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--ink); }
.te-wrap textarea { line-height: 1.5; resize: vertical; }
.te-row { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.te-row input[type="text"] { flex: 1 1 120px; width: auto; min-width: 0; }
.te-row input[type="number"] { flex: 0 0 90px; width: 90px; }
.te-row > label { font-weight: 700; font-size: 13px; }
.te-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.te-sub { font-weight: 700; font-size: 13px; margin: 10px 0 6px; }
.te-cat { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 14px; background: var(--surface-2); }
.te-cat.is-off { opacity: .6; }
.te-cat-h { margin-bottom: 8px; }
.te-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 0 0 8px; }
.te-item > summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; min-height: 48px; list-style: none; }
.te-item > summary::-webkit-details-marker { display: none; }
.te-item.is-off > summary .te-q { text-decoration: line-through; color: var(--ink-2); }
.te-no { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--mint-tint); color: var(--mint-ink); font-weight: 800; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.te-q { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.te-kind, .te-offtag { flex: 0 0 auto; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.te-offtag { color: #a1281d; border-color: #f0a8a1; }
.te-body { padding: 4px 12px 12px; }
.te-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; }
.te-chk input { width: 20px; height: 20px; }
.te-labels > summary { cursor: pointer; }
@media (max-width: 560px) { .te-g2 { grid-template-columns: 1fr; } }
