/* c-sheet · 견적서(c/sheet) · 견적서 내려받기(c/sheet/print) · 요청 내용(c/info)
   스테이지 변수만(--ui-*) · 클래스 = cs- · 범위 = .x-body(승인 시트만 .x-sheet 아래 · 시트가 body 에 붙어서)
   종이 = OPS components/quotePaper QUOTE_PAPER_CSS 칸 · 글자 크기 그대로(인쇄 폭 186mm) */

/* ---------- 틀 ---------- */
.x-body .cs-page { display: flex; flex-direction: column; gap: 16px; }
.x-body .cs-page > .sw-head { margin: 0; flex-wrap: wrap; row-gap: 8px; }
.x-body .cs-page .sw-head-main { flex-wrap: wrap; row-gap: 6px; }
.x-body .cs-pill { flex: none; }

/* 단계 줄(견적 요청 · 선정 · 계약 · 체결) */
.x-body .cs-stages { list-style: none; margin: -6px 0 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; font: var(--ui-t-secondary-medium); color: var(--ui-ink-4, #b0b8c1); }
.x-body .cs-stages li { display: inline-flex; align-items: center; white-space: nowrap; }
.x-body .cs-stages li + li::before { content: ''; flex: none; width: 3px; height: 3px; border-radius: 50%; margin: 0 9px; background: var(--ui-ink-4, #b0b8c1); } /* 구분 = 점(' · ' 와 같은 결 · 대시처럼 보이는 선 안 씀) */
.x-body .cs-stages li.is-done { color: var(--ui-ink-2, #4e5968); }
.x-body .cs-stages li.is-now { color: var(--ui-brand, #4c00ff); font-weight: 700; }

/* ---------- 진행 카드(OPS CustomerFlow) ---------- */
.x-body .cs-flow { padding: 24px; display: grid; gap: 18px; }
.x-body .cs-fc-top { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px 32px; }
.x-body .cs-fc-n, .x-body .cs-fc-a { display: grid; gap: 2px; min-width: 0; }
.x-body .cs-fc-n > span, .x-body .cs-fc-a > span { font: var(--ui-t-caption); color: var(--ui-ink-2, #4e5968); white-space: nowrap; }
.x-body .cs-fc-n b { font: 700 34px/40px var(--ui-font); letter-spacing: -.02em; color: var(--ui-ink, #191f28); font-variant-numeric: tabular-nums; }
.x-body .cs-fc-n b em { font: 500 18px/1 var(--ui-font); font-style: normal; margin-left: 2px; color: var(--ui-ink-2, #4e5968); }
.x-body .cs-fc-n.is-now b { color: var(--ui-brand, #4c00ff); }
.x-body .cs-fc-avg { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.x-body .cs-fc-a { text-align: right; }
.x-body .cs-fc-a b { font: 700 20px/28px var(--ui-font); letter-spacing: -.01em; color: var(--ui-ink, #191f28); font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-body .cs-fc-gauge { margin-top: -6px; }
.x-body .cs-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.x-body .cs-steps li { position: relative; display: grid; justify-items: center; gap: 8px; font: 500 14px/1.3 var(--ui-font); color: var(--ui-ink-3, #8b95a1); text-align: center; }
.x-body .cs-steps li::before { content: ''; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--ui-line-strong, #e5e8eb); }
.x-body .cs-steps li:first-child::before { display: none; }
.x-body .cs-steps li.is-done::before, .x-body .cs-steps li.is-now::before { background: var(--ui-brand, #4c00ff); }
.x-body .cs-steps i { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 14px/1 var(--ui-font); font-style: normal; background: var(--ui-surface, #fff); color: var(--ui-ink-3, #8b95a1); box-shadow: inset 0 0 0 2px var(--ui-line-strong, #e5e8eb); }
.x-body .cs-steps li.is-done { color: var(--ui-ink-body, #333d4b); }
.x-body .cs-steps li.is-done i { background: var(--ui-brand, #4c00ff); color: #fff; box-shadow: none; }
.x-body .cs-steps li.is-now { color: var(--ui-brand, #4c00ff); font-weight: 700; }
.x-body .cs-steps li.is-now i { background: var(--ui-brand, #4c00ff); color: #fff; box-shadow: 0 0 0 6px var(--ui-brand-tint-press, #e9e1ff); }

/* ---------- 견적서 카드(OPS CustomerQuote) ---------- */
.x-body .cs-quote .sw-card-head { flex-wrap: wrap; row-gap: 6px; padding-bottom: 12px; }
.x-body .cs-qno { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.x-body .cs-valid.is-soon { background: var(--ui-ink, #191f28); color: #fff; }
.x-body .cs-valid.is-past { background: var(--ui-fill, #f2f4f6); color: var(--ui-danger-ink, #b42318); }
.x-body .cs-qbox { margin: 0 20px; border: 1px solid var(--ui-line-strong, #e5e8eb); border-radius: 16px; overflow: hidden; }
.x-body .cs-qrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 64px; grid-template-areas: 'w a m v'; align-items: center; column-gap: 16px; min-height: 52px; padding: 8px 20px; border-top: 1px solid var(--ui-line, #f2f4f6); font: var(--ui-t-body); color: var(--ui-ink, #191f28); }
.x-body .cs-qhead { min-height: 40px; border-top: 0; font: var(--ui-t-caption); color: var(--ui-ink-3, #8b95a1); background: var(--ui-press, rgba(2, 32, 71, .05)); }
.x-body .cs-qw { grid-area: w; min-width: 0; overflow-wrap: anywhere; }
.x-body .cs-qa { grid-area: a; min-width: 0; overflow-wrap: anywhere; color: var(--ui-ink-body, #333d4b); }
.x-body .cs-qbill { color: var(--ui-ink-3, #8b95a1); }
.x-body .cs-qm { grid-area: m; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; }
.x-body .cs-qv { grid-area: v; text-align: right; white-space: nowrap; color: var(--ui-ink-2, #4e5968); }
.x-body .cs-qhead .cs-qm, .x-body .cs-qhead .cs-qv { font-weight: 500; color: var(--ui-ink-3, #8b95a1); }
.x-body .cs-qvp { display: none; }
.x-body .cs-qtable.all-month .cs-qu { display: none; }
.x-body .cs-sum { margin: 0; padding: 12px 20px 14px; border-top: 1px solid var(--ui-line-strong, #e5e8eb); background: var(--ui-press, rgba(2, 32, 71, .05)); display: grid; gap: 4px; }
.x-body .cs-sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-width: 0; }
.x-body .cs-sum-row dt { flex: none; font: var(--ui-t-secondary); color: var(--ui-ink-2, #4e5968); }
.x-body .cs-sum-row dd { margin: 0; min-width: 0; text-align: right; font: var(--ui-t-secondary-medium); color: var(--ui-ink-body, #333d4b); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.x-body .cs-sum-row.is-total dd { font: 700 22px/30px var(--ui-font); letter-spacing: -.02em; color: var(--ui-ink, #191f28); }
.x-body .cs-sum-row dd.cs-pay { font-weight: 700; color: var(--ui-ink, #191f28); }
.x-body .cs-terms { margin: 16px 20px 0; display: grid; gap: 10px; }
.x-body .cs-term { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; align-items: start; }
.x-body .cs-term dt { font: var(--ui-t-secondary); color: var(--ui-ink-2, #4e5968); padding-top: 1px; }
.x-body .cs-term dd { margin: 0; min-width: 0; display: grid; gap: 8px; font: var(--ui-t-body); color: var(--ui-ink, #191f28); }
.x-body .cs-term dd p { margin: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.x-body .cs-term dd p b { font-weight: 600; }
.x-body .cs-next dd { display: flex; }
.x-body .cs-acts { display: flex; justify-content: flex-end; gap: 8px; padding: 20px; }
.x-body .cs-acts .ui-btn { min-width: 156px; }
.x-body .cs-acts .cs-go { min-width: 200px; }
.x-body .cs-n { font-weight: 700; color: var(--ui-brand, #4c00ff); font-variant-numeric: tabular-nums; }
.x-body .cs-empty .sw-card-foot { padding-top: 4px; }

/* ---------- 요청 내용(OPS C3) ---------- */
.x-body .cs-kv { margin: 0; padding: 8px 20px 0; }
.x-body .cs-kv-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--ui-line, #f2f4f6); }
.x-body .cs-kv-row:first-child { border-top: 0; }
.x-body .cs-kv-row dt { font: var(--ui-t-secondary); color: var(--ui-ink-2, #4e5968); }
.x-body .cs-kv-row dd { margin: 0; min-width: 0; font: var(--ui-t-body); color: var(--ui-ink, #191f28); overflow-wrap: anywhere; white-space: pre-line; font-variant-numeric: tabular-nums; }

/* ---------- 휴대폰 ---------- */
@media (max-width: 640px) {
  .x-body .cs-flow { padding: 20px 18px; gap: 16px; }
  .x-body .cs-fc-avg { margin-left: 0; flex: 1 1 100%; }
  .x-body .cs-fc-a { text-align: left; }
  .x-body .cs-fc-n b { font-size: 30px; line-height: 36px; }
  .x-body .cs-steps li { font-size: 12px; }
  .x-body .cs-qbox { margin: 0 16px; }
  .x-body .cs-qhead { display: none; }
  .x-body .cs-qrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'w m' 'a v'; row-gap: 2px; padding: 14px 16px; border-top: 1px solid var(--ui-line, #f2f4f6); }
  .x-body .cs-qhead + .cs-qrow { border-top: 0; }
  .x-body .cs-qa { font: var(--ui-t-secondary); color: var(--ui-ink-3, #8b95a1); }
  .x-body .cs-qbill { color: inherit; }
  .x-body .cs-qv { font: var(--ui-t-secondary); color: var(--ui-ink-3, #8b95a1); }
  .x-body .cs-qvp { display: inline; }
  .x-body .cs-qtable.all-month .cs-qu { display: inline; }
  .x-body .cs-qu { color: var(--ui-ink-2, #4e5968); font-weight: 400; }
  .x-body .cs-sum { padding: 12px 16px 14px; }
  .x-body .cs-terms { margin: 16px 16px 0; }
  .x-body .cs-term, .x-body .cs-kv-row { grid-template-columns: 76px minmax(0, 1fr); column-gap: 12px; }
  .x-body .cs-kv { padding: 4px 16px 0; }
  .x-body .cs-acts { flex-direction: column; padding: 16px; }
  .x-body .cs-acts .ui-btn, .x-body .cs-acts .cs-go { width: 100%; min-width: 0; }
}

/* ---------- 승인 시트(.x-sheet 안 · 시트는 body 에 붙음) ---------- */
.x-sheet .cs-ap { display: grid; gap: 18px; }
.x-sheet .cs-ap-lines { list-style: none; margin: 0; padding: 4px 16px; border-radius: 16px; background: var(--ui-press, rgba(2, 32, 71, .05)); }
.x-sheet .cs-ap-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'w b' 'a b'; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--ui-line-strong, #e5e8eb); font: var(--ui-t-secondary); color: var(--ui-ink-2, #4e5968); }
.x-sheet .cs-ap-lines li:first-child { border-top: 0; }
.x-sheet .cs-ap-w { grid-area: w; font: var(--ui-t-body-medium); color: var(--ui-ink, #191f28); }
.x-sheet .cs-ap-a { grid-area: a; min-width: 0; }
.x-sheet .cs-ap-lines b { grid-area: b; align-self: center; font: 600 16px/1.4 var(--ui-font); color: var(--ui-ink, #191f28); font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-sheet .cs-ap-lines li.cs-ap-sum { grid-template-areas: 'w b'; }
.x-sheet .cs-ap-lines li.cs-ap-sum .cs-ap-a { display: none; }
.x-sheet .cs-ap-lines li.cs-ap-sum b { font-size: 19px; font-weight: 700; color: var(--ui-brand, #4c00ff); }
.x-sheet .cs-consent { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 2px; font: var(--ui-t-body); color: var(--ui-ink, #191f28); cursor: pointer; }
.x-sheet .cs-consent.cs-bad span { color: var(--ui-danger-ink, #b42318); }
.x-sheet .ui-input.cs-bad { box-shadow: inset 0 0 0 2px var(--ui-danger-dot, #f04452); }
.x-sheet .cs-why { margin: -6px 0 0; font: var(--ui-t-secondary-medium); color: var(--ui-danger-ink, #b42318); }

/* ---------- 견적서 내려받기(OPS C10 · 종이 = QuotePaper) ---------- */
.x-body .cs-dlv { gap: 20px; }
.x-body .cs-dlv .sw-head-main { gap: 4px; }
.x-body .cs-back { margin-left: -10px; }
.x-body .cs-save { flex: none; }
.x-body .cs-doc { --cs-z: 1; display: grid; justify-items: center; gap: 24px; min-width: 0; overflow: hidden; padding-bottom: 8px; }
.x-body .cs-paper { box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 16mm 14mm; zoom: var(--cs-z, 1);
  background: #fff; border: 1px solid var(--ui-line-strong, #e5e8eb); border-radius: 8px; box-shadow: var(--ui-shadow-card);
  color: #191f28; font-family: var(--ui-font); letter-spacing: 0; text-align: left;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.x-body .cs-p-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.x-body .cs-p-brand { font-size: 13px; font-weight: 800; }
.x-body .cs-p-no { font-size: 12px; color: #6b7684; text-align: right; line-height: 1.5; font-variant-numeric: tabular-nums; }
.x-body .cs-p-h1 { margin: 0 0 16px; text-align: center; letter-spacing: .18em; font-size: 24px; font-weight: 700; line-height: 1.2; color: #191f28; }
.x-body .cs-p-h1--cmp { letter-spacing: .04em; }
.x-body .cs-p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; align-items: start; }
.x-body .cs-paper table { width: 100%; border-collapse: collapse; border: 0; background: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.x-body .cs-paper th, .x-body .cs-paper td { height: auto; padding: 6px 9px; border: 1px solid #d9dee5; text-align: left; vertical-align: top; color: #191f28; background: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.45; }
.x-body .cs-paper th { width: 96px; background: #f3f5f8; color: #4e5968; font-weight: 600; white-space: nowrap; }
.x-body .cs-p-content { margin-bottom: 12px; }
.x-body .cs-p-content th { width: 130px; }
.x-body .cs-paper .cs-num { text-align: right; }
.x-body .cs-p-items th { width: auto; }
.x-body .cs-p-book th:nth-child(1) { width: 22%; }
.x-body .cs-p-book th:nth-child(2) { width: auto; }
.x-body .cs-p-book th:nth-child(3) { width: 11%; }
.x-body .cs-p-book th:nth-child(4), .x-body .cs-p-book th:nth-child(7) { width: 14%; }
.x-body .cs-p-book th:nth-child(5) { width: 7%; }
.x-body .cs-p-book th:nth-child(6) { width: 8%; }
.x-body .cs-p-items td.cs-p-ag { vertical-align: middle; font-weight: 600; }
.x-body .cs-p-items td.cs-p-empty { color: #6b7684; text-align: center; }
.x-body .cs-p-items tr.cs-p-once td { background: #f8f6ff; font-size: 13px; font-weight: 700; }
.x-body .cs-p-items tr.cs-p-grand td { background: #f1edff; font-size: 14px; font-weight: 800; }
.x-body .cs-p-items tr.cs-p-grand td.cs-num { color: var(--ui-brand, #4c00ff); }
.x-body .cs-p-terms { margin-top: 12px; }
.x-body .cs-p-terms th { width: 130px; }
.x-body .cs-p-terms caption { caption-side: top; text-align: left; padding: 0 0 6px; font-size: 12.5px; font-weight: 700; color: #191f28; }
.x-body .cs-p-terms td { line-height: 1.5; overflow-wrap: anywhere; }
.x-body .cs-p-terms td b { font-weight: 600; }
.x-body .cs-p-notes { margin-top: 12px; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.5; }
.x-body .cs-p-notice { margin-top: 14px; padding: 9px 12px; border-left: 3px solid var(--ui-brand, #4c00ff); background: #faf9ff; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.x-body .cs-p-stamp { margin-top: 18px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 40px; font-size: 13px; font-weight: 800; break-inside: avoid; page-break-inside: avoid; }
.x-body .cs-p-cmp { margin-top: 12px; }
.x-body .cs-p-cmp th:nth-child(1) { width: auto; }
.x-body .cs-p-cmp th:nth-child(2), .x-body .cs-p-cmp th:nth-child(5) { width: 15%; }
.x-body .cs-p-cmp th:nth-child(3), .x-body .cs-p-cmp th:nth-child(4) { width: 9%; }
.x-body .cs-p-cmp th:nth-child(6) { width: 12%; }
.x-body .cs-p-cmp tr.cs-p-cap th { background: #fff; color: #191f28; font-size: 13px; font-weight: 700; }
.x-body .cs-p-cmp tr.cs-p-pick td { background: #f4f0ff; font-weight: 700; }
.x-body .cs-p-cmp td.cs-p-ag { vertical-align: top; }

/* 인쇄 = 종이만(내려받기 화면이 있을 때만 틀을 숨김) */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body:has(.cs-doc) .market-header, body:has(.cs-doc) .sw-side, body:has(.cs-doc) .x-mnav, body:has(.cs-doc) #memo, body:has(.cs-doc) .x-toast, .x-body .cs-noprint { display: none !important; }
  body:has(.cs-doc), body:has(.cs-doc) .market-app { background: #fff !important; }
  body:has(.cs-doc) .sw { display: block !important; min-height: 0 !important; }
  body:has(.cs-doc) .market-main { padding: 0 !important; max-width: none !important; min-height: 0 !important; }
  .x-body .cs-dlv { padding: 0 !important; max-width: none !important; gap: 0; }
  .x-body .cs-doc { display: block; overflow: visible; padding: 0; }
  .x-body .cs-paper { zoom: 1 !important; width: 186mm !important; max-width: none; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .x-body .cs-p2 { break-before: page; page-break-before: always; }
  .x-body .cs-p-cmp tr { break-inside: avoid; page-break-inside: avoid; }
}

/* ---------- 요청 내용(c/info) = 짜인 판(10-21 · 라벨 · 값 글줄 표 대신) ---------- */
.x-body .ci-page { max-width: 760px; }
.x-body .ci-hero { align-items: center; }
.x-body .ci-ics { flex: none; display: flex; align-items: center; justify-content: center; gap: 2px; width: 84px; height: 84px; border-radius: 20px; background: #fff; box-shadow: 0 6px 16px rgba(76, 0, 255, .08); }
.x-body .ci-ics img { display: block; width: 36px; height: 36px; }
.x-body .ci-ics img:only-child { width: 48px; height: 48px; }
.x-body .ci-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.x-body .ci-day { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border-radius: 18px; background: #f9fafb; }
.x-body .ci-day .vx-dt.is-sm { width: 64px; flex: none; background: #fff; }
.x-body .ci-day-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.x-body .ci-day-t b { font: 700 15px/1.3 var(--ui-font, inherit); color: var(--ui-ink, #191f28); }
.x-body .ci-num { font: 600 14px/1.2 var(--ui-font, inherit); color: var(--ui-ink-2, #4e5968); font-variant-numeric: tabular-nums; }
.x-body .ci-note p { margin: 0; font: 600 15.5px/1.55 var(--ui-font, inherit); color: var(--ui-ink, #191f28); word-break: keep-all; overflow-wrap: anywhere; }
.x-body .ci-code { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 8px 0 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--ui-line-strong, #e5e8eb); }
.x-body .ci-code > span { font: 600 14px/1 var(--ui-font, inherit); color: var(--ui-ink-2, #4e5968); }
.x-body .ci-code > b { flex: 1; min-width: 0; color: var(--ui-ink, #191f28); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 340px) { .x-body .ci-days { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
  .x-body .ci-day { gap: 10px; padding: 10px; }
  .x-body .ci-day .vx-dt.is-sm { width: 56px; }
  .x-body .ci-ics { width: 72px; height: 72px; }
}
