/* =============================================================================
   협력업체 현황 /ct-dash · 재해이력 (2026-10-10) — 화면 전용 .ctd-*  (출력물 아님)
   모바일 우선: 375~430 카드 · 900 이상 표. #app 폭(1240px)은 css/ct.css 에서 이 모듈에 넓혀 둔다.
   ========================================================================== */
.ctd { min-width: 0; }
body.hs-mod-ct-dash .hs-wrap { max-width: none; }   /* hs 기본 1100px 대신 #app(1240px)을 다 쓴다 */
.ctd-sec { margin: 0 0 14px; }
.ctd-sech { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 0 8px; }
.ctd-sech h3 { margin: 0; font-size: 16px; }
.ctd-na { color: var(--ink-2, #6e6e73); font-weight: 400; }
b.ctd-na { font-weight: 600; }
.ctd-warn { color: #b45309; }
.ctd-up { color: #17653a; font-style: normal; font-weight: 700; }
.ctd-dn { color: #b42318; font-style: normal; font-weight: 700; }

/* ---- 필터 ---- */
.ctd-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 6px 0 4px; }
.ctd-fac { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2, #6e6e73); }
.ctd-fac b { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface-2, #f5f5f7); color: var(--ink, #1d1d1f); font-size: 14px; }
.ctd-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2, #6e6e73); min-width: 0; }
.ctd-f select, .ctd-f input { min-height: 40px; border: 1px solid var(--line-strong, #c7c7cc); border-radius: 10px; padding: 0 10px; background: #fff; color: var(--ink, #1d1d1f); font: inherit; font-size: 14px; box-sizing: border-box; }
.ctd-f input[type="date"] { min-width: 140px; }
.ctd-fq { flex: 1 1 200px; }
.ctd-fq input { width: 100%; font-size: 16px; }
#ctdPReset[hidden] { display: none; }

/* ---- KPI ---- */
.ctd-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ctd-kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ctd-kpi { background: #fff; border: 1px solid var(--line, #e1e1e6); border-radius: var(--radius, 12px); padding: 12px 12px 10px; min-width: 0; }
.ctd-kpi > span { display: block; font-size: 12.5px; color: var(--ink-2, #6e6e73); }
.ctd-kpi-v { font-size: 16px; margin: 4px 0 2px; line-height: 1.15; overflow-wrap: anywhere; }
.ctd-kpi-v b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ctd-kpi-v b.ctd-kd { font-size: 21px; letter-spacing: -.2px; white-space: nowrap; }
.ctd-kpi small { display: block; font-size: 11.5px; color: var(--ink-2, #6e6e73); line-height: 1.4; }
.ctd-kpi small.ctd-warn { color: #b45309; }

/* ---- 툴팁 ---- */
.ctd-tip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; padding: 0; border: 1px solid var(--line-strong, #c7c7cc); border-radius: 50%; background: #fff; color: var(--ink-2, #6e6e73); font-size: 12px; line-height: 1; cursor: pointer; vertical-align: 1px; }
.ctd-tip:hover, .ctd-tip:focus-visible { border-color: var(--mint, #0071e3); color: var(--mint-ink, #0066cc); outline: none; }
.ctd-tipbox { position: fixed; z-index: 120; background: #1d1d1f; color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.55; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); pointer-events: none; }

/* ---- 업체 표(PC) ---- */
.ctd-tblwrap { border: 1px solid var(--line, #e1e1e6); border-radius: var(--radius, 12px); background: #fff; overflow: hidden; }
.ctd-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; }
.ctd-tbl th, .ctd-tbl td { padding: 10px 9px; border-bottom: 1px solid var(--line, #e1e1e6); text-align: left; vertical-align: top; word-break: keep-all; overflow-wrap: break-word; }
.ctd-tbl thead th { background: var(--surface-2, #f5f5f7); font-size: 12px; color: var(--ink-2, #6e6e73); font-weight: 700; vertical-align: bottom; }
.ctd-tbl thead th small { display: block; font-weight: 400; font-size: 10.5px; margin-top: 2px; }
.ctd-tbl tbody tr { cursor: pointer; }
.ctd-tbl tbody tr:hover { background: var(--surface-2, #f7f7f9); }
.ctd-tbl tbody tr:last-child td { border-bottom: 0; }
.ctd-tbl .c-name { width: 11%; }
.ctd-tbl .c-hc { width: 9%; }
.ctd-tbl .c-work { width: 10%; }
.ctd-tbl .c-eval { width: 16%; }
.ctd-tbl .c-acc { width: 14%; }
.ctd-tbl .c-sf { width: 12%; }
.ctd-tbl .c-cost { width: 9%; }
.ctd-tbl .c-bd { width: 19%; }
.ctd-tbl .c-name a { font-weight: 700; color: var(--mint-ink, #0066cc); text-decoration: none; font-size: 14.5px; }
.ctd-tbl .c-name a:hover { text-decoration: underline; }
.ctd-tbl td b, .ctd-card-g b { font-variant-numeric: tabular-nums; }
.ctd-tbl small, .ctd-card-g small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--ink-2, #6e6e73); }
.ctd-tbl .hs-chip, .ctd-card-g .hs-chip { font-size: 11.5px; padding: 2px 7px; }
.ctd-tbl .c-bd, .ctd-card-b { }
.ctd-bd { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong, #d2d2d7); background: var(--surface-2, #f5f5f7); color: var(--ink-2, #3a3a3c); font-size: 11px; line-height: 1.5; }
.ctd-bd-final { background: #e6f6ec; color: #17653a; border-color: #86cda0; }
.ctd-bd-prog { background: #e8f3ff; color: #0b5cad; border-color: #7db4ee; }
.ctd-bd-open { background: var(--mint-tint, #e8f1fc); color: var(--mint-ink, #0066cc); border-color: var(--mint, #0071e3); }
.ctd-bd-cancel { background: #fdecea; color: #a1281d; border-color: #f0a8a1; }

/* ---- 업체 카드(모바일) ---- */
.ctd-cards { display: none; list-style: none; margin: 0; padding: 0; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.ctd-card { background: #fff; border: 1px solid var(--line, #e1e1e6); border-radius: var(--radius, 12px); padding: 12px; cursor: pointer; min-width: 0; }
.ctd-card-h { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; margin-bottom: 8px; min-height: 40px; justify-content: center; }
.ctd-card-h b { font-size: 16px; color: var(--mint-ink, #0066cc); }
.ctd-card-h span { font-size: 12.5px; color: var(--ink-2, #6e6e73); }
.ctd-card-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; font-size: 13.5px; }
.ctd-card-g > div { min-width: 0; overflow-wrap: anywhere; }
.ctd-card-g em { display: block; font-style: normal; font-size: 11px; color: var(--ink-2, #6e6e73); margin-bottom: 2px; }
.ctd-card-b { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line, #e1e1e6); }

/* ---- 업체 상세 ---- */
.ctd-dhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.ctd-dhead h2 { margin: 0; font-size: 20px; }
.ctd-dtabs { margin-bottom: 12px; }
.ctd-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.ctd-mini > div { background: #fff; border: 1px solid var(--line, #e1e1e6); border-radius: var(--radius, 12px); padding: 10px 12px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.ctd-mini > div > .ctd-ml { display: block; font-size: 12px; color: var(--ink-2, #6e6e73); margin-bottom: 3px; }
.ctd-mini b { font-size: 18px; }
.ctd-mini small { color: var(--ink-2, #6e6e73); font-size: 11.5px; }
.ctd-per { display: block; margin-top: 2px; }
.ctd-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.ctd-dl > div { min-width: 0; }
.ctd-dl dt { font-size: 12px; color: var(--ink-2, #6e6e73); margin-bottom: 2px; }
.ctd-dl dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.ctd-dl1 { grid-template-columns: minmax(0, 1fr); }
.ctd-pre { white-space: pre-wrap; line-height: 1.55; }
.ctd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ctd-two > .hs-card { min-width: 0; }
.ctd-list { list-style: none; margin: 0; padding: 0; }
.ctd-list li { padding: 8px 0; border-bottom: 1px solid var(--line, #e1e1e6); font-size: 14px; overflow-wrap: anywhere; }
.ctd-list li:last-child { border-bottom: 0; }
.ctd-list a { color: var(--mint-ink, #0066cc); }
.ctd-more { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--mint-ink, #0066cc); }

/* ---- 재해이력 ---- */
.ctd-acc-h { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.ctd-acc-h h3 { margin: 0; font-size: 17px; flex: 1 1 auto; }
.ctd-acc-tbl .ctd-acc-sum { min-width: 180px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
.ctd-form .field textarea, .ctd-form .field input[type="text"], .ctd-form .field select, .ctd-form .field input[type="date"] { font-size: 16px; }
.ctd-form #acTypeTxt { margin-top: 6px; width: 100%; box-sizing: border-box; min-height: 44px; }
.ctd-form #acTypeTxt[hidden] { display: none; }
.ctd-docs { margin-top: 14px; }

/* ---- 반응형 ---- */
@media (max-width: 1100px) {
  .ctd-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ctd-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .ctd-tblwrap { display: none; }
  .ctd-cards { display: grid; }
  .ctd-kpis, .ctd-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ctd-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ctd-kpis, .ctd-kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctd-kpis > .ctd-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ctd-kpi-v b { font-size: 24px; }
  .ctd-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctd-mini > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ctd-dl { grid-template-columns: minmax(0, 1fr); }
  .ctd-filters { gap: 8px; }
  .ctd-f { flex: 1 1 calc(50% - 8px); }
  .ctd-f input[type="date"] { min-width: 0; width: 100%; }
  .ctd-fac { flex: 1 1 100%; }
  .ctd-f select { width: 100%; }
  .ctd-fq { flex: 1 1 100%; }
  .ctd-tip { width: 40px; height: 40px; margin-left: 0; border: 0; background: transparent; font-size: 20px; }   /* 터치 대상 40px — ⓘ 글자 자체가 원이라 테두리는 뺀다 */
  .ctd-dhead h2 { font-size: 18px; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .ctd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ctd-t td:not(.ctd-wrap), .ctd-t th { white-space: nowrap; }
