/* =====================================================================
   의뢰사 포털 (portal/*.jsp) — 2026-11-25
   ---------------------------------------------------------------------
   ⚠️ 담당자 화면의 index.css 위에 얹는다. 버튼 · 입력칸 · 색 토큰은 그쪽 것을 쓴다.
   ⚠️ SCSS 를 거치지 않는 평범한 css 다 — build-css.sh 와 무관하게 이 파일을 바로 고친다.
      고친 뒤에는 build-css.sh 를 한 번 돌려 판(ASSET_V)을 올린다.
   ⚠️ 상자는 「면」으로 나눈다. **테두리 선 + 둥근 모서리를 함께 쓰지 않는다** —
      둥글면 선 없이 바탕색으로, 선을 쓰면 모서리는 각지게.
   ⚠️ 한글은 낱말 중간에서 꺾이지 않게(keep-all).
   ===================================================================== */

.portal {
  --pt-ink: #16202a;
  --pt-sub: #5b6470;
  --pt-line: #e3e7ec;
  --pt-soft: #f3f7fa;
  --pt-deep: #0f3d57;
  --pt-w: 1120px;
  --pt-pad: 24px;
  --pt-r: 12px;
  background: #fff;
  color: var(--pt-ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.portal main { flex: 1 0 auto; }
.portal a { color: inherit; }
.portal .color-blue { color: var(--color-blue); }
.portal label.field-title { display: block; }
.pt-inner { max-width: var(--pt-w); margin: 0 auto; padding: 0 var(--pt-pad); }
.pt-narrow { max-width: 820px; }
.pt-full { width: 100%; }

/* ---------- 위쪽 띠 ---------- */
.pt-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); box-shadow: 0 1px 0 var(--pt-line); }
.pt-top-row { display: flex; align-items: center; gap: 32px; height: 68px; }
.pt-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.pt-brand img { border-radius: 8px; }
.pt-brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.pt-brand-txt b { font-size: 17px; font-weight: 700; }
.pt-brand-txt small { font-size: 12px; color: var(--pt-sub); }
.pt-nav { display: flex; gap: 4px; }
.pt-nav a { padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--pt-sub); text-decoration: none; white-space: nowrap; }
.pt-nav a:hover { background: var(--pt-soft); color: var(--pt-ink); }
.pt-nav a[aria-current="page"] { color: var(--color-primary-deep); font-weight: 600; background: var(--bg-primary-soft); }
.pt-me { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.pt-me-name { font-size: 15px; }
.pt-me-org { color: var(--pt-sub); }
.pt-link-quiet { font-size: 14px; color: var(--pt-sub) !important; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 첫 화면 ---------- */
.pt-hero { background: linear-gradient(135deg, var(--pt-deep) 0%, #17607f 55%, var(--color-primary) 130%); color: #fff; padding: 88px 0 80px; }
.pt-eyebrow, .pt-sec-eyebrow { font-size: 13px; letter-spacing: .12em; font-weight: 600; }
.pt-eyebrow { color: rgba(255,255,255,.7); }
.pt-hero h1 { font-size: 44px; line-height: 1.3; font-weight: 700; margin-top: 16px; letter-spacing: -0.02em; }
.pt-hero-lead { margin-top: 20px; max-width: 620px; font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.85); }
.pt-hero-act { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.pt-hero-todo { display: flex; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.pt-hero-todo .pt-hero-act { margin-top: 0; margin-left: 8px; }
.pt-todo-num span { display: block; font-size: 14px; color: rgba(255,255,255,.75); }
.pt-todo-num b { display: block; font-size: 44px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.pt-todo-num b small { font-size: 18px; font-weight: 500; margin-left: 2px; }
.pt-todo-num b.is-hot { color: #ffd166; }
.btn.pt-btn-light { background: #fff; color: var(--pt-deep); font-weight: 600; }
.btn.pt-btn-light:hover { background: #eaf4fa; }
.btn.pt-btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
/* 조용한 단추 — 선 없이 바탕만. 담당자 화면의 btn-dark-line(선 + 둥근 모서리)을 포털에서는 쓰지 않는다 */
.btn.pt-btn-soft { background: #e9eef3; color: var(--pt-ink); border-color: transparent; }
.btn.pt-btn-soft:hover { background: #dde4ea; }
.btn.pt-btn-ghost:hover { background: rgba(255,255,255,.22); }

.pt-sec { padding: 88px 0; }
.pt-sec-tint { background: var(--pt-soft); }
.pt-sec-eyebrow { color: var(--color-primary-deep); }
.pt-sec h2 { font-size: 30px; font-weight: 700; margin-top: 10px; letter-spacing: -0.01em; }
.pt-sec-lead { margin-top: 12px; font-size: 16px; color: var(--pt-sub); line-height: 1.7; }
.pt-two { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }

.pt-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 40px; counter-reset: s; }
.pt-steps li { background: var(--pt-soft); border-radius: var(--pt-r); padding: 24px 20px; }
.pt-step-no { display: block; font-size: 14px; font-weight: 700; color: var(--color-primary); }
.pt-steps b { display: block; font-size: 18px; margin-top: 10px; }
.pt-steps p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--pt-sub); }

.pt-feats { display: grid; gap: 12px; }
.pt-feats li { background: #fff; border-radius: var(--pt-r); padding: 22px 24px; box-shadow: 0 1px 2px rgba(15,61,87,.06); }
.pt-feats b { font-size: 17px; }
.pt-feats p { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--pt-sub); }

.pt-checks { display: grid; gap: 0; border-top: 2px solid var(--pt-ink); }
.pt-checks li { padding: 16px 4px; border-bottom: 1px solid var(--pt-line); font-size: 16px; line-height: 1.6; }

.pt-sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.pt-sites div { background: #fff; border-radius: var(--pt-r); padding: 24px; box-shadow: 0 1px 2px rgba(15,61,87,.06); }
.pt-sites b { font-size: 18px; }
.pt-sites p { margin-top: 4px; color: var(--pt-sub); font-size: 14px; }

/* ---------- 아래쪽 띠 ---------- */
.pt-foot { background: #10191f; color: rgba(255,255,255,.75); padding: 36px 0; font-size: 14px; margin-top: 0; }
.pt-foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pt-foot b { color: #fff; }
.pt-foot p { margin-top: 6px; line-height: 1.6; }
.pt-foot-side { text-align: right; max-width: 560px; }
.pt-foot-side a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pt-foot-poc { color: rgba(255,255,255,.5); }

/* ---------- 로그인 ---------- */
.pt-login { background: var(--pt-soft); display: flex; align-items: flex-start; justify-content: center; padding: 72px var(--pt-pad) 96px; }
.pt-login-box { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 40px 36px; box-shadow: 0 8px 32px rgba(15,61,87,.08); }
.pt-login-box h1 { font-size: 26px; font-weight: 700; }
.pt-login-lead { margin-top: 8px; color: var(--pt-sub); font-size: 15px; line-height: 1.6; }
.pt-login-help { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--pt-line); display: grid; gap: 6px; font-size: 13px; color: var(--pt-sub); line-height: 1.6; }
.pt-login-help li::before { content: "· "; }

/* ---------- 안쪽 화면 공통 ---------- */
.pt-page { padding: 40px 0 88px; background: #fff; }
.pt-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pt-page-head h1 { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -0.01em; }
.pt-crumb { font-size: 14px; color: var(--pt-sub); }
.pt-crumb a { text-decoration: underline; text-underline-offset: 3px; }
.pt-sub { margin-top: 6px; color: var(--pt-sub); font-size: 15px; }
.pt-note { background: #fff6e5; color: #7a4b00; padding: 14px 18px; border-radius: 10px; font-size: 15px; margin-bottom: 20px; }
.pt-note.is-ok { background: #e6f5ec; color: #1d6b3a; }
.pt-hint { font-size: 13px; color: var(--pt-sub); line-height: 1.6; }
.pt-err { margin-top: 6px; font-size: 14px; color: var(--color-red); }
.pt-empty { background: var(--pt-soft); border-radius: var(--pt-r); padding: 56px 24px; text-align: center; margin-top: 24px; }
.pt-empty b { font-size: 18px; }
.pt-empty p { margin-top: 8px; color: var(--pt-sub); }

.pt-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pt-badge.size-lg { height: 34px; padding: 0 16px; border-radius: 17px; font-size: 15px; }
.pt-badge.is-gray  { background: #eef0f3; color: #4b5563; }
.pt-badge.is-blue  { background: var(--bg-primary-soft); color: var(--color-primary-deep); }
.pt-badge.is-red   { background: #fde8e7; color: #b42318; }
.pt-badge.is-point { background: #e7f1f3; color: #2f6c78; }
.pt-badge.is-done  { background: #e6f5ec; color: #1d6b3a; }

/* 숫자 타일 */
.pt-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.pt-tile { background: var(--pt-soft); border-radius: var(--pt-r); padding: 18px 20px; }
.pt-tile span { font-size: 14px; color: var(--pt-sub); }
.pt-tile b { display: block; font-size: 30px; font-weight: 700; margin-top: 4px; }
.pt-tile.is-hot { background: #fde8e7; }
.pt-tile.is-hot b { color: #b42318; }

/* 계약서 목록 */
.pt-docs { margin-top: 28px; border-top: 2px solid var(--pt-ink); }
.pt-doc { border-bottom: 1px solid var(--pt-line); }
.pt-doc > a { display: grid; grid-template-columns: 1fr 380px 24px; gap: 24px; align-items: center; padding: 22px 8px; text-decoration: none; }
.pt-doc > a:hover { background: var(--pt-soft); }
.pt-doc.is-todo { box-shadow: inset 4px 0 0 #d92d20; }
.pt-doc-main { display: grid; gap: 6px; justify-items: start; }
.pt-doc-title { font-size: 17px; font-weight: 600; }
.pt-doc-meta { font-size: 14px; color: var(--pt-sub); }
.pt-doc-side { display: grid; grid-template-columns: 90px 1fr 100px; gap: 12px; }
.pt-doc-side dt { font-size: 12px; color: var(--pt-sub); }
.pt-doc-side dd { font-size: 14px; margin-top: 2px; }
.pt-doc-go { color: var(--pt-sub); font-size: 18px; }

/* 진행 단계 */
.pt-track { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 32px; background: var(--pt-soft); border-radius: var(--pt-r); padding: 22px 12px; }
.pt-track li { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; }
.pt-track li + li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: #d5dce3; z-index: 0; }
.pt-track li.is-done + li::before, .pt-track li.is-done + li.is-now::before { background: var(--color-primary); }
.pt-track-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #8b95a1; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 2px #d5dce3; }
.pt-track li.is-done .pt-track-dot { background: var(--color-primary); color: #fff; box-shadow: none; }
.pt-track li.is-now .pt-track-dot { background: var(--pt-deep); color: #fff; box-shadow: 0 0 0 5px rgba(15,61,87,.15); }
.pt-track b { font-size: 14px; font-weight: 500; color: var(--pt-sub); }
.pt-track li.is-now b { color: var(--pt-ink); font-weight: 700; }

/* 상세 */
.pt-detail { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin-top: 28px; align-items: start; }
.pt-detail-main { display: grid; gap: 24px; min-width: 0; }
.pt-todo { background: var(--pt-soft); border-radius: var(--pt-r); padding: 26px 28px; }
.pt-todo.is-hot { background: #fff4f2; box-shadow: inset 4px 0 0 #d92d20; }
.pt-todo h2 { font-size: 20px; font-weight: 700; }
.pt-todo > p { margin-top: 8px; font-size: 15px; line-height: 1.7; color: #3c4652; }
.pt-reply { margin-top: 20px; }
.pt-reply-foot, .pt-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }

.pt-file { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; box-shadow: 0 1px 2px rgba(15,61,87,.08); }
.pt-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pt-file:focus-within { box-shadow: 0 0 0 2px var(--color-primary); }
.pt-file-btn { flex-shrink: 0; background: var(--pt-deep); color: #fff; font-size: 14px; padding: 8px 14px; border-radius: 8px; }
.pt-file-name { font-size: 14px; color: var(--pt-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-file-name.is-picked { color: var(--pt-ink); font-weight: 600; }
/* 입력칸 생김새는 담당자 화면의 .text-field 와 맞춘다 (높이 40 · 회색 선 · 같은 모서리) */
.pt-textarea, .pt-select { display: block; width: 100%; font: inherit; font-size: 14px; padding: 10px; border: 1px solid var(--gray-800); border-radius: var(--radius-sm); background: #fff; color: var(--pt-ink); }
.pt-textarea { resize: vertical; line-height: 1.6; }
.pt-select { height: 40px; padding: 0 10px; }
.pt-textarea:focus, .pt-select:focus { outline: none; border-color: var(--color-primary); }

.pt-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--pt-ink); }
.pt-block-head h2 { font-size: 19px; font-weight: 700; }
.pt-reqs { counter-reset: q; }
.pt-reqs li { padding: 20px 0; border-bottom: 1px solid var(--pt-line); }
.pt-req-head { font-size: 16px; }
.pt-req-head b { color: var(--color-primary-deep); margin-right: 6px; }
.pt-req-why { margin-top: 6px; font-size: 15px; line-height: 1.7; color: #3c4652; }
.pt-req-text { margin-top: 12px; background: var(--pt-soft); border-radius: 10px; padding: 14px 18px; }
.pt-req-text span { font-size: 12px; font-weight: 700; color: var(--color-primary-deep); }
.pt-req-text p { margin-top: 4px; font-size: 15px; line-height: 1.75; }

.pt-log li { display: grid; grid-template-columns: 56px 84px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--pt-line); font-size: 15px; align-items: baseline; }
.pt-log-date { color: var(--pt-sub); font-variant-numeric: tabular-nums; }
.pt-log-who { font-size: 13px; font-weight: 600; }
.pt-log-who.is-me { color: var(--pt-ink); }
.pt-log-who.is-ai { color: #7b4fa0; }
.pt-log-who.is-hosp { color: var(--color-primary-deep); }

.pt-detail-side { position: sticky; top: 92px; }
.pt-facts { background: var(--pt-soft); border-radius: var(--pt-r); padding: 8px 22px; }
.pt-facts div { display: grid; grid-template-columns: 88px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid #e1e7ed; }
.pt-facts div:last-child { border-bottom: 0; }
.pt-facts dt { font-size: 13px; color: var(--pt-sub); padding-top: 1px; }
.pt-facts dd { font-size: 14px; font-weight: 500; }
.pt-side-help { margin-top: 14px; font-size: 13px; color: var(--pt-sub); line-height: 1.7; padding: 0 4px; }

/* 제출 양식 */
.pt-form { margin-top: 28px; }
.pt-form-sec { padding: 28px 0; border-top: 1px solid var(--pt-line); }
.pt-form-sec:first-of-type { border-top: 2px solid var(--pt-ink); }
.pt-form-sec h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.pt-form-sec h2 span { width: 26px; height: 26px; border-radius: 50%; background: var(--pt-deep); color: #fff; font-size: 13px; display: grid; place-items: center; }
.pt-form-sec .pt-hint { margin-top: 6px; }
.pt-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pt-choice-item { position: relative; cursor: pointer; }
.pt-choice-item input { position: absolute; opacity: 0; }
.pt-choice-item span { display: block; text-align: center; padding: 16px 8px; border-radius: 10px; background: var(--pt-soft); font-size: 16px; font-weight: 500; }
.pt-choice-item input:checked + span { background: var(--pt-deep); color: #fff; font-weight: 700; }
.pt-choice-item input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.pt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pt-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.6; cursor: pointer; }
.pt-agree input { -webkit-appearance: checkbox; appearance: auto; position: static; opacity: 1; display: inline-block; width: 18px; height: 18px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--pt-deep); }
.pt-form-foot { padding-top: 24px; border-top: 2px solid var(--pt-ink); }
.pt-form-btns { display: flex; gap: 10px; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1024px) {
  .pt-steps { grid-template-columns: repeat(2, 1fr); }
  .pt-two, .pt-detail { grid-template-columns: 1fr; gap: 28px; }
  .pt-detail-side { position: static; }
  .pt-doc > a { grid-template-columns: 1fr 24px; }
  .pt-doc-side { grid-column: 1; }
}
@media (max-width: 768px) {
  .portal { --pt-pad: 16px; }
  .pt-top-row { height: auto; flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 6px; }
  .pt-nav { order: 3; width: 100%; overflow-x: auto; margin: 0 -8px; }
  .pt-brand-txt small { display: none; }
  .pt-hero { padding: 56px 0; }
  .pt-hero h1 { font-size: 30px; }
  .pt-hero-lead { font-size: 16px; }
  .pt-hero-todo { gap: 24px; }
  .pt-hero-todo .pt-hero-act { margin-left: 0; width: 100%; }
  .pt-sec { padding: 56px 0; }
  .pt-sec h2 { font-size: 24px; }
  .pt-steps, .pt-sites, .pt-choice, .pt-grid2 { grid-template-columns: 1fr; }
  .pt-tiles { grid-template-columns: repeat(2, 1fr); }
  .pt-doc-side { grid-template-columns: 1fr 1fr; }
  .pt-track { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 18px 4px; }
  .pt-track b { font-size: 12px; }
  .pt-log li { grid-template-columns: 48px 1fr; }
  .pt-log-what { grid-column: 1 / -1; }
  .pt-login { padding-top: 32px; }
  .pt-login-box { padding: 28px 20px; }
  .pt-foot-side { text-align: left; }
}
.pt-form label.field-title { font-size: 15px; font-weight: 600; }
.pt-form-sec h2 + .pt-hint + .pt-choice, .pt-form-sec h2 + label.field-title { margin-top: 16px; }
